diff --git a/src/views/chat/ChatPage/Index.vue b/src/views/chat/ChatPage/Index.vue index e81604a5..47a4bc0c 100644 --- a/src/views/chat/ChatPage/Index.vue +++ b/src/views/chat/ChatPage/Index.vue @@ -3,11 +3,12 @@ - + + @@ -22,6 +23,7 @@ import Friends from '../components/Friends/Index.vue' import ChatHeader from '../components/ChatHeader/Index.vue' import ChatMessage from '../components/ChatMessage/Index.vue' import InputSection from '../components/InputSection/index.vue' +import FriendDetail from '../components/FriendDetail/Index.vue' import { MENU_LIST_ENUM } from '../types/index.d.ts' defineOptions({ name: 'ChatPage' }) diff --git a/src/views/chat/components/FriendDetail/Index.vue b/src/views/chat/components/FriendDetail/Index.vue new file mode 100644 index 00000000..474ebfcd --- /dev/null +++ b/src/views/chat/components/FriendDetail/Index.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/views/chat/components/FriendItem/Index.vue b/src/views/chat/components/FriendItem/Index.vue index 0cd5d841..9f3eaea7 100644 --- a/src/views/chat/components/FriendItem/Index.vue +++ b/src/views/chat/components/FriendItem/Index.vue @@ -7,26 +7,22 @@ diff --git a/src/views/chat/components/Friends/Index.vue b/src/views/chat/components/Friends/Index.vue index 80cf8113..55df4e29 100644 --- a/src/views/chat/components/Friends/Index.vue +++ b/src/views/chat/components/Friends/Index.vue @@ -5,10 +5,11 @@ > @@ -18,11 +19,17 @@ import FriendItem from '../FriendItem/Index.vue' import { useFriendStore } from '../../store/friendstore' import { onMounted } from 'vue' +import Friend from '../../model/Friend' defineOptions({ name: 'Friends' }) -const { friendList } = useFriendStore() +const friendStore = useFriendStore() onMounted(() => { // set default conversation }) + +const onFriendClick = (friend: Friend) => { + console.log('====>', friend) + friendStore.setCurrentFriend(friend) +} diff --git a/src/views/chat/components/ToolSection/Index.vue b/src/views/chat/components/ToolSection/Index.vue index 405fdbfe..769e6639 100644 --- a/src/views/chat/components/ToolSection/Index.vue +++ b/src/views/chat/components/ToolSection/Index.vue @@ -1,5 +1,5 @@