From 1aa303d80a547d3e29d554c54cfbc7989da1da10 Mon Sep 17 00:00:00 2001 From: gerson <1405270578@qq.com> Date: 星期六, 10 八月 2024 13:39:24 +0800 Subject: [PATCH] amis 测试 --- src/components/drawer/CustomDrawer.vue | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/drawer/CustomDrawer.vue b/src/components/drawer/CustomDrawer.vue index 01020db..596ecea 100644 --- a/src/components/drawer/CustomDrawer.vue +++ b/src/components/drawer/CustomDrawer.vue @@ -50,7 +50,7 @@ <i class="iconfont icon-zhongduancanshu" title="鏀剁缉" @click="handleExpandClick(2)" v-show="state.isShowExpand"></i> </div> <div class="mt20 w100"> - <div class="w100 pb-[20px]" v-for="item in showSampleList" :key="item.sample_id"> + <div class="w100 pb-[20px]" v-for="item in finalSampleList" :key="item.sample_id"> <div class="cursor-pointer flex box-border p-[12px] w100 rounded bg-[#f5f7fd] transition-[background-color .2s]" @click="changeExample(item)" @@ -142,8 +142,8 @@ ], activeName: 1, - activeLabelName: 0, - activeInstructName: 0, + activeLabelName: 'knowledge_base', //榛樿閫夋嫨绗竴涓� + activeInstructName: 'office_assistant', //榛樿閫夋嫨绗竴涓� isShowExpand: false, useInstructDialog: false, instructInfo: {}, @@ -215,13 +215,6 @@ //鏍囩鐐瑰嚮浜嬩欢(鎻愰棶绀轰緥) const handleLabelClick = (item) => { state.activeLabelName = item.section_id; - const exampleShowLabelList = []; - exampleList.value.forEach((exampleItem) => { - if (exampleItem.section_a_id == item.section_id) { - exampleShowLabelList.push(exampleItem); - } - }); - showSampleList.value = exampleShowLabelList; }; //鏍囩鐐瑰嚮浜嬩欢(鎸囦护妯℃澘) const handleInstructClick = (item) => { @@ -279,6 +272,9 @@ }); const { query: querySample, queryData: showSampleList } = useSearch(exampleList, queryParams); const debounceQuery = debounce(querySample); +const finalSampleList = computed(() => { + return showSampleList.value.filter((item) => item.section_a_id == state.activeLabelName); +}); watch( () => queryParams.value.sample_title, -- Gitblit v1.9.3