refactor:基于 lint 处理排版

This commit is contained in:
YunaiV
2025-04-22 22:10:33 +08:00
parent 3fe36fd823
commit fb785894b6
322 changed files with 4781 additions and 2093 deletions

View File

@@ -1,35 +1,38 @@
<script setup lang="ts">
// TODO @芋艿:貌似不用 src 目录
import { onMounted, ref } from 'vue'
import { onMounted, ref } from 'vue';
interface IFrameProps {
/**
* iframe 的源地址
*/
src: string
/** iframe 的源地址 */
src: string;
}
const props = defineProps<IFrameProps>()
const props = defineProps<IFrameProps>();
const loading = ref(true)
const height = ref('')
const frameRef = ref<HTMLElement | null>(null)
const loading = ref(true);
const height = ref('');
const frameRef = ref<HTMLElement | null>(null);
function init() {
height.value = `${document.documentElement.clientHeight - 94.5}px`
loading.value = false
height.value = `${document.documentElement.clientHeight - 94.5}px`;
loading.value = false;
}
onMounted(() => {
setTimeout(() => {
init()
}, 300)
})
init();
}, 300);
});
// TODO @芋艿:优化:未来使用 vben 自带的内链实现
</script>
<template>
<div v-loading="loading" :style="`height:${height}`">
<iframe ref="frameRef" :src="props.src" style="width: 100%; height: 100%" frameborder="no" scrolling="auto" />
<iframe
ref="frameRef"
:src="props.src"
style="width: 100%; height: 100%"
frameborder="no"
scrolling="auto"
></iframe>
</div>
</template>

View File

@@ -1,3 +1 @@
import IFrame from './iframe.vue'
export { IFrame }
export { default as IFrame } from './iframe.vue';