feat: 添加 Husky 和 commit 限制配置

This commit is contained in:
zhongyidian committed 2025-09-14 11:38:52 +08:00
commit 27e0c23b3f
125 files changed
+5760

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'Home',
component: () => import('@/views/home/index.vue'),
meta: {
title: '首页'
}
},
{
path: '/guide',
name: 'Guide',
component: () => import('@/views/guide/index.vue'),
meta: {
title: '使用引导'
}
},
{
path: '/action',
name: 'Action',
component: () => import('@/views/home/action.vue'),
meta: {
title: '开始拍摄'
}
}
]
const router = createRouter({
history: createWebHistory(),
routes
})
// 路由守卫
router.beforeEach((to, _from, next) => {
// 设置页面标题
if (to.meta?.title) {
document.title = `${to.meta.title} - 短视频达人`
}
next()
})
export default router