fix: 新增侧边栏和首页

This commit is contained in:
MTrun
2021-12-18 22:05:00 +08:00
parent 90e45f6c23
commit c1daa231b6
29 changed files with 451 additions and 86 deletions
-9
View File
@@ -6,17 +6,8 @@
import { ref, onMounted } from 'vue'
import { useLoadingBar } from 'naive-ui'
import { MainView } from '@/layout/components/Main/index'
const collapsed = ref<boolean>(false)
const watchWidth = () => {
const Width = document.body.clientWidth
if (Width <= 950) {
collapsed.value = true
} else collapsed.value = false
}
onMounted(() => {
window.addEventListener('resize', watchWidth)
//挂载在 window 方便与在js中使用
window['$loading'] = useLoadingBar()
window['$loading'].finish()