refactor(projects): 代码优化

This commit is contained in:
Soybean
2022-04-22 09:00:21 +08:00
parent 219f87f467
commit 5e276421ad
9 changed files with 59 additions and 68 deletions

View File

@ -8,6 +8,7 @@
</template>
<script setup lang="ts">
import { RouterLink } from 'vue-router';
import { routePath } from '@/router';
import { useAppInfo } from '@/composables';

View File

@ -49,9 +49,9 @@ const route = useRoute();
const app = useAppStore();
const theme = useThemeStore();
const { routerPush } = useRouterPush();
const { title } = useAppInfo();
const showDrawer = computed(() => (props.visible && props.menus.length) || app.mixSiderFixed);
const { title } = useAppInfo();
const activeKey = computed(() => route.name as string);
const expandedKeys = ref<string[]>([]);

View File

@ -3,7 +3,7 @@
type="primary"
:class="[{ '!right-330px': app.settingDrawerVisible }, app.settingDrawerVisible ? 'ease-out' : 'ease-in']"
class="fixed top-240px right-14px z-10000 w-42px h-42px !p-0 transition-all duration-300"
@click="app.toggleSettingdrawerVisible"
@click="app.toggleSettingDrawerVisible"
>
<icon-ant-design-close-outlined v-if="app.settingDrawerVisible" class="text-24px" />
<icon-ant-design-setting-outlined v-else class="text-24px" />