diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue index 02c7492d032a8bc80ba75d9cd22e54c6551188b6..a1b25744b3729130afeb01c001558cb1e6e17743 100644 --- a/src/components/dialoguePanel/DialoguePanel.vue +++ b/src/components/dialoguePanel/DialoguePanel.vue @@ -1007,6 +1007,7 @@ const handleSendMessage = async (question, user_selected_flow, user_selected_app &-arror { margin: 0; + cursor: pointer; } .pagenation-cur { diff --git a/src/store/conversation.ts b/src/store/conversation.ts index 3d675f34bef220e69f3f708bc0c2da179ac9e7b0..db978553b7d51d405122d0097c8d927764a623a5 100644 --- a/src/store/conversation.ts +++ b/src/store/conversation.ts @@ -571,6 +571,7 @@ export const useSessionStore = defineStore('conversation', () => { regenerateInd ?? undefined, ); } + await getConversation(currentSelectedSession); }; /** * 暂停流式返回 diff --git a/src/views/dialogue/dialogueView.vue b/src/views/dialogue/dialogueView.vue index 396c8a7ba09c44135cd7fd028fe89440c8396211..aaf6fe7ded146c74c56b8cb325eec81e4ec70c20 100644 --- a/src/views/dialogue/dialogueView.vue +++ b/src/views/dialogue/dialogueView.vue @@ -47,14 +47,16 @@ const isSubmitDisabled = ref(true); const ruleFormRef = ref(); const router = useRouter(); const type = import.meta.env.VITE_USER_TYPE; -let routerList: ComputedRef> = computed(() => { +let routerList: ComputedRef< + Array<{ + name: string; + path: string; + src: string; + selectedSrc: string; + routerName: string; + anotherName?: string | undefined; // 路由别名,辅助匹配选中的路由图标 + }> +> = computed(() => { return [ { name: i18n.global.t('menu.dialogue'), @@ -206,9 +208,9 @@ const handleConfirmCreateModel = async (formData: any | undefined) => { const changeLanguagefun = (lang: 'CN' | 'EN') => { changeLanguage(lang); // 同步语言到iframe - const iframe = document.querySelector('#my-iframe') + const iframe = document.querySelector('#my-iframe'); if (iframe?.contentWindow) { - const data = {lang:localStorage.getItem('localeLang')}; + const data = { lang: localStorage.getItem('localeLang') }; let target = `${window.location.origin}/witchaind`; iframe.contentWindow.postMessage(data, target); } @@ -226,12 +228,7 @@ onMounted(() => { ruleForm.kb_id = localStorage.getItem('kb_id'); } console.log('onMounted', window.location.host); - const iframe = document.getElementById('my-iframe'); - console.log('iframe', `${window.location.origin}/witchaind`); initCopilot(); - iframe.src = `${window.location.origin}/witchaind`; - - }); watch( @@ -289,6 +286,14 @@ watch( name: String(currRoute.value.query.name), }; } + + // 监听路由变化给iframe.src赋值 + if (currRoute.value.path === '/witchainD') { + const iframe = document.getElementById('my-iframe') as HTMLIFrameElement; + if(iframe){ + iframe.src = `${window.location.origin}/witchaind`; + } + } }, { deep: true, immediate: true }, ); @@ -352,8 +357,8 @@ watch(