Browse Source

修复浏览器控制台报错;

master
宋杰 5 days ago
parent
commit
afc3c8d6d8
  1. 12
      src/views/homePage.vue

12
src/views/homePage.vue

@ -327,10 +327,12 @@ 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") {
historyRecordRef.value.getHistoryList({
model: activeTab.value == "AIchat" ? 1 : 2,
token: localStorage.getItem("localToken"),
});
if (historyRecordRef.value && historyRecordRef.value.getHistoryList) {
historyRecordRef.value.getHistoryList({
model: activeTab.value == "AIchat" ? 1 : 2,
token: localStorage.getItem("localToken"),
});
}
} }
if (activeTab.value === "AIchat") { if (activeTab.value === "AIchat") {
@ -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