From 21bd4f0a936a77dca7a81f21b670c5b01f52e349 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 26 十二月 2024 12:01:50 +0800 Subject: [PATCH] 修改文案;userInfo 存的数据结构 --- 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