Commit 7bd5af76fceaddd49b77aabba745dcd0d1321072

Authored by fengwotao
1 parent c61c5993

feat(src/views/chart/ContentCharts/components/ChartsSearch): 修复搜索组件未过滤隐藏的组件

... ... @@ -82,7 +82,9 @@ import { fetchConfigComponent, fetchChartComponent } from '@/packages/index'
82 82 import { componentInstall, loadingStart, loadingFinish, loadingError } from '@/utils'
83 83 import { ChartGlobImage } from '@/components/Pages/ChartGlobImage'
84 84 import { Icon } from '@iconify/vue'
85   -
  85 +// THINGS_KIT 修改搜索未过滤隐藏的组件
  86 +import { hideAsideComponentsObj } from '../../external/components/ChartsOptionContent/config'
  87 +//
86 88 const props = defineProps({
87 89 menuOptions: {
88 90 type: Array,
... ... @@ -136,6 +138,9 @@ const searchHandle = (key: string | null) => {
136 138 searchRes.value = List.filter(
137 139 (e: ConfigType) => !e.disabled && (!key || e.title.toLowerCase().includes(key.toLowerCase()))
138 140 )
  141 + // THINGS_KIT 修改搜索未过滤隐藏的组件
  142 + searchRes.value = searchRes.value.filter((e: ConfigType) =>!hideAsideComponentsObj['all'].includes(e.chartKey))
  143 + //
139 144 setTimeout(() => {
140 145 loading.value = undefined
141 146 }, 500)
... ...