|
@@ -13,6 +13,7 @@ export default defineComponent({
|
|
|
const removeVisiable = ref(false);
|
|
|
const userStore = useUserStore();
|
|
|
const Authorization = userStore.getToken || '';
|
|
|
+ const iframeRef = ref();
|
|
|
console.log(Authorization);
|
|
|
const data = reactive({
|
|
|
src: `${
|
|
@@ -44,7 +45,7 @@ export default defineComponent({
|
|
|
});
|
|
|
return () => (
|
|
|
<div class={styles.wrap}>
|
|
|
- <iframe src={data.src}></iframe>
|
|
|
+ <iframe ref={iframeRef} src={data.src}></iframe>
|
|
|
|
|
|
<NModal
|
|
|
v-model:show={previewModal.value}
|
|
@@ -78,6 +79,13 @@ export default defineComponent({
|
|
|
previewModal.value = false;
|
|
|
previewParams.value.url = '';
|
|
|
removeVisiable.value = false;
|
|
|
+ // 给制谱发消息
|
|
|
+ iframeRef.value.contentWindow.postMessage(
|
|
|
+ {
|
|
|
+ api: 'reload'
|
|
|
+ },
|
|
|
+ '*'
|
|
|
+ );
|
|
|
}}>
|
|
|
确定
|
|
|
</NButton>
|