@@ -4,6 +4,7 @@ import MonacoEditor from '@alilc/lowcode-plugin-base-monaco-editor';
44
55import { Dialog , Message , Button } from '@alifd/next' ;
66
7+ import { common } from '@alilc/lowcode-engine'
78import { Project , Skeleton , Event } from '@alilc/lowcode-shell' ;
89import { IEditorInstance } from '@alilc/lowcode-plugin-base-monaco-editor/lib/helper' ;
910
@@ -16,7 +17,7 @@ interface PluginCodeDiffProps {
1617export default function PluginSchema ( { project, skeleton, event } : PluginCodeDiffProps ) {
1718 const [ editorSize , setEditorSize ] = useState ( { width : 0 , height : 0 } ) ;
1819 const [ schemaValue , setSchemaValue ] = useState ( ( ) => {
19- const schema = project . exportSchema ( )
20+ const schema = project . exportSchema ( common . designerCabin . TransformStage . Save )
2021 return schema ?. componentsTree ?. [ 0 ] ? JSON . stringify ( schema . componentsTree [ 0 ] , null , 2 ) : ''
2122 } ) ;
2223 const monacoEditorRef = useRef < IEditorInstance > ( ) ;
@@ -31,7 +32,7 @@ export default function PluginSchema({ project, skeleton, event }: PluginCodeDif
3132 useEffect ( ( ) => {
3233 event . on ( 'skeleton.panel-dock.active' , ( pluginName ) => {
3334 if ( pluginName == 'LowcodePluginAliLowcodePluginSchema' ) {
34- const schema = project . exportSchema ( )
35+ const schema = project . exportSchema ( common . designerCabin . TransformStage . Save )
3536 const str = schema ?. componentsTree ?. [ 0 ] ? JSON . stringify ( schema . componentsTree [ 0 ] , null , 2 ) : ''
3637 setSchemaValue ( str ) ;
3738 }
@@ -60,7 +61,7 @@ export default function PluginSchema({ project, skeleton, event }: PluginCodeDif
6061 }
6162
6263 project . importSchema ( {
63- ...project . exportSchema ( ) ,
64+ ...project . exportSchema ( common . designerCabin . TransformStage . Save ) ,
6465 componentsTree : [ json ] ,
6566 } ) ;
6667 Message . success ( 'Schema Saved!' ) ;
0 commit comments