From 9437495693aec7003b90a7b0213c835233fbcb1e Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期四, 21 十一月 2024 09:29:48 +0800 Subject: [PATCH] 修改退出登录后页面无反应 --- src/views/project/ch/home/component/waterRight/bottom.vue | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/views/project/ch/home/component/waterRight/bottom.vue b/src/views/project/ch/home/component/waterRight/bottom.vue index e904460..8e5396a 100644 --- a/src/views/project/ch/home/component/waterRight/bottom.vue +++ b/src/views/project/ch/home/component/waterRight/bottom.vue @@ -48,7 +48,7 @@ </template> <script setup lang="ts"> -import { computed, reactive, ref, watch } from 'vue'; +import { computed, reactive, ref } from 'vue'; import { activeGroupType, sceneGroupList, topGroupId } from '/@/stores/chatRoom'; let state = reactive({ applicationScenarios: [], @@ -95,12 +95,11 @@ const iconCount = iconList.value.length; return iconList.value[index % iconCount]; }; -const getMainSectionList = (val) => { +const getMainSectionList = async () => { let result = []; - console.log('馃殌 ~ sceneGroupList.value:', sceneGroupList.value); - sceneGroupList.value.forEach((sectionItem, index) => { + await sceneGroupList.value.forEach((sectionItem, index) => { sectionItem.Icon = getIconByIndex(index); - if (val == sectionItem.group_type) { + if (activeGroupType.value == sectionItem.group_type) { result.push(sectionItem); } }); @@ -115,13 +114,9 @@ } return groups; }); -watch( - () => activeGroupType.value, - (val) => { - getMainSectionList(val); - }, - { immediate: true } -); +defineExpose({ + getMainSectionList, +}); </script> <style scoped lang="scss"> .pc-scenes { -- Gitblit v1.9.3