File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/editor-skeleton/src Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ export class Skeleton implements ISkeleton {
386386 if ( isPanelDockConfig ( config ) ) {
387387 widget = new PanelDock ( this , config ) ;
388388 } else if ( false ) {
389- // DialogDock
389+ // TODO DialogDock
390390 // others...
391391 } else {
392392 widget = new Dock ( this , config ) ;
@@ -458,7 +458,8 @@ export class Skeleton implements ISkeleton {
458458 }
459459 const { content, ...restConfig } = config ;
460460 if ( content ) {
461- if ( isPlainObject ( content ) && ( isReactComponent ( content ) || ! isValidElement ( content ) ) ) {
461+ // 对象配置进行拆分
462+ if ( isPlainObject ( content ) && ! isReactComponent ( content ) && ! isValidElement ( content ) ) {
462463 Object . keys ( content ) . forEach ( ( key : any ) => {
463464 if ( / p r o p s $ / i. test ( key ) && restConfig [ key ] ) {
464465 restConfig [ key ] = {
@@ -469,6 +470,9 @@ export class Skeleton implements ISkeleton {
469470 restConfig [ key ] = ( content as unknown as IPublicTypePanelConfig ) [ key ] ;
470471 }
471472 } ) ;
473+ } else if ( Array . isArray ( content ) ) {
474+ // 数组配置
475+ restConfig . content = content ;
472476 } else {
473477 restConfig . content = content ;
474478 }
You can’t perform that action at this time.
0 commit comments