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