mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-02-28 04:40:32 +00:00
pane 相关 bug fix
This commit is contained in:
parent
db6f231176
commit
c1760da2ed
@ -2,7 +2,8 @@
|
|||||||
"componentName": "Page",
|
"componentName": "Page",
|
||||||
"fileName": "test",
|
"fileName": "test",
|
||||||
"dataSource": {
|
"dataSource": {
|
||||||
"list": []
|
"list": [],
|
||||||
|
"online": []
|
||||||
},
|
},
|
||||||
"state": {
|
"state": {
|
||||||
"text": "outter"
|
"text": "outter"
|
||||||
|
|||||||
@ -327,85 +327,30 @@ function initActionPane() {
|
|||||||
|
|
||||||
// 操作历史与页面历史面板
|
// 操作历史与页面历史面板
|
||||||
function initHistoryPane() {
|
function initHistoryPane() {
|
||||||
// let historyConfigs = {getDesignerModuleConfigs(
|
if (typeof HistoryPane === 'function') {
|
||||||
// this.designerConfigs,
|
Panes.add({
|
||||||
// 'history',
|
...HistoryPane({
|
||||||
// )};
|
showPageHistory: true,
|
||||||
let historyConfigs = {
|
historyManager: PageHistoryManager.getManager(),
|
||||||
|
historyConfigs: {
|
||||||
enableRedoAndUndo: true,
|
enableRedoAndUndo: true,
|
||||||
enablePageHistory: 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,
|
index: -940,
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Panes.add(HistoryPane, {
|
Panes.add({
|
||||||
|
...HistoryPane,
|
||||||
index: -940,
|
index: -940,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 页面历史 UI 面板
|
// 页面历史 UI 面板
|
||||||
if (
|
|
||||||
PageHistoryPane
|
|
||||||
&& !isDemoMode
|
|
||||||
&& isEnvSupportsHistoryPane
|
|
||||||
) {
|
|
||||||
console.log(1111, PageHistoryPane({
|
|
||||||
historyManager: PageHistoryManager.getManager(),
|
|
||||||
app: {},
|
|
||||||
}))
|
|
||||||
Panes.add(PageHistoryPane, {
|
Panes.add(PageHistoryPane, {
|
||||||
props : {
|
props : {
|
||||||
historyManager: {
|
historyManager: {
|
||||||
historyManager,
|
historyManager: PageHistoryManager.getManager(),
|
||||||
app: {
|
app: {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -414,7 +359,6 @@ function initHistoryPane() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
|
|||||||
@ -74,8 +74,6 @@ export default class Panel implements IWidget {
|
|||||||
);
|
);
|
||||||
content.forEach((item) => this.add(item));
|
content.forEach((item) => this.add(item));
|
||||||
}
|
}
|
||||||
// compatiable for vision, init at first
|
|
||||||
this.initBody();
|
|
||||||
// todo: process shortcut
|
// todo: process shortcut
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin
|
|||||||
onDestroy: destroy,
|
onDestroy: destroy,
|
||||||
},
|
},
|
||||||
contentProps: props,
|
contentProps: props,
|
||||||
index: props?.index,
|
index: index || props?.index,
|
||||||
};
|
};
|
||||||
if (type === 'dock') {
|
if (type === 'dock') {
|
||||||
newConfig.type = 'PanelDock';
|
newConfig.type = 'PanelDock';
|
||||||
|
|||||||
@ -84,3 +84,7 @@ html.engine-blur #engine {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lc-left-float-pane {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user