|
@@ -47,6 +47,7 @@ export const Model = defineComponent({
|
|
|
if (urls[type] !== url.value) {
|
|
|
setTimeout(() => {
|
|
|
const hook = (iframeRef.value?.contentWindow as any)?.beforeDestroy
|
|
|
+ console.log(hook)
|
|
|
if (hook) {
|
|
|
hook()
|
|
|
setTimeout(() => url.value = urls[type], 300)
|
|
@@ -58,12 +59,16 @@ export const Model = defineComponent({
|
|
|
})
|
|
|
|
|
|
|
|
|
+
|
|
|
const fuseRef = ref<HTMLDivElement>()
|
|
|
const iframeRef = ref<HTMLIFrameElement>()
|
|
|
|
|
|
watch(
|
|
|
- () => modelProps.type,
|
|
|
- async (type, oldType, onCleanup) => {
|
|
|
+ () => [modelProps.type, url.value],
|
|
|
+ async ([type, url], oldType, onCleanup) => {
|
|
|
+ if (type !== fuseModel && !url) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
const callback = modelProps.callback
|
|
|
|
|
|
await nextTick()
|