mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix: 🐛 save and generator last page
This commit is contained in:
parent
6c3ae36bca
commit
3e4254c9d3
@ -38,7 +38,6 @@ const Codeout = ({ editor }: PluginProps) => {
|
||||
}));
|
||||
|
||||
const fullSchema = {
|
||||
...designer.schema,
|
||||
config: {
|
||||
historyMode: 'hash',
|
||||
targetRootID: 'J_Container',
|
||||
@ -47,6 +46,7 @@ const Codeout = ({ editor }: PluginProps) => {
|
||||
name: 'demoproject',
|
||||
},
|
||||
componentsMap,
|
||||
componentsTree: [designer.schema.componentsTree[designer.schema.componentsTree.length - 1]],
|
||||
};
|
||||
|
||||
console.info('codeout schema:', fullSchema);
|
||||
|
||||
@ -24,7 +24,7 @@ const Codeout = ({ editor }: PluginProps) => {
|
||||
const handleSaveClick = () => {
|
||||
const designer = editor.get(Designer);
|
||||
if (designer) {
|
||||
const schema = designer.schema.componentsTree[0]; // editor.get('schema');
|
||||
const schema = designer.schema.componentsTree[designer.schema.componentsTree.length - 1]; // editor.get('schema');
|
||||
const schemaStr = JSON.stringify(schema);
|
||||
window.localStorage.setItem('schema_data', schemaStr);
|
||||
console.info('save schema:', schemaStr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user