修复固定header后没有回到顶部的bug,修复拉取项目后运行不起来的bug

This commit is contained in:
wjs0509 2021-08-20 18:58:52 +08:00
parent ea5dccebe6
commit 25fa3536de
3 changed files with 6 additions and 6 deletions

View File

@ -3,9 +3,9 @@
<ColumnsAside />
<div class="layout-columns-warp">
<Aside />
<el-container class="flex-center layout-backtop">
<el-container class="flex-center layout-backtop" :class="{'layout-backtop':!isFixedHeader}">
<Header v-if="isFixedHeader" />
<el-scrollbar>
<el-scrollbar :class="{'layout-backtop':isFixedHeader}">
<Header v-if="!isFixedHeader" />
<Main />
</el-scrollbar>

View File

@ -1,9 +1,9 @@
<template>
<el-container class="layout-container">
<Aside />
<el-container class="flex-center layout-backtop">
<el-container class="flex-center" :class="{'layout-backtop':!isFixedHeader}">
<Header v-if="isFixedHeader" />
<el-scrollbar ref="layoutDefaultsScrollbarRef">
<el-scrollbar ref="layoutDefaultsScrollbarRef" :class="{'layout-backtop':isFixedHeader}">
<Header v-if="!isFixedHeader" />
<Main />
</el-scrollbar>
@ -23,7 +23,7 @@ export default {
name: 'layoutDefaults',
components: { Aside, Header, Main },
setup() {
const { proxy } = getCurrentInstance();
const { proxy }:any = getCurrentInstance();
const store = useStore();
const route = useRoute();
const isFixedHeader = computed(() => {

View File

@ -10,7 +10,7 @@ const pathResolve = (dir: string): any => {
const { VITE_PORT, VITE_OPEN, VITE_PUBLIC_PATH } = loadEnv();
const alias: Record<string, string> = {
'/@': pathResolve('/src/'),
'/@': pathResolve('./src/'),
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
};