File tree 1 file changed +20
-6
lines changed
packages/app-backend-vue3/src/components
1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -130,29 +130,34 @@ function processSetupState (instance) {
130
130
131
131
let result : any
132
132
133
+ let isOther = typeof value === 'function' ||
134
+ typeof value ?. render === 'function' ||
135
+ typeof value ?. __asyncLoader === 'function'
136
+
133
137
if ( rawData ) {
134
138
const info = getSetupStateInfo ( rawData )
135
139
136
140
const objectType = info . computed ? 'Computed' : info . ref ? 'Ref' : info . reactive ? 'Reactive' : null
137
141
const isState = info . ref || info . computed || info . reactive
138
- const isOther = typeof value === 'function' || typeof value ?. render === 'function'
139
142
const raw = rawData . effect ?. raw ?. toString ( ) || rawData . effect ?. fn ?. toString ( )
140
143
144
+ if ( objectType ) {
145
+ isOther = false
146
+ }
147
+
141
148
result = {
142
149
...objectType ? { objectType } : { } ,
143
150
...raw ? { raw } : { } ,
144
151
editable : isState && ! info . readonly ,
145
- type : isOther ? 'setup (other)' : 'setup' ,
146
- }
147
- } else {
148
- result = {
149
- type : 'setup' ,
150
152
}
151
153
}
152
154
155
+ const type = isOther ? 'setup (other)' : 'setup'
156
+
153
157
return {
154
158
key,
155
159
value,
160
+ type,
156
161
...result ,
157
162
}
158
163
} )
@@ -207,6 +212,15 @@ export function getCustomObjectDetails (object: any, proto: string): CustomState
207
212
} ,
208
213
}
209
214
}
215
+
216
+ if ( typeof object . __asyncLoader === 'function' ) {
217
+ return {
218
+ _custom : {
219
+ type : 'component-definition' ,
220
+ display : 'Async component definition' ,
221
+ } ,
222
+ }
223
+ }
210
224
}
211
225
212
226
/**
You can’t perform that action at this time.
0 commit comments