update
This commit is contained in:
parent
a7fc7b8007
commit
34926c7270
|
@ -44,7 +44,6 @@
|
|||
"marked": "^15.0.8",
|
||||
"pinia": "^3.0.2",
|
||||
"pinia-plugin-persistedstate": "^4.2.0",
|
||||
"vh-check": "^2.0.5",
|
||||
"vue": "^3.5.13",
|
||||
"vue-router": "^4.5.0"
|
||||
},
|
||||
|
|
11
src/App.vue
11
src/App.vue
|
@ -1,5 +1,16 @@
|
|||
<script setup>
|
||||
import { RouterView } from "vue-router";
|
||||
onMounted(() => {
|
||||
window.addEventListener("resize", ()=>{
|
||||
heightTemp.value = (window.innerHeight)+"px";
|
||||
document.getElementById("app").style.height = heightTemp.value;
|
||||
});
|
||||
window.addEventListener("DOMContentLoaded", ()=>{
|
||||
heightTemp.value = (window.innerHeight)+"px";
|
||||
document.getElementById("app").style.height = heightTemp.value;
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -15,7 +15,7 @@ import Sidebar from '../components/Sidebar.vue'
|
|||
<style scoped>
|
||||
.main-layout {
|
||||
display: flex;
|
||||
height: calc(100vh - var(--vh-offset, 0px));
|
||||
height: 100vh;
|
||||
/* min-width: 640px; */
|
||||
overflow: hidden; /* 防止内部滚动影响布局 */
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import App from "./App.vue";
|
|||
import {router} from "@/router/index";
|
||||
import { createPinia } from "pinia";
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
import vhCheck from 'vh-check'
|
||||
|
||||
// 引入 Element Plus
|
||||
import ElementPlus from 'element-plus'
|
||||
|
@ -21,5 +20,4 @@ app.use(router);
|
|||
app.use(ElementPlus, {
|
||||
locale: zhCn,
|
||||
})
|
||||
app.mount("#app");
|
||||
vhCheck()
|
||||
app.mount("#app");
|
Loading…
Reference in New Issue