From d7463ea85834a44d7c6da8dce9673a99da2500bb Mon Sep 17 00:00:00 2001 From: kangwei Date: Mon, 18 May 2020 12:30:51 +0800 Subject: [PATCH] general --- packages/demo/src/editor/components.ts | 2 ++ packages/demo/src/editor/config.js | 8 +++----- packages/plugin-components-pane/src/index.tsx | 11 ++++++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/demo/src/editor/components.ts b/packages/demo/src/editor/components.ts index 03c6a3e3b..8390b622e 100644 --- a/packages/demo/src/editor/components.ts +++ b/packages/demo/src/editor/components.ts @@ -2,6 +2,7 @@ import logo from '@ali/lowcode-plugin-sample-logo'; import samplePreview from '@ali/lowcode-plugin-sample-preview'; //import undoRedo from '@ali/lowcode-plugin-undo-redo'; import componentsPane from '@ali/lowcode-plugin-components-pane'; +import outline, { OutlinePane } from '@ali/lowcode-plugin-outline-pane'; import zhEn from '@ali/lowcode-plugin-zh-en'; import eventBindDialog from '@ali/lowcode-plugin-event-bind-dialog'; import variableBindDialog from '@ali/lowcode-plugin-variable-bind-dialog'; @@ -12,6 +13,7 @@ export default { samplePreview, //undoRedo, componentsPane, + outline, zhEn, eventBindDialog, variableBindDialog, diff --git a/packages/demo/src/editor/config.js b/packages/demo/src/editor/config.js index e76596f63..91de783fe 100644 --- a/packages/demo/src/editor/config.js +++ b/packages/demo/src/editor/config.js @@ -45,28 +45,26 @@ export default { props: { align: 'top', icon: 'zujianku', - title: '组件库', + description: '组件库', }, pluginProps: {}, }, { - pluginKey: 'outlinePane', + pluginKey: 'outline', type: 'PanelIcon', props: { align: 'top', icon: 'shuxingkongjian', - title: '大纲树', + description: '大纲树', }, pluginProps: {}, }, - { pluginKey: 'sourceEditor', type: 'PanelIcon', props: { align: 'top', icon: 'zujianku', - title: '组件库', panelProps: { floatable: true, defaultWidth: 500, diff --git a/packages/plugin-components-pane/src/index.tsx b/packages/plugin-components-pane/src/index.tsx index 7c5540f79..b046f135f 100644 --- a/packages/plugin-components-pane/src/index.tsx +++ b/packages/plugin-components-pane/src/index.tsx @@ -69,11 +69,12 @@ export default class ComponentListPlugin extends PureComponent { + debugger; const { editor } = this.props; const assets = editor.get('assets') || {}; const list: string[] = []; const libs: LibrayInfo[] = []; - Object.values(assets.packages).forEach((item: any): void => { + assets.packages.forEach((item: any): void => { list.push(item.library); libs.push({ label: item.title, @@ -96,8 +97,12 @@ export default class ComponentListPlugin extends PureComponent {