邓洁 : 适配大屏

This commit is contained in:
邓洁
2023-12-07 21:21:19 +08:00
parent 2b7115d7c1
commit bf564e8e9b
5 changed files with 61 additions and 6 deletions

View File

@@ -10,6 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"autofit.js": "^3.0.4",
"axios": "^1.4.0", "axios": "^1.4.0",
"echarts": "^5.4.2", "echarts": "^5.4.2",
"element-plus": "^2.3.5", "element-plus": "^2.3.5",

View File

@@ -1,7 +1,31 @@
<template> <template>
<RouterView /> <RouterView/>
</template> </template>
<script setup> <script setup>
import autofit from 'autofit.js';
onMounted(() => {
autofit.init({
dh: 2160,
dw: 3840,
el: "#app",
resize: true,
ignore: [
{
el: "#tunnel-box", //必填
height: "100vh", //可选,需注明单位
width: "100vw", //可选,需注明单位
}, {
el: "#login-box", //必填
height: "100vh", //可选,需注明单位
width: "100vw", //可选,需注明单位
},{
el: "#chat-box", //必填
height: "100vh", //可选,需注明单位
width: "100vw", //可选,需注明单位
}
],
});
});
</script> </script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div id="chat-box">
<div class="chat-box"> <div class="chat-box">
<div> <div>
<span>请输入序列号: </span> <span>请输入序列号: </span>
@@ -127,4 +127,4 @@ const handleClear = () => {
top: 0; top: 0;
right: 0; right: 0;
} }
</style> </style>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="login-box"> <div class="login-box" id="login-box">
<el-form <el-form
:model="loginForm" :model="loginForm"
ref="formInstance" ref="formInstance"

View File

@@ -1,9 +1,39 @@
<template> <template>
<tunnel-scene /> <div class="home">
<div class="home-left">
<div class="example">
</div>
</div>
<div class="center">
<tunnel-scene id="tunnel-box"/>
</div>
<div class="home-right">
</div>
</div>
</template> </template>
<script setup> <script setup>
import TunnelScene from "@/components/content/tunnelScene/TunnelScene.vue"; import TunnelScene from "@/components/content/tunnelScene/TunnelScene.vue";
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
.home {
position: relative;
pointer-events: none;
.home-left {
z-index: 2;
position: absolute;
top: 0;
left: 0;
.example {
width: 830px;
height: 521px;
background-color: #fff;
opacity: 0.5;
}
}
}
</style>