|
|
|
@ -28,10 +28,8 @@
@@ -28,10 +28,8 @@
|
|
|
|
|
const heightRef = ref(window.innerHeight); |
|
|
|
|
const frameRef = ref<HTMLFrameElement>(); |
|
|
|
|
const { headerHeightRef } = useLayoutHeight(); |
|
|
|
|
|
|
|
|
|
const { prefixCls } = useDesign('iframe-page'); |
|
|
|
|
useWindowSizeFn(calcHeight, 150, { immediate: true }); |
|
|
|
|
|
|
|
|
|
const getWrapStyle = computed((): CSSProperties => { |
|
|
|
|
return { |
|
|
|
|
height: `${unref(heightRef)}px`, |
|
|
|
@ -40,9 +38,7 @@
@@ -40,9 +38,7 @@
|
|
|
|
|
|
|
|
|
|
function calcHeight() { |
|
|
|
|
const iframe = unref(frameRef); |
|
|
|
|
if (!iframe) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!iframe) return; |
|
|
|
|
const top = headerHeightRef.value; |
|
|
|
|
topRef.value = top; |
|
|
|
|
heightRef.value = window.innerHeight - top; |
|
|
|
|