fix: iframe
This commit is contained in:
@@ -6,7 +6,7 @@ interface IFrameProps {
|
|||||||
src: string;
|
src: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<IFrameProps>();
|
defineProps<IFrameProps>();
|
||||||
|
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const height = ref('');
|
const height = ref('');
|
||||||
@@ -22,15 +22,14 @@ onMounted(() => {
|
|||||||
init();
|
init();
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
});
|
||||||
// TODO @芋艿:优化:未来使用 vben 自带的内链实现
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" :style="`height:${height}`">
|
<div v-loading="loading" :style="`height:${height}`">
|
||||||
<iframe
|
<iframe
|
||||||
ref="frameRef"
|
ref="frameRef"
|
||||||
:src="props.src"
|
:src="src"
|
||||||
style="width: 100%; height: 100%"
|
class="h-full w-full"
|
||||||
frameborder="no"
|
frameborder="no"
|
||||||
scrolling="auto"
|
scrolling="auto"
|
||||||
></iframe>
|
></iframe>
|
||||||
|
|||||||
Reference in New Issue
Block a user