code refactor

This commit is contained in:
MaysWind
2023-07-10 00:14:33 +08:00
parent 5e986b2d04
commit 8f44a26037
7 changed files with 37 additions and 7 deletions
+6 -2
View File
@@ -5,7 +5,7 @@
<div class="nav-header">
<router-link to="/" class="app-logo d-flex align-center gap-x-3 app-title-wrapper">
<div class="d-flex">
<img alt="logo" class="main-logo" src="/img/ezbookkeeping-192.png" />
<img alt="logo" class="main-logo" :src="ezBookkeepingLogoPath" />
</div>
<h1 class="font-weight-medium text-xl">{{ $t('global.app.title') }}</h1>
</router-link>
@@ -97,7 +97,7 @@
</v-btn>
<div class="app-logo d-flex align-center gap-x-3 app-title-wrapper" v-if="mdAndDown">
<div class="d-flex">
<img alt="logo" class="main-logo" src="/img/ezbookkeeping-192.png" />
<img alt="logo" class="main-logo" :src="ezBookkeepingLogoPath" />
</div>
<h1 class="font-weight-medium text-xl">{{ $t('global.app.title') }}</h1>
</div>
@@ -186,6 +186,7 @@ import { useRootStore } from '@/stores/index.js';
import { useSettingsStore } from '@/stores/setting.js';
import { useUserStore } from '@/stores/user.js';
import assetConstants from '@/consts/asset.js';
import { getSystemTheme } from '@/lib/ui.js';
import {
@@ -241,6 +242,9 @@ export default {
},
computed: {
...mapStores(useRootStore, useSettingsStore, useUserStore),
ezBookkeepingLogoPath() {
return assetConstants.ezBookkeepingLogoPath;
},
mdAndDown() {
const { mdAndDown } = useDisplay();
return mdAndDown.value;