init: 初始系统模板

This commit is contained in:
TsMask
2023-09-05 14:38:23 +08:00
parent a5bc16ae4f
commit 1075c8ae4f
130 changed files with 22531 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
<script lang="ts" setup>
import { reactive, ref, onMounted } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const height = ref<string>(document.documentElement.clientHeight - 94.5 + 'px');
const props = defineProps({
src: {
type: String,
required: true,
},
});
let iframe = reactive({
id: 'link',
src: props.src,
});
onMounted(() => {
if (route.name) {
iframe.id = route.name.toString();
}
window.onresize = () => {
height.value = document.documentElement.clientHeight - 94.5 + 'px;';
};
});
</script>
<template>
<div :style="'height:' + height">
<iframe
:id="iframe.id"
:src="iframe.src"
frameborder="no"
style="width: 100%; height: 100%"
scrolling="auto"
></iframe>
</div>
</template>
<style lang="less" scoped></style>