Skip to content

Commit

Permalink
feat: 根据人物显示标题
Browse files Browse the repository at this point in the history
  • Loading branch information
liou666 committed Apr 4, 2023
1 parent e847c8a commit fc0641c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useConversationStore } from '@/stores'
// hooks
const store = useConversationStore()
const { el, scrollToBottom } = useScroll()
const {
language,
Expand All @@ -20,8 +21,9 @@ const message = ref('') // input message
const text = ref('') // current select message
const messageLength = computed(() => store.currentChatMessages.length)
const chatMessages = computed(() => store.currentChatMessages.slice(1))
const currentKey = computed(() => store.currentKey)
useTitle(currentKey)
// effects
watch(messageLength, () => nextTick(() => scrollToBottom()))
Expand Down

0 comments on commit fc0641c

Please sign in to comment.