mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-05 19:41:40 +08:00
chore(tmagic-form-runtime): 销毁app
This commit is contained in:
parent
52f09f9f22
commit
8c9018407a
@ -23,7 +23,7 @@ export const useFormConfig = (props: AppProps) => {
|
||||
// @ts-ignore
|
||||
const formConfig = computed(() => props.fillConfig((config.value?.items || []) as FormConfig, mForm));
|
||||
|
||||
const app: Core | undefined = new Core({
|
||||
let app: Core | undefined = new Core({
|
||||
ua: contentWindow?.navigator.userAgent,
|
||||
platform: 'editor',
|
||||
});
|
||||
@ -137,6 +137,7 @@ export const useFormConfig = (props: AppProps) => {
|
||||
contentWindow?.addEventListener('message', runtimeReadyHandler);
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
app = undefined;
|
||||
contentWindow?.removeEventListener('message', runtimeReadyHandler);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user