mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-11-02 04:22:40 +08:00
优化
This commit is contained in:
19
admin/.vscode/settings.json
vendored
19
admin/.vscode/settings.json
vendored
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"editor.detectIndentation": false,
|
||||
"editor.tabSize": 4,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"css.validate": false,
|
||||
"less.validate": false,
|
||||
"scss.validate": false
|
||||
"editor.detectIndentation": false,
|
||||
"editor.tabSize": 4,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"css.validate": false,
|
||||
"less.validate": false,
|
||||
"scss.validate": false,
|
||||
"cSpell.words": ["nprogress", "pinia", "vform"]
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"crypto-js": "^4.2.0",
|
||||
"css-color-function": "^1.3.3",
|
||||
"echarts": "^5.5.0",
|
||||
"element-plus": "^2.6.0",
|
||||
"element-plus": "^2.6.1",
|
||||
"highlight.js": "^11.9.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nprogress": "^0.2.0",
|
||||
@@ -47,7 +47,7 @@
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"@vue/eslint-config-prettier": "^9.0.0",
|
||||
"@vue/eslint-config-typescript": "^12.0.0",
|
||||
"@vue/eslint-config-typescript": "^13.0.0",
|
||||
"@vue/tsconfig": "^0.5.1",
|
||||
"autoprefixer": "^10.4.18",
|
||||
"eslint": "^8.57.0",
|
||||
|
||||
@@ -7,8 +7,7 @@ interface AppSate {
|
||||
isRouteShow: boolean
|
||||
}
|
||||
|
||||
const useAppStore = defineStore({
|
||||
id: 'app',
|
||||
const useAppStore = defineStore('app', {
|
||||
state: (): AppSate => {
|
||||
return {
|
||||
config: {},
|
||||
|
||||
@@ -57,8 +57,7 @@ export const getRouteParams = (tabItem: TabItem) => {
|
||||
}
|
||||
}
|
||||
|
||||
const useTabsStore = defineStore({
|
||||
id: 'tabs',
|
||||
const useTabsStore = defineStore('tabs', {
|
||||
state: (): TabsSate => ({
|
||||
cacheTabList: new Set(),
|
||||
tabList: [],
|
||||
|
||||
@@ -6,8 +6,7 @@ import { setTheme } from '@/utils/theme'
|
||||
import { SETTING_KEY } from '@/enums/cacheEnums'
|
||||
const storageSetting = cache.get(SETTING_KEY)
|
||||
|
||||
export const useSettingStore = defineStore({
|
||||
id: 'setting',
|
||||
export const useSettingStore = defineStore('setting', {
|
||||
state: () => {
|
||||
const state = {
|
||||
showDrawer: false,
|
||||
|
||||
@@ -14,18 +14,19 @@ export interface UserState {
|
||||
perms: string[]
|
||||
}
|
||||
|
||||
const useUserStore = defineStore({
|
||||
id: 'user',
|
||||
state: (): UserState => ({
|
||||
token: getToken() || '',
|
||||
// 用户信息
|
||||
userInfo: {},
|
||||
// 路由
|
||||
routes: [],
|
||||
menu: [],
|
||||
// 权限
|
||||
perms: []
|
||||
}),
|
||||
const useUserStore = defineStore('user', {
|
||||
state: (): UserState => {
|
||||
return {
|
||||
token: getToken() || '',
|
||||
// 用户信息
|
||||
userInfo: {},
|
||||
// 路由
|
||||
routes: [],
|
||||
menu: [],
|
||||
// 权限
|
||||
perms: []
|
||||
}
|
||||
},
|
||||
getters: {},
|
||||
actions: {
|
||||
resetState() {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"include": [
|
||||
"global.d.ts",
|
||||
"src/**/*",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.vue",
|
||||
"components.d.ts",
|
||||
"auto-imports.d.ts",
|
||||
@@ -12,6 +13,7 @@
|
||||
"module": "esnext",
|
||||
"moduleResolution": "Bundler",
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"outDir": "./dist",
|
||||
"isolatedModules": true,
|
||||
"baseUrl": ".",
|
||||
|
||||
Reference in New Issue
Block a user