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 +})