diff --git a/packages/editor/src/layouts/sidebar/ComponentListPanel.vue b/packages/editor/src/layouts/sidebar/ComponentListPanel.vue index b33a910f..032c88cb 100644 --- a/packages/editor/src/layouts/sidebar/ComponentListPanel.vue +++ b/packages/editor/src/layouts/sidebar/ComponentListPanel.vue @@ -71,7 +71,11 @@ const stage = computed(() => editorService.get('stage')); const list = computed(() => componentListService.getList().map((group: ComponentGroup) => ({ ...group, - items: group.items.filter((item: ComponentItem) => item.text.includes(searchText.value)), + items: group.items.filter((item: ComponentItem) => + `${item.text || ''}${item.desc || ''}${item.type}` + .toLocaleLowerCase() + .includes(searchText.value.toLocaleLowerCase()), + ), })), ); diff --git a/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue b/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue index e639ed8e..cbc840c8 100644 --- a/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue +++ b/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue @@ -120,7 +120,7 @@ const filterNodeMethod = (v: string, data: MNode): boolean => { name = 'container'; } - return `${data.id}${name}${data.type}`.includes(v); + return `${data.id}${name}${data.type || ''}`.toLocaleLowerCase().includes(v.toLocaleLowerCase()); }; const { filterTextChangeHandler } = useFilter(nodeData, nodeStatusMap, filterNodeMethod);