mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-06 18:24:07 +08:00
chore: 更新依赖,修改 ts 警告
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-stylistic/config",
|
||||
"stylelint-config-standard",
|
||||
"stylelint-config-standard-scss",
|
||||
"stylelint-config-standard-vue/scss"
|
||||
],
|
||||
|
||||
+20
-21
@@ -22,65 +22,64 @@
|
||||
"@vueuse/integrations": "^10.2.1",
|
||||
"axios": "^1.4.0",
|
||||
"dayjs": "^1.11.9",
|
||||
"element-plus": "^2.3.7",
|
||||
"eruda": "^3.0.0",
|
||||
"hotkeys-js": "^3.10.4",
|
||||
"element-plus": "^2.3.8",
|
||||
"eruda": "^3.0.1",
|
||||
"hotkeys-js": "^3.11.2",
|
||||
"lodash-es": "^4.17.21",
|
||||
"mitt": "^3.0.0",
|
||||
"mitt": "^3.0.1",
|
||||
"mockjs": "^1.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"path-to-regexp": "^6.2.1",
|
||||
"pinia": "^2.1.4",
|
||||
"pinia": "^2.1.6",
|
||||
"qs": "^6.11.2",
|
||||
"vconsole": "^3.15.1",
|
||||
"vue": "^3.3.4",
|
||||
"vue-router": "^4.2.2"
|
||||
"vue-router": "^4.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.39.6",
|
||||
"@antfu/eslint-config": "^0.39.8",
|
||||
"@iconify-json/ep": "^1.1.11",
|
||||
"@iconify/vue": "^4.1.1",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/path-browserify": "^1.0.0",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@vitejs/plugin-legacy": "^4.0.5",
|
||||
"@vitejs/plugin-legacy": "^4.1.1",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"bumpp": "^9.1.1",
|
||||
"cz-git": "^1.6.1",
|
||||
"eslint": "^8.44.0",
|
||||
"esno": "^0.16.3",
|
||||
"cz-git": "^1.7.0",
|
||||
"eslint": "^8.46.0",
|
||||
"esno": "^0.17.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"http-server": "^14.1.1",
|
||||
"lint-staged": "^13.2.3",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"plop": "^3.1.2",
|
||||
"postcss-html": "^1.5.0",
|
||||
"sass": "^1.63.6",
|
||||
"simple-git-hooks": "^2.8.1",
|
||||
"stylelint": "^15.9.0",
|
||||
"stylelint-config-standard": "^33.0.0",
|
||||
"sass": "^1.64.1",
|
||||
"simple-git-hooks": "^2.9.0",
|
||||
"stylelint": "^15.10.2",
|
||||
"stylelint-config-standard-scss": "^10.0.0",
|
||||
"stylelint-config-standard-vue": "^1.0.0",
|
||||
"stylelint-scss": "^5.0.1",
|
||||
"stylelint-stylistic": "^0.4.2",
|
||||
"stylelint-stylistic": "^0.4.3",
|
||||
"svgo": "^3.0.2",
|
||||
"terser": "^5.18.2",
|
||||
"terser": "^5.19.2",
|
||||
"typescript": "^5.1.6",
|
||||
"unplugin-auto-import": "^0.16.4",
|
||||
"unplugin-auto-import": "^0.16.6",
|
||||
"unplugin-vue-components": "^0.25.1",
|
||||
"vite": "^4.3.9",
|
||||
"vite": "^4.4.7",
|
||||
"vite-plugin-banner": "^0.7.0",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-mock": "^2.9.8",
|
||||
"vite-plugin-pages": "^0.31.0",
|
||||
"vite-plugin-spritesmith": "^0.1.1",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-vue-inspector": "^3.4.2",
|
||||
"vite-plugin-vue-inspector": "^3.5.0",
|
||||
"vite-plugin-vue-meta-layouts": "^0.2.2",
|
||||
"vue-tsc": "^1.8.3"
|
||||
"vue-tsc": "^1.8.8"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged",
|
||||
|
||||
Generated
+1354
-1553
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,9 @@ const menuStore = useMenuStore()
|
||||
interface listTypes {
|
||||
path: string
|
||||
icon?: string
|
||||
title?: string | Function
|
||||
title?: string | (() => string)
|
||||
link?: string
|
||||
breadcrumb: (string | Function | undefined)[]
|
||||
breadcrumb: any[]
|
||||
}
|
||||
|
||||
const isShow = ref(false)
|
||||
@@ -147,16 +147,16 @@ function hasChildren(item: RouteRecordRaw) {
|
||||
}
|
||||
return flag
|
||||
}
|
||||
function getSourceList(arr: RouteRecordRaw[], basePath?: string, icon?: string, breadcrumb?: (string | Function | undefined)[]) {
|
||||
function getSourceList(arr: RouteRecordRaw[], basePath?: string, icon?: string, breadcrumb?: (string | (() => string))[]) {
|
||||
arr.forEach((item) => {
|
||||
if (item.meta?.sidebar !== false) {
|
||||
const breadcrumbTemp = cloneDeep(breadcrumb) || []
|
||||
if (item.children && hasChildren(item)) {
|
||||
breadcrumbTemp.push(item.meta?.title)
|
||||
item.meta?.title && breadcrumbTemp.push(item.meta?.title)
|
||||
getSourceList(item.children, basePath ? [basePath, item.path].join('/') : item.path, item.meta?.icon ?? icon, breadcrumbTemp)
|
||||
}
|
||||
else {
|
||||
breadcrumbTemp.push(item.meta?.title)
|
||||
item.meta?.title && breadcrumbTemp.push(item.meta?.title)
|
||||
sourceList.value.push({
|
||||
path: basePath ? [basePath, item.path].join('/') : item.path,
|
||||
icon: item.meta?.icon ?? icon,
|
||||
@@ -168,15 +168,15 @@ function getSourceList(arr: RouteRecordRaw[], basePath?: string, icon?: string,
|
||||
}
|
||||
})
|
||||
}
|
||||
function getSourceListByMenus(arr: Menu.recordRaw[], icon?: string, breadcrumb?: (string | Function | undefined)[]) {
|
||||
function getSourceListByMenus(arr: Menu.recordRaw[], icon?: string, breadcrumb?: (string | (() => string))[]) {
|
||||
arr.forEach((item) => {
|
||||
const breadcrumbTemp = cloneDeep(breadcrumb) || []
|
||||
if (item.children && item.children.length > 0) {
|
||||
breadcrumbTemp.push(item.meta?.title)
|
||||
item.meta?.title && breadcrumbTemp.push(item.meta?.title)
|
||||
getSourceListByMenus(item.children, item.meta?.icon ?? icon, breadcrumbTemp)
|
||||
}
|
||||
else {
|
||||
breadcrumbTemp.push(item.meta?.title)
|
||||
item.meta?.title && breadcrumbTemp.push(item.meta?.title)
|
||||
sourceList.value.push({
|
||||
icon: item.meta?.icon ?? icon,
|
||||
title: item.meta?.title,
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
}
|
||||
// 注册并记录路由数据
|
||||
// 记录的数据会在登出时会使用到,不使用 router.removeRoute 是考虑配置的路由可能不一定有设置 name ,则通过调用 router.addRoute() 返回的回调进行删除
|
||||
const removeRoutes: Function[] = []
|
||||
const removeRoutes: (() => void)[] = []
|
||||
routeStore.flatRoutes.forEach((route) => {
|
||||
if (!/^(https?:|mailto:|tel:)/.test(route.path)) {
|
||||
removeRoutes.push(router.addRoute(route as RouteRecordRaw))
|
||||
|
||||
@@ -17,7 +17,7 @@ const useRouteStore = defineStore(
|
||||
const isGenerate = ref(false)
|
||||
const routesRaw = ref<Route.recordMainRaw[]>([])
|
||||
const filesystemRoutesRaw = ref<RouteRecordRaw[]>([])
|
||||
const currentRemoveRoutes = ref<Function[]>([])
|
||||
const currentRemoveRoutes = ref<(() => void)[]>([])
|
||||
|
||||
// 将多层嵌套路由处理成两层,保留顶层和最子层路由,中间层级将被拍平
|
||||
function flatAsyncRoutes<T extends RouteRecordRaw>(route: T): T {
|
||||
@@ -216,7 +216,7 @@ const useRouteStore = defineStore(
|
||||
isGenerate.value = true
|
||||
}
|
||||
// 记录 accessRoutes 路由,用于登出时删除路由
|
||||
function setCurrentRemoveRoutes(routes: Function[]) {
|
||||
function setCurrentRemoveRoutes(routes: (() => void)[]) {
|
||||
currentRemoveRoutes.value = routes
|
||||
}
|
||||
// 清空动态路由
|
||||
|
||||
Vendored
+1
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
Vendored
+3
-3
@@ -211,7 +211,7 @@ declare namespace Settings {
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
title?: string | Function
|
||||
title?: string | (() => string)
|
||||
i18n?: string
|
||||
icon?: string
|
||||
activeIcon?: string
|
||||
@@ -229,7 +229,7 @@ declare module 'vue-router' {
|
||||
declare namespace Route {
|
||||
interface recordMainRaw {
|
||||
meta?: {
|
||||
title?: string | Function
|
||||
title?: string | (() => string)
|
||||
icon?: string
|
||||
auth?: string | string[]
|
||||
}
|
||||
@@ -237,7 +237,7 @@ declare namespace Route {
|
||||
}
|
||||
interface breadcrumb {
|
||||
path: string
|
||||
title?: string | Function
|
||||
title?: string | (() => string)
|
||||
hide: boolean
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+13
-20
@@ -1,20 +1,13 @@
|
||||
declare interface Window {
|
||||
webkitDevicePixelRatio: any
|
||||
mozDevicePixelRatio: any
|
||||
}
|
||||
|
||||
declare module '*.vue' {
|
||||
import { type DefineComponent } from 'vue'
|
||||
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
|
||||
declare const __SYSTEM_INFO__: {
|
||||
pkg: {
|
||||
version: string
|
||||
dependencies: Recordable<string>
|
||||
devDependencies: Recordable<string>
|
||||
}
|
||||
lastBuildTime: string
|
||||
}
|
||||
declare interface Window {
|
||||
webkitDevicePixelRatio: any
|
||||
mozDevicePixelRatio: any
|
||||
}
|
||||
|
||||
declare const __SYSTEM_INFO__: {
|
||||
pkg: {
|
||||
version: string
|
||||
dependencies: Recordable<string>
|
||||
devDependencies: Recordable<string>
|
||||
}
|
||||
lastBuildTime: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user