Browse Source

🕟 优化

master
wangxiang 3 years ago
parent
commit
e63bf3b90a
  1. 6
      kicc-ui/src/views/core/iframe/index.vue

6
kicc-ui/src/views/core/iframe/index.vue

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

Loading…
Cancel
Save