|
@@ -20,8 +20,9 @@
|
|
|
import { useLayoutHeight } from '@/layouts/default/content/useContentViewHeight';
|
|
|
|
|
|
const emit = defineEmits(['message']);
|
|
|
- defineProps({
|
|
|
+ const props = defineProps({
|
|
|
frameSrc: propTypes.string.def(''),
|
|
|
+ height: propTypes.number,
|
|
|
});
|
|
|
|
|
|
const loading = ref(true);
|
|
@@ -44,11 +45,16 @@
|
|
|
if (!iframe) {
|
|
|
return;
|
|
|
}
|
|
|
- const top = headerHeightRef.value;
|
|
|
- topRef.value = top;
|
|
|
- heightRef.value = window.innerHeight - top;
|
|
|
- const clientHeight = document.documentElement.clientHeight - top;
|
|
|
- iframe.style.height = `${clientHeight}px`;
|
|
|
+ if (props.height) {
|
|
|
+ heightRef.value = props.height;
|
|
|
+ iframe.style.height = `${props.height}px`;
|
|
|
+ } else {
|
|
|
+ const top = headerHeightRef.value;
|
|
|
+ topRef.value = top;
|
|
|
+ heightRef.value = window.innerHeight - top;
|
|
|
+ const clientHeight = document.documentElement.clientHeight - top;
|
|
|
+ iframe.style.height = `${clientHeight}px`;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function hideLoading() {
|