mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2026-06-10 00:34:08 +08:00
chore: update deps and lint fix
This commit is contained in:
@@ -40,8 +40,8 @@ Vue Naive Admin 2022年2月开始开源,从 1.0 到现在的 2.0,一直秉
|
||||
|
||||
## 极致的性能
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 2.0 和 1.0 区别
|
||||
|
||||
|
||||
46
package.json
46
package.json
@@ -14,41 +14,41 @@
|
||||
"dependencies": {
|
||||
"@arco-design/color": "^0.4.0",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"axios": "^1.13.5",
|
||||
"dayjs": "^1.11.19",
|
||||
"echarts": "^6.0.0",
|
||||
"lodash-es": "^4.17.23",
|
||||
"naive-ui": "^2.43.2",
|
||||
"axios": "^1.16.1",
|
||||
"dayjs": "^1.11.21",
|
||||
"echarts": "^6.1.0",
|
||||
"lodash-es": "^4.18.1",
|
||||
"naive-ui": "^2.44.1",
|
||||
"pinia": "^3.0.4",
|
||||
"pinia-plugin-persistedstate": "^4.7.1",
|
||||
"vue": "^3.5.29",
|
||||
"vue": "^3.5.35",
|
||||
"vue-echarts": "^8.0.1",
|
||||
"vue-router": "^5.0.3",
|
||||
"vue-router": "^5.1.0",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^7.6.1",
|
||||
"@iconify/json": "^2.2.443",
|
||||
"@unocss/eslint-config": "^66.6.2",
|
||||
"@unocss/eslint-plugin": "^66.6.2",
|
||||
"@unocss/preset-rem-to-px": "^66.6.2",
|
||||
"@vitejs/plugin-vue": "^6.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.4",
|
||||
"eslint": "^10.0.2",
|
||||
"@antfu/eslint-config": "^9.0.0",
|
||||
"@iconify/json": "^2.2.481",
|
||||
"@unocss/eslint-config": "^66.7.0",
|
||||
"@unocss/eslint-plugin": "^66.7.0",
|
||||
"@unocss/preset-rem-to-px": "^66.7.0",
|
||||
"@vitejs/plugin-vue": "^6.0.7",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
||||
"eslint": "^10.4.1",
|
||||
"eslint-plugin-format": "^2.0.1",
|
||||
"esno": "^4.8.0",
|
||||
"fs-extra": "^11.3.3",
|
||||
"fs-extra": "^11.3.5",
|
||||
"glob": "^13.0.6",
|
||||
"lint-staged": "^16.2.7",
|
||||
"rollup-plugin-visualizer": "^7.0.0",
|
||||
"lint-staged": "^17.0.7",
|
||||
"rollup-plugin-visualizer": "^7.0.1",
|
||||
"simple-git-hooks": "^2.13.1",
|
||||
"taze": "^19.9.2",
|
||||
"unocss": "^66.6.2",
|
||||
"taze": "^19.14.1",
|
||||
"unocss": "^66.7.0",
|
||||
"unplugin-auto-import": "^21.0.0",
|
||||
"unplugin-vue-components": "^31.0.0",
|
||||
"vite": "^7.3.1",
|
||||
"unplugin-vue-components": "^32.1.0",
|
||||
"vite": "^8.0.14",
|
||||
"vite-plugin-router-warn": "^2.0.0",
|
||||
"vite-plugin-vue-devtools": "^8.0.6",
|
||||
"vite-plugin-vue-devtools": "^8.1.2",
|
||||
"vue3-intro-step": "^1.0.5"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
|
||||
3362
pnpm-lock.yaml
generated
3362
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -44,7 +44,7 @@ export function createPermissionGuard(router) {
|
||||
}
|
||||
|
||||
const routes = router.getRoutes()
|
||||
if (routes.find(route => route.name === to.name))
|
||||
if (routes.some(route => route.name === to.name))
|
||||
return true
|
||||
|
||||
// 判断是无权限还是404
|
||||
|
||||
@@ -71,7 +71,7 @@ export const useTabStore = defineStore('tab', {
|
||||
const curIndex = this.tabs.findIndex(item => item.path === curPath)
|
||||
const filterTabs = this.tabs.filter((item, index) => index >= curIndex)
|
||||
this.setTabs(filterTabs)
|
||||
if (!filterTabs.find(item => item.path === this.activeTab)) {
|
||||
if (!filterTabs.some(item => item.path === this.activeTab)) {
|
||||
useRouterStore().router?.push(filterTabs[filterTabs.length - 1].path)
|
||||
}
|
||||
},
|
||||
@@ -79,7 +79,7 @@ export const useTabStore = defineStore('tab', {
|
||||
const curIndex = this.tabs.findIndex(item => item.path === curPath)
|
||||
const filterTabs = this.tabs.filter((item, index) => index <= curIndex)
|
||||
this.setTabs(filterTabs)
|
||||
if (!filterTabs.find(item => item.path === this.activeTab.value)) {
|
||||
if (!filterTabs.some(item => item.path === this.activeTab.value)) {
|
||||
useRouterStore().router?.push(filterTabs[filterTabs.length - 1].path)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -34,7 +34,7 @@ export function throttle(fn, wait) {
|
||||
let previous = 0
|
||||
|
||||
return function (...argArr) {
|
||||
const now = +new Date()
|
||||
const now = Date.now()
|
||||
context = this
|
||||
args = argArr
|
||||
if (now - previous > wait) {
|
||||
|
||||
@@ -23,7 +23,7 @@ class Storage {
|
||||
const stringData = JSON.stringify({
|
||||
value,
|
||||
time: Date.now(),
|
||||
expire: !isNullOrUndef(expire) ? new Date().getTime() + expire * 1000 : null,
|
||||
expire: !isNullOrUndef(expire) ? Date.now() + expire * 1000 : null,
|
||||
})
|
||||
this.storage.setItem(this.getKey(key), stringData)
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class Storage {
|
||||
try {
|
||||
const data = JSON.parse(val)
|
||||
const { value, time, expire } = data
|
||||
if (isNullOrUndef(expire) || expire > new Date().getTime()) {
|
||||
if (isNullOrUndef(expire) || expire > Date.now()) {
|
||||
return { value, time }
|
||||
}
|
||||
this.remove(key)
|
||||
|
||||
Reference in New Issue
Block a user