mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-23 09:58:12 +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 = {
|
const fullSchema = {
|
||||||
...designer.schema,
|
|
||||||
config: {
|
config: {
|
||||||
historyMode: 'hash',
|
historyMode: 'hash',
|
||||||
targetRootID: 'J_Container',
|
targetRootID: 'J_Container',
|
||||||
@ -47,6 +46,7 @@ const Codeout = ({ editor }: PluginProps) => {
|
|||||||
name: 'demoproject',
|
name: 'demoproject',
|
||||||
},
|
},
|
||||||
componentsMap,
|
componentsMap,
|
||||||
|
componentsTree: [designer.schema.componentsTree[designer.schema.componentsTree.length - 1]],
|
||||||
};
|
};
|
||||||
|
|
||||||
console.info('codeout schema:', fullSchema);
|
console.info('codeout schema:', fullSchema);
|
||||||
|
|||||||
@ -24,7 +24,7 @@ const Codeout = ({ editor }: PluginProps) => {
|
|||||||
const handleSaveClick = () => {
|
const handleSaveClick = () => {
|
||||||
const designer = editor.get(Designer);
|
const designer = editor.get(Designer);
|
||||||
if (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);
|
const schemaStr = JSON.stringify(schema);
|
||||||
window.localStorage.setItem('schema_data', schemaStr);
|
window.localStorage.setItem('schema_data', schemaStr);
|
||||||
console.info('save schema:', schemaStr);
|
console.info('save schema:', schemaStr);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user