feat: 完善模版
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + Vue + TS</title>
|
<title>chat</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -2,7 +2,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>Vite + Vue + TS</div>
|
<RouterView />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|||||||
@@ -3,7 +3,21 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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>
|
</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) => {
|
router.beforeEach((to, from, next) => {
|
||||||
setTitle(to.meta.title as string)
|
setTitle(to.meta.title as string)
|
||||||
resetDescription()
|
resetDescription()
|
||||||
@@ -70,6 +70,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
// context.loadingBar?.start();
|
// context.loadingBar?.start();
|
||||||
// 在每个路由导航前执行权限检查
|
// 在每个路由导航前执行权限检查
|
||||||
// checkPermission(to, from, next);
|
// checkPermission(to, from, next);
|
||||||
|
next()
|
||||||
})
|
})
|
||||||
|
|
||||||
// router.afterEach(() => {
|
// router.afterEach(() => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useTitle } from '@vueuse/core'
|
import { useTitle } from '@vueuse/core'
|
||||||
|
|
||||||
const DEFAULT_TITLE = 'Vue3 AdminVite + Vue + TS'
|
const DEFAULT_TITLE = 'Agent'
|
||||||
|
|
||||||
const DEFAULT_DESCRIPTION = document
|
const DEFAULT_DESCRIPTION = document
|
||||||
.querySelector('meta[name=\'description\']')
|
.querySelector('meta[name=\'description\']')
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
123123
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||||
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": [
|
||||||
|
"./src/*"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
/* Linting */
|
/* Linting */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
@@ -14,5 +15,10 @@
|
|||||||
"erasableSyntaxOnly": true,
|
"erasableSyntaxOnly": true,
|
||||||
"noUncheckedSideEffectImports": 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