File tree 1 file changed +22
-21
lines changed
packages/amis-editor-core/src/store
1 file changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -929,27 +929,7 @@ export const MainStore = types
929
929
930
930
get subEditorValue ( ) {
931
931
if ( self . subEditorContext ) {
932
- let subSchema = self . subEditorContext . slot
933
- ? {
934
- ...mapObject ( self . subEditorContext . slot , function ( value : any ) {
935
- if ( value === '$$' ) {
936
- return self . subEditorContext ! . value ;
937
- }
938
-
939
- return value ;
940
- } ) ,
941
- isSlot : true
942
- }
943
- : self . subEditorContext . value ;
944
-
945
- if ( ! subSchema . definitions ) {
946
- subSchema = {
947
- ...subSchema ,
948
- definitions : modalsToDefinitions ( this . modals )
949
- } ;
950
- }
951
-
952
- return subSchema ;
932
+ return self . subEditorContext . value ;
953
933
}
954
934
955
935
return undefined ;
@@ -2029,8 +2009,29 @@ export const MainStore = types
2029
2009
return ;
2030
2010
}
2031
2011
2012
+ let subSchema = context . slot
2013
+ ? {
2014
+ ...mapObject ( context . slot , function ( value : any ) {
2015
+ if ( value === '$$' ) {
2016
+ return context . value ;
2017
+ }
2018
+
2019
+ return value ;
2020
+ } ) ,
2021
+ isSlot : true
2022
+ }
2023
+ : context . value ;
2024
+
2025
+ if ( ! subSchema . definitions ) {
2026
+ subSchema = {
2027
+ ...subSchema ,
2028
+ definitions : modalsToDefinitions ( self . modals )
2029
+ } ;
2030
+ }
2031
+
2032
2032
self . subEditorContext = {
2033
2033
...context ,
2034
+ value : subSchema ,
2034
2035
hostNode : self . getNodeById ( activeId ) ,
2035
2036
data : createObject (
2036
2037
self . ctx ,
You can’t perform that action at this time.
0 commit comments