Browse Source

修复浏览器控制台报错;

master
宋杰 6 days ago
parent
commit
afc3c8d6d8
  1. 4
      src/views/homePage.vue

4
src/views/homePage.vue

@ -327,11 +327,13 @@ watch(
async () => { async () => {
console.log("activeTab变化了", activeTab.value); console.log("activeTab变化了", activeTab.value);
if (activeTab.value == "AIchat" || activeTab.value == "AiEmotion") { if (activeTab.value == "AIchat" || activeTab.value == "AiEmotion") {
if (historyRecordRef.value && historyRecordRef.value.getHistoryList) {
historyRecordRef.value.getHistoryList({ historyRecordRef.value.getHistoryList({
model: activeTab.value == "AIchat" ? 1 : 2, model: activeTab.value == "AIchat" ? 1 : 2,
token: localStorage.getItem("localToken"), token: localStorage.getItem("localToken"),
}); });
} }
}
if (activeTab.value === "AIchat") { if (activeTab.value === "AIchat") {
isScrolling.value = false; // isScrolling.value = false; //
@ -566,7 +568,7 @@ const expandHistory = () => {
// model: activeTab.value == "AIchat" ? 1 : 2, // model: activeTab.value == "AIchat" ? 1 : 2,
// }); // });
// } // }
if (historyRecordRef) {
if (historyRecordRef.value && historyRecordRef.value.isCollapsed !== undefined) {
console.log("存在"); console.log("存在");
historyRecordRef.value.isCollapsed = !historyRecordRef.value.isCollapsed; historyRecordRef.value.isCollapsed = !historyRecordRef.value.isCollapsed;
} }

Loading…
Cancel
Save