From af76b89fd4eb64f0d0056a8e62252fd9248d993e Mon Sep 17 00:00:00 2001 From: ChenZhaoYu <790348264@qq.com> Date: Sun, 12 Mar 2023 20:57:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=93=E5=BA=93=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/PromptStore/index.vue | 78 +++++++++++++-------- 1 file changed, 48 insertions(+), 30 deletions(-) diff --git a/src/components/common/PromptStore/index.vue b/src/components/common/PromptStore/index.vue index b1b41ae..7ce7ec8 100644 --- a/src/components/common/PromptStore/index.vue +++ b/src/components/common/PromptStore/index.vue @@ -39,6 +39,8 @@ const showModal = ref(false) const importLoading = ref(false) const exportLoading = ref(false) +const searchValue = ref('') + // 移动端自适应相关 const { isMobile } = useBasicLayout() @@ -303,6 +305,17 @@ watch( }, { deep: true }, ) + +const dataSource = computed(() => { + const data = renderTemplate() + const value = searchValue.value + if (value && value !== '') { + return data.filter((item: DataProps) => { + return item.renderKey.includes(value) || item.renderValue.includes(value) + }) + } + return data +})