Skip to content

Commit

Permalink
style: 完善ts
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Sep 5, 2024
1 parent f9a1273 commit ca21dbc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
26 changes: 13 additions & 13 deletions packages/stage/src/StageRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
'*',
);
}

/**
* 销毁实例
*/
Expand Down Expand Up @@ -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,
},
'*',
);
}
}
1 change: 1 addition & 0 deletions packages/table/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export interface ColumnConfig<T = any> {
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);
Expand Down

0 comments on commit ca21dbc

Please sign in to comment.