mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
style: 完善ts
This commit is contained in:
parent
45d676f38f
commit
f17ff8e58b
@ -155,6 +155,19 @@ export default class StageRender extends EventEmitter {
|
|||||||
return getElById()(this.getDocument(), id);
|
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);
|
injectStyle(this.contentWindow.document, style);
|
||||||
};
|
};
|
||||||
|
|
||||||
private postTmagicRuntimeReady() {
|
|
||||||
this.contentWindow = this.iframe?.contentWindow as RuntimeWindow;
|
|
||||||
|
|
||||||
this.contentWindow.magic = this.getMagicApi();
|
|
||||||
|
|
||||||
this.contentWindow.postMessage(
|
|
||||||
{
|
|
||||||
tmagicRuntimeReady: true,
|
|
||||||
},
|
|
||||||
'*',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ export interface ColumnConfig<T = any> {
|
|||||||
type?: 'popover' | 'expand' | 'component' | string | ((value: any, row: T) => string);
|
type?: 'popover' | 'expand' | 'component' | string | ((value: any, row: T) => string);
|
||||||
text?: string;
|
text?: string;
|
||||||
prop?: string;
|
prop?: string;
|
||||||
|
name?: string;
|
||||||
showHeader?: boolean;
|
showHeader?: boolean;
|
||||||
table?: ColumnConfig[];
|
table?: ColumnConfig[];
|
||||||
formatter?: 'datetime' | ((item: any, row: T) => any);
|
formatter?: 'datetime' | ((item: any, row: T) => any);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user