pane 相关 bug fix

This commit is contained in:
mario.gk 2020-05-04 18:31:34 +08:00
parent db6f231176
commit c1760da2ed
5 changed files with 29 additions and 82 deletions

View File

@ -2,7 +2,8 @@
"componentName": "Page",
"fileName": "test",
"dataSource": {
"list": []
"list": [],
"online": []
},
"state": {
"text": "outter"

View File

@ -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,
},
});
}

View File

@ -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
}

View File

@ -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';

View File

@ -84,3 +84,7 @@ html.engine-blur #engine {
width: 100%;
white-space: nowrap;
}
.lc-left-float-pane {
font-size: 14px;
}