This commit is contained in:
YunaiV
2024-08-26 21:58:12 +08:00
35 changed files with 807 additions and 144 deletions

View File

@ -165,6 +165,7 @@ $toolbar-position: -55px;
width: 80px;
height: 25px;
font-size: 12px;
color: #6a6a6a;
line-height: 25px;
text-align: center;
background: #fff;

View File

@ -13,9 +13,9 @@
class="mb-4px flex flex-col gap-4px border border-gray-2 border-rounded rounded border-solid p-8px"
>
<!-- 操作按钮区 -->
<div class="m--8px m-b-4px flex flex-row items-center justify-between bg-gray-1 p-8px">
<div class="m--8px m-b-4px flex flex-row items-center justify-between p-8px" style="background-color: var(--app-content-bg-color);">
<el-tooltip content="拖动排序">
<Icon icon="ic:round-drag-indicator" class="drag-icon cursor-move" />
<Icon icon="ic:round-drag-indicator" class="drag-icon cursor-move" style="color: #8a909c;" />
</el-tooltip>
<el-tooltip content="删除">
<Icon

View File

@ -7,26 +7,41 @@ const props = defineProps({
src: propTypes.string.def('')
})
const loading = ref(true)
const height = ref('')
const frameRef = ref<HTMLElement | null>(null)
const init = () => {
height.value = document.documentElement.clientHeight - 94.5 + 'px'
loading.value = false
nextTick(() => {
loading.value = true
if (!frameRef.value) return
frameRef.value.onload = () => {
loading.value = false
}
})
}
onMounted(() => {
setTimeout(() => {
init()
}, 300)
init()
})
watch(
() => props.src,
() => {
init()
}
)
</script>
<template>
<div v-loading="loading" :style="'height:' + height">
<div
v-loading="loading"
class="w-full h-[calc(100vh-var(--top-tool-height)-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-2px)]"
>
<iframe
ref="frameRef"
:src="props.src"
frameborder="no"
frameborder="0"
scrolling="auto"
style="width: 100%; height: 100%"
height="100%"
width="100%"
allowfullscreen="true"
webkitallowfullscreen="true"
mozallowfullscreen="true"
></iframe>
</div>
</template>