chore: 添加打包进度条

This commit is contained in:
xingyu4j
2022-11-23 13:27:18 +08:00
parent bf12cb89df
commit 11770292bb
4 changed files with 45 additions and 7 deletions

View File

@ -5,11 +5,9 @@ const props = defineProps({
src: propTypes.string.def('')
})
const loading = ref(true)
const frameSrc = ref<string>('')
const height = ref('')
const frameRef = ref<HTMLElement | null>(null)
const init = () => {
frameSrc.value = props.src
height.value = document.documentElement.clientHeight - 94.5 + 'px'
loading.value = false
}
@ -22,7 +20,7 @@ onMounted(() => {
<template>
<div v-loading="loading" :style="'height:' + height">
<iframe
:src="frameSrc"
:src="props.src"
style="width: 100%; height: 100%"
frameborder="no"
scrolling="auto"