fix(staffchat): 搜索聚合取最新命中(ASC页1陷阱)+tab切换不清搜索结果+is_send守卫兜底名+截断提示+TAB_KEYS单源
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import { computed, ref, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { getAccounts } from '@/api'
|
||||
import type { Account } from '@/api/types'
|
||||
import StaffChatSide, { type TabKey } from '@/components/staffchat/StaffChatSide.vue'
|
||||
import StaffChatSide, { TAB_KEYS, type TabKey } from '@/components/staffchat/StaffChatSide.vue'
|
||||
import SessionPane from '@/components/staffchat/SessionPane.vue'
|
||||
import ChatMain from '@/components/staffchat/ChatMain.vue'
|
||||
import MomentsPane from '@/components/staffchat/MomentsPane.vue'
|
||||
@@ -15,8 +15,8 @@ import StatsPane from '@/components/staffchat/StatsPane.vue'
|
||||
const props = defineProps<{ ownerId: string; tab?: string; talkerId?: string }>()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
// TabKey 从 StaffChatSide 导出(单一事实源);VALID 仅做运行时兜底
|
||||
const VALID: readonly TabKey[] = ['single', 'group', 'moments', 'contacts', 'stats']
|
||||
// TabKey/TAB_KEYS 从 StaffChatSide 导出(NAVS 单一事实源);VALID 仅做运行时兜底
|
||||
const VALID: readonly TabKey[] = TAB_KEYS
|
||||
function isTabKey(v: string | undefined): v is TabKey {
|
||||
return !!v && (VALID as readonly string[]).includes(v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user