feat(projects): 1.0 beta

This commit is contained in:
Soybean
2023-11-17 08:45:00 +08:00
parent 1ea4817f6a
commit e918a2c0f5
499 changed files with 15918 additions and 24708 deletions

13
src/router/guard/title.ts Normal file
View File

@@ -0,0 +1,13 @@
import { $t } from '@/locales';
import { useTitle } from '@vueuse/core';
import type { Router } from 'vue-router';
export function createDocumentTitleGuard(router: Router) {
router.afterEach(to => {
const { i18nKey, title } = to.meta;
const documentTitle = i18nKey ? $t(i18nKey) : title;
useTitle(documentTitle);
});
}