Skip to content

Commit

Permalink
fix: 修复会话列表在小于 1440 屏幕加载异常
Browse files Browse the repository at this point in the history
  • Loading branch information
Evansy committed Nov 7, 2023
1 parent 4224ba4 commit 338eb77
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/views/Home/Chat/components/SideBar/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed } from 'vue'
import { computed, onBeforeMount } from 'vue'
import { useChatStore } from '@/stores/chat'
import { useGlobalStore } from '@/stores/global'
import { IsAllUserEnum } from '@/services/types'
Expand All @@ -11,6 +11,11 @@ import renderReplyContent from '@/utils/renderReplyContent'
const chatStore = useChatStore()
const globalStore = useGlobalStore()
onBeforeMount(() => {
// 请求回话列表
chatStore.getSessionList()
})
// 选中的聊天对话
const currentSession = computed(() => globalStore.currentSession)
Expand Down Expand Up @@ -53,7 +58,7 @@ const load = () => {
</script>

<template>
<ul class="chat-message" v-infinite-scroll="load">
<ul class="chat-message" v-infinite-scroll="load" :infinite-scroll-immediate="false">
<li
v-for="(item, index) in sessionList"
:key="index"
Expand Down

0 comments on commit 338eb77

Please sign in to comment.