refactor(projects): basicLayout重构初步

This commit is contained in:
Soybean
2021-11-18 02:04:50 +08:00
parent 7925a69b64
commit 33770d2356
46 changed files with 1378 additions and 2 deletions

View File

@ -0,0 +1,41 @@
<template>
<div class="multi-tab flex-center w-full pl-16px bg-light dark:bg-dark">
<div class="flex-1-hidden h-full">
<better-scroll :options="{ scrollX: true, scrollY: false, click: true }">
<multi-tab />
</better-scroll>
</div>
<reload-button />
</div>
</template>
<script lang="ts" setup>
import { watch } from 'vue';
import { useRoute } from 'vue-router';
import { useAppStore } from '@/store';
import { BetterScroll } from '@/components';
import { MultiTab, ReloadButton } from './components';
const route = useRoute();
const { initMultiTab, addMultiTab, setActiveMultiTab } = useAppStore();
function init() {
initMultiTab();
}
watch(
() => route.fullPath,
newValue => {
addMultiTab(route);
setActiveMultiTab(newValue);
}
);
// 初始化
init();
</script>
<style scoped>
.multi-tab {
box-shadow: 0 1px 4px rgb(0 21 41 / 8%);
}
</style>