diff --git a/packages/stage/src/StageRender.ts b/packages/stage/src/StageRender.ts index 713850c7..74ed100d 100644 --- a/packages/stage/src/StageRender.ts +++ b/packages/stage/src/StageRender.ts @@ -155,6 +155,19 @@ export default class StageRender extends EventEmitter { return getElById()(this.getDocument(), id); } + public postTmagicRuntimeReady() { + this.contentWindow = this.iframe?.contentWindow as RuntimeWindow; + + this.contentWindow.magic = this.getMagicApi(); + + this.contentWindow.postMessage( + { + tmagicRuntimeReady: true, + }, + '*', + ); + } + /** * 销毁实例 */ @@ -236,17 +249,4 @@ export default class StageRender extends EventEmitter { injectStyle(this.contentWindow.document, style); }; - - private postTmagicRuntimeReady() { - this.contentWindow = this.iframe?.contentWindow as RuntimeWindow; - - this.contentWindow.magic = this.getMagicApi(); - - this.contentWindow.postMessage( - { - tmagicRuntimeReady: true, - }, - '*', - ); - } } diff --git a/packages/table/src/schema.ts b/packages/table/src/schema.ts index a1a4330a..abeefce9 100644 --- a/packages/table/src/schema.ts +++ b/packages/table/src/schema.ts @@ -46,6 +46,7 @@ export interface ColumnConfig { type?: 'popover' | 'expand' | 'component' | string | ((value: any, row: T) => string); text?: string; prop?: string; + name?: string; showHeader?: boolean; table?: ColumnConfig[]; formatter?: 'datetime' | ((item: any, row: T) => any);