diff --git a/packages/demo/public/schema.json b/packages/demo/public/schema.json index 1c7d2a300..591992766 100644 --- a/packages/demo/public/schema.json +++ b/packages/demo/public/schema.json @@ -2,7 +2,8 @@ "componentName": "Page", "fileName": "test", "dataSource": { - "list": [] + "list": [], + "online": [] }, "state": { "text": "outter" diff --git a/packages/demo/src/vision/index.ts b/packages/demo/src/vision/index.ts index d0cc40504..fce7f2400 100644 --- a/packages/demo/src/vision/index.ts +++ b/packages/demo/src/vision/index.ts @@ -327,93 +327,37 @@ function initActionPane() { // 操作历史与页面历史面板 function initHistoryPane() { - // let historyConfigs = {getDesignerModuleConfigs( - // this.designerConfigs, - // 'history', - // )}; - let historyConfigs = { - enableRedoAndUndo: true, - enablePageHistory: true, - };; - - // if (!historyConfigs) { - // return; - // } - - // if (historyConfigs === true) { - // historyConfigs = { - // enableRedoAndUndo: true, - // enablePageHistory: true, - // }; - // } - - // if (historyConfigs.enableRedoAndUndo === undefined) { - // historyConfigs.enableRedoAndUndo = true; - // } - // if (historyConfigs.enablePageHistory === undefined) { - // historyConfigs.enablePageHistory = true; - // } - - const isDemoMode = false; - const isEnvSupportsHistoryPane = true; - const historyManager = PageHistoryManager.getManager(); - - console.log('PageHistoryManager', historyManager); - console.log('PageHistoryManager.onOpenPane', historyManager.onOpenPane); - // 历史撤销、重做以及唤起页面历史按钮 if (typeof HistoryPane === 'function') { - // const historyPane = { - // ...HistoryPane({ - // showPageHistory: - // isEnvSupportsHistoryPane - // // && this.app.isForm() - // && !isDemoMode, - // historyManager, - // historyConfigs, - // }), - // index: -940, - // }; - // console.log('aaaaaa', historyPane); - - Panes.add(HistoryPane, { - props : { - showPageHistory: - isEnvSupportsHistoryPane - // && this.app.isForm() - && !isDemoMode, - historyManager, - historyConfigs, - index: -940, - } + Panes.add({ + ...HistoryPane({ + showPageHistory: true, + historyManager: PageHistoryManager.getManager(), + historyConfigs: { + enableRedoAndUndo: true, + enablePageHistory: true, + }, + }), + index: -940, }); } else { - Panes.add(HistoryPane, { + Panes.add({ + ...HistoryPane, index: -940, }); } // 页面历史 UI 面板 - if ( - PageHistoryPane - && !isDemoMode - && isEnvSupportsHistoryPane - ) { - console.log(1111, PageHistoryPane({ - historyManager: PageHistoryManager.getManager(), - app: {}, - })) - Panes.add(PageHistoryPane, { - props : { - historyManager: { - historyManager, - app: { - - } - }, - index: -940, + Panes.add(PageHistoryPane, { + props : { + historyManager: { + historyManager: PageHistoryManager.getManager(), + app: { + + } }, - }); - } + index: -940, + }, + }); } diff --git a/packages/editor-skeleton/src/widget/panel.ts b/packages/editor-skeleton/src/widget/panel.ts index d0336fe6c..f03e6a130 100644 --- a/packages/editor-skeleton/src/widget/panel.ts +++ b/packages/editor-skeleton/src/widget/panel.ts @@ -74,8 +74,6 @@ export default class Panel implements IWidget { ); content.forEach((item) => this.add(item)); } - // compatiable for vision, init at first - this.initBody(); // todo: process shortcut } diff --git a/packages/vision-preset/src/panes.ts b/packages/vision-preset/src/panes.ts index 80bc2aabb..3604e6186 100644 --- a/packages/vision-preset/src/panes.ts +++ b/packages/vision-preset/src/panes.ts @@ -63,7 +63,7 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin onDestroy: destroy, }, contentProps: props, - index: props?.index, + index: index || props?.index, }; if (type === 'dock') { newConfig.type = 'PanelDock'; diff --git a/packages/vision-preset/src/vision.less b/packages/vision-preset/src/vision.less index 492464688..b87da9230 100644 --- a/packages/vision-preset/src/vision.less +++ b/packages/vision-preset/src/vision.less @@ -84,3 +84,7 @@ html.engine-blur #engine { width: 100%; white-space: nowrap; } + +.lc-left-float-pane { + font-size: 14px; +}