feat: 完善模版
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + Vue + TS</title>
|
||||
<title>chat</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -2,7 +2,5 @@
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>Vite + Vue + TS</div>
|
||||
<RouterView />
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -3,7 +3,21 @@
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>444</div>
|
||||
<div class=" h-screen flex overflow-hidden">
|
||||
<div class="flex-none w-[200px] h-full flex flex-col">
|
||||
<router-link
|
||||
class="w-full h-[52px] px-8 flex items-center cursor-pointer" :class="$route.path === '/'
|
||||
? [
|
||||
'bg-[rgba(37,99,235,0.04)] text-[#2563EB] border-r-2 border-[#2563EB]',
|
||||
]
|
||||
: []
|
||||
" to="/"
|
||||
>
|
||||
聊天
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="flex-1 relative">
|
||||
<RouterView />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -62,7 +62,7 @@ const router = createRouter({
|
||||
// };
|
||||
|
||||
// // 添加导航守卫
|
||||
// eslint-disable-next-line unused-imports/no-unused-vars
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
setTitle(to.meta.title as string)
|
||||
resetDescription()
|
||||
@@ -70,6 +70,7 @@ router.beforeEach((to, from, next) => {
|
||||
// context.loadingBar?.start();
|
||||
// 在每个路由导航前执行权限检查
|
||||
// checkPermission(to, from, next);
|
||||
next()
|
||||
})
|
||||
|
||||
// router.afterEach(() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useTitle } from '@vueuse/core'
|
||||
|
||||
const DEFAULT_TITLE = 'Vue3 AdminVite + Vue + TS'
|
||||
const DEFAULT_TITLE = 'Agent'
|
||||
|
||||
const DEFAULT_DESCRIPTION = document
|
||||
.querySelector('meta[name=\'description\']')
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
123123
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
]
|
||||
},
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
@@ -14,5 +15,10 @@
|
||||
"erasableSyntaxOnly": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"auto-imports.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user