From 9858689def164c9959e7e9cba2f56a9ba69681c7 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期一, 22 七月 2024 15:45:58 +0800
Subject: [PATCH] fix: 修改高级示例

---
 src/components/drawer/CustomDrawer.vue |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/components/drawer/CustomDrawer.vue b/src/components/drawer/CustomDrawer.vue
index d319f8b..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 queryData" :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)"
@@ -141,10 +141,9 @@
 		{ ID: 2, Name: '鎸囦护妯℃澘' },
 	],
 	activeName: 1,
-	exampleTabList: [],
-	instructList: [],
-	activeLabelName: 0,
-	activeInstructName: 0,
+
+	activeLabelName: 'knowledge_base', //榛樿閫夋嫨绗竴涓�
+	activeInstructName: 'office_assistant', //榛樿閫夋嫨绗竴涓�
 	isShowExpand: false,
 	useInstructDialog: false,
 	instructInfo: {},
@@ -160,7 +159,6 @@
 });
 const instructContentList = ref([]); //鎸囦护鍒楄〃
 const exampleList = ref([]); //绀轰緥鍒楄〃
-
 const isShow = defineModel('isShow', {
 	type: Boolean,
 });
@@ -189,7 +187,6 @@
 	});
 	exampleList.value = res.samples;
 	state.exampleContent = array;
-	state.listSampleExpand = true;
 };
 //闅忔満鐢熸垚棰滆壊
 const randomHexColor = () => {
@@ -273,9 +270,11 @@
 const queryParams = ref({
 	sample_title: '',
 });
-const { query, queryData } = useSearch(exampleList, queryParams);
-
-const debounceQuery = debounce(query);
+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