diff --git a/packages/editor/src/Editor.vue b/packages/editor/src/Editor.vue index 15c34a36..47fa237c 100644 --- a/packages/editor/src/Editor.vue +++ b/packages/editor/src/Editor.vue @@ -33,6 +33,10 @@ + + diff --git a/packages/editor/src/layouts/sidebar/ComponentListPanel.vue b/packages/editor/src/layouts/sidebar/ComponentListPanel.vue index db899a14..33cc2b9f 100644 --- a/packages/editor/src/layouts/sidebar/ComponentListPanel.vue +++ b/packages/editor/src/layouts/sidebar/ComponentListPanel.vue @@ -2,31 +2,34 @@ - - - - + + + + + + + @@ -65,8 +68,8 @@ const services = inject('services'); const stageOptions = inject('stageOptions'); const stage = computed(() => services?.editorService.get('stage')); -const list = computed(() => - services?.componentListService.getList().map((group: ComponentGroup) => ({ +const list = computed(() => + (services?.componentListService.getList() || []).map((group: ComponentGroup) => ({ ...group, items: group.items.filter((item: ComponentItem) => item.text.includes(searchText.value)), })), diff --git a/packages/editor/src/layouts/sidebar/Sidebar.vue b/packages/editor/src/layouts/sidebar/Sidebar.vue index c6c6675e..581c7968 100644 --- a/packages/editor/src/layouts/sidebar/Sidebar.vue +++ b/packages/editor/src/layouts/sidebar/Sidebar.vue @@ -29,6 +29,18 @@ v-bind="config.props || {}" v-on="config?.listeners || {}" > + +