+
diff --git a/src/components/Table/src/components/HeaderCell.vue b/src/components/Table/src/components/HeaderCell.vue
index ccfa20a7..7f04cbf1 100644
--- a/src/components/Table/src/components/HeaderCell.vue
+++ b/src/components/Table/src/components/HeaderCell.vue
@@ -37,10 +37,10 @@ export default defineComponent({
{getIsEdit.value
? (
- {getTitle.value}
+ {getTitle.value}
)
: (
-
+
)}
{getHelpMessage.value && (
diff --git a/src/components/Table/src/components/editable/EditableCell.vue b/src/components/Table/src/components/editable/EditableCell.vue
index 4df2fa24..20112238 100644
--- a/src/components/Table/src/components/editable/EditableCell.vue
+++ b/src/components/Table/src/components/editable/EditableCell.vue
@@ -274,7 +274,7 @@ export default defineComponent({
value,
})
}
- catch (e) {
+ catch {
result = false
}
finally {
diff --git a/src/components/Table/src/components/editable/helper.ts b/src/components/Table/src/components/editable/helper.ts
index 82a1f805..dcfd3572 100644
--- a/src/components/Table/src/components/editable/helper.ts
+++ b/src/components/Table/src/components/editable/helper.ts
@@ -20,8 +20,9 @@ export function createPlaceholderMessage(component: ComponentType) {
|| component.includes('Switch')
|| component.includes('DatePicker')
|| component.includes('TimePicker')
- )
+ ) {
return t('common.chooseText')
+ }
return ''
}
diff --git a/src/components/Table/src/hooks/useColumns.ts b/src/components/Table/src/hooks/useColumns.ts
index 22250069..bc45bb82 100644
--- a/src/components/Table/src/hooks/useColumns.ts
+++ b/src/components/Table/src/hooks/useColumns.ts
@@ -318,7 +318,7 @@ export function formatCell(text: string, format: CellFormat, record: Recordable,
if (isMap(format))
return format.get(text)
}
- catch (error) {
+ catch {
return text
}
}
diff --git a/src/components/Table/src/hooks/useRender.ts b/src/components/Table/src/hooks/useRender.ts
index a15f3f2a..fd3eea48 100644
--- a/src/components/Table/src/hooks/useRender.ts
+++ b/src/components/Table/src/hooks/useRender.ts
@@ -111,7 +111,7 @@ export const useRender = {
const data = JSON.parse(json)
return h(JsonPreview, { data })
}
- catch (e) {
+ catch {
return json
}
}
diff --git a/src/components/Table/src/hooks/useTable.ts b/src/components/Table/src/hooks/useTable.ts
index f0ae082d..d471bec8 100644
--- a/src/components/Table/src/hooks/useTable.ts
+++ b/src/components/Table/src/hooks/useTable.ts
@@ -124,7 +124,6 @@ export function useTable(tableProps?: Props): [
getSize: () => {
return toRaw(getTableInstance().getSize())
},
- // eslint-disable-next-line ts/ban-types
updateTableData: (index: number, key: K, value: K extends keyof T ? T[K] : any) => {
return getTableInstance().updateTableData(index, key, value)
},
diff --git a/src/components/Table/src/props.ts b/src/components/Table/src/props.ts
index d225bc05..1bbf114f 100644
--- a/src/components/Table/src/props.ts
+++ b/src/components/Table/src/props.ts
@@ -129,7 +129,6 @@ export function defineTableProps() {
default: null,
},
rowKey: {
- // eslint-disable-next-line ts/ban-types
type: [String, Function] as PropType keyof T) | (string & {})>,
default: '',
},
diff --git a/src/components/Table/src/types/column.ts b/src/components/Table/src/types/column.ts
index bf82621d..6161e3ed 100644
--- a/src/components/Table/src/types/column.ts
+++ b/src/components/Table/src/types/column.ts
@@ -138,7 +138,7 @@ export interface ColumnProps {
* Sort function for local sort, see Array.sort's compareFunction. If you need sort buttons only, set to true
* @type boolean | Function
*/
- sorter?: boolean | Function
+ sorter?: boolean | ((...args: any) => any)
/**
* Order of sorted values: 'ascend' 'descend' false
diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts
index 6e68f732..ff88e367 100644
--- a/src/components/Table/src/types/table.ts
+++ b/src/components/Table/src/types/table.ts
@@ -115,7 +115,6 @@ export interface TableActionType {
getRowSelection: () => TableRowSelection>
getCacheColumns: () => BasicColumn[]
emit?: EmitType
- // eslint-disable-next-line ts/ban-types
updateTableData: (index: number, key: K, value: K extends keyof T ? T[K] : any) => Promise>
setShowPagination: (show: boolean) => Promise
getShowPagination: () => boolean
@@ -215,8 +214,6 @@ export interface BasicTableProps> {
// 在分页改变的时候清空选项
clearSelectOnPageChange?: boolean
- //
- // eslint-disable-next-line ts/ban-types
rowKey?: keyof T | ((record: T) => keyof T) | (string & {})
// 数据
dataSource?: T[]
@@ -273,7 +270,7 @@ export interface BasicTableProps> {
* Customize row expand Icon.
* @type Function | VNodeChild
*/
- expandIcon?: Function | VNodeChild | JSX.Element
+ expandIcon?: (...args: any) => any | VNodeChild | JSX.Element
/**
* Whether to expand row by clicking anywhere in the whole row
@@ -291,7 +288,7 @@ export interface BasicTableProps> {
* Table footer renderer
* @type Function | VNodeChild
*/
- footer?: Function | VNodeChild | JSX.Element
+ footer?: ((...args: any) => any) | VNodeChild | JSX.Element
/**
* Indent size in pixels of tree data
@@ -381,7 +378,7 @@ export interface BasicTableProps> {
*
* @version 1.5.4
*/
- transformCellText?: Function
+ transformCellText?: (...args: any) => any
/**
* Callback executed before editable cell submit value, not for row-editor
diff --git a/src/components/Tree/src/BasicTree.vue b/src/components/Tree/src/BasicTree.vue
index 0ccb9b4d..5447fc66 100644
--- a/src/components/Tree/src/BasicTree.vue
+++ b/src/components/Tree/src/BasicTree.vue
@@ -360,11 +360,11 @@ export default defineComponent({
const titleDom = isHighlight
? (
-
- {title.slice(0, searchIdx)}
- {searchText}
- {title.slice(searchIdx + (searchText as string).length)}
-
+
+ {title.slice(0, searchIdx)}
+ {searchText}
+ {title.slice(searchIdx + (searchText as string).length)}
+
)
: (
title
@@ -377,17 +377,17 @@ export default defineComponent({
{slots?.title
? (
- <>
- {iconDom}
- {getSlot(slots, 'title', item)}
- >
+ <>
+ {iconDom}
+ {getSlot(slots, 'title', item)}
+ >
)
: (
- <>
- {iconDom}
- {titleDom}
- {renderAction(item)}
- >
+ <>
+ {iconDom}
+ {titleDom}
+ {renderAction(item)}
+ >
)}
)
diff --git a/src/hooks/setting/index.ts b/src/hooks/setting/index.ts
index b9644592..e07ff344 100644
--- a/src/hooks/setting/index.ts
+++ b/src/hooks/setting/index.ts
@@ -12,7 +12,7 @@ export function useGlobSetting(): Readonly {
VITE_GLOB_UPLOAD_URL,
} = getAppEnvConfig()
- if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) {
+ if (!/[a-z_]*/i.test(VITE_GLOB_APP_SHORT_NAME)) {
warn(
'VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.',
)
diff --git a/src/hooks/web/useContentHeight.ts b/src/hooks/web/useContentHeight.ts
index 495ddd1f..e959e2bd 100644
--- a/src/hooks/web/useContentHeight.ts
+++ b/src/hooks/web/useContentHeight.ts
@@ -53,7 +53,7 @@ export function useContentHeight(
function calcSubtractSpace(element: Element | null | undefined, direction: 'all' | 'top' | 'bottom' = 'all'): number {
function numberPx(px: string) {
- return Number(px.replace(/[^\d]/g, ''))
+ return Number(px.replace(/\D/g, ''))
}
let subtractHeight = 0
const ZERO_PX = '0px'
diff --git a/src/hooks/web/useMessage.tsx b/src/hooks/web/useMessage.tsx
index 6537343c..77780149 100644
--- a/src/hooks/web/useMessage.tsx
+++ b/src/hooks/web/useMessage.tsx
@@ -8,15 +8,15 @@ import { useI18n } from './useI18n'
import { isString } from '@/utils/is'
export interface NotifyApi {
- info(config: NotificationArgsProps): void
- success(config: NotificationArgsProps): void
- error(config: NotificationArgsProps): void
- warn(config: NotificationArgsProps): void
- warning(config: NotificationArgsProps): void
- open(args: NotificationArgsProps): void
- close(key: string): void
- config(options: ConfigProps): void
- destroy(): void
+ info: (config: NotificationArgsProps) => void
+ success: (config: NotificationArgsProps) => void
+ error: (config: NotificationArgsProps) => void
+ warn: (config: NotificationArgsProps) => void
+ warning: (config: NotificationArgsProps) => void
+ open: (args: NotificationArgsProps) => void
+ close: (key: string) => void
+ config: (options: ConfigProps) => void
+ destroy: () => void
}
export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
diff --git a/src/hooks/web/usePermission.ts b/src/hooks/web/usePermission.ts
index dfa024a0..4c4f9c6b 100644
--- a/src/hooks/web/usePermission.ts
+++ b/src/hooks/web/usePermission.ts
@@ -27,7 +27,7 @@ export function usePermission() {
try {
router.addRoute(route as unknown as RouteRecordRaw)
}
- catch (e) {}
+ catch {}
})
permissionStore.setLastBuildMenuTime()
closeAll()
diff --git a/src/layouts/default/header/MultipleHeader.vue b/src/layouts/default/header/MultipleHeader.vue
index 3937df39..a1e30ef9 100644
--- a/src/layouts/default/header/MultipleHeader.vue
+++ b/src/layouts/default/header/MultipleHeader.vue
@@ -64,8 +64,9 @@ const getPlaceholderDomStyle = computed((): CSSProperties => {
(unref(getShowFullHeaderRef) || !unref(getSplit))
&& unref(getShowHeader)
&& !unref(getFullContent)
- )
+ ) {
height += HEADER_HEIGHT
+ }
if (unref(getShowMultipleTab) && !unref(getFullContent))
height += TABS_HEIGHT
diff --git a/src/layouts/default/menu/index.vue b/src/layouts/default/menu/index.vue
index 8ebb3a87..f856f31b 100644
--- a/src/layouts/default/menu/index.vue
+++ b/src/layouts/default/menu/index.vue
@@ -135,17 +135,17 @@ export default defineComponent({
return null
return !props.isHorizontal
? (
-
+
)
: (
-
+
)
}
diff --git a/src/logics/error-handle/index.ts b/src/logics/error-handle/index.ts
index 2992d770..3146b283 100644
--- a/src/logics/error-handle/index.ts
+++ b/src/logics/error-handle/index.ts
@@ -19,13 +19,13 @@ function processStackMsg(error: Error) {
return ''
let stack = error.stack
- .replace(/\n/gi, '') // Remove line breaks to save the size of the transmitted content
+ .replace(/\n/g, '') // Remove line breaks to save the size of the transmitted content
.replace(/\bat\b/gi, '@') // At in chrome, @ in ff
.split('@') // Split information with @
.slice(0, 9) // The maximum stack length (Error.stackTraceLimit = 10), so only take the first 10
.map(v => v.replace(/^\s*|\s*$/g, '')) // Remove extra spaces
.join('~') // Manually add separators for later display
- .replace(/\?[^:]+/gi, '') // Remove redundant parameters of js file links (?x=1 and the like)
+ .replace(/\?[^:]+/g, '') // Remove redundant parameters of js file links (?x=1 and the like)
const msg = error.toString()
if (!stack.includes(msg))
stack = `${msg}@${stack}`
diff --git a/src/router/guard/permissionGuard.ts b/src/router/guard/permissionGuard.ts
index aabf7d51..f3da4010 100644
--- a/src/router/guard/permissionGuard.ts
+++ b/src/router/guard/permissionGuard.ts
@@ -87,7 +87,7 @@ export function createPermissionGuard(router: Router) {
try {
await userStore.getUserInfoAction(userInfo?.user)
}
- catch (err) {
+ catch {
next()
return
}
@@ -104,7 +104,7 @@ export function createPermissionGuard(router: Router) {
try {
router.addRoute(route as unknown as RouteRecordRaw)
}
- catch (e) {}
+ catch {}
})
router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw)
diff --git a/src/router/helper/menuHelper.ts b/src/router/helper/menuHelper.ts
index ddeb8bb6..386d9dbd 100644
--- a/src/router/helper/menuHelper.ts
+++ b/src/router/helper/menuHelper.ts
@@ -81,7 +81,7 @@ export function transformRouteToMenu(routeModList: AppRouteModule[], routerMappi
/**
* config menu with given params
*/
-const menuParamRegex = /(?::)([\s\S]+?)((?=\/)|$)/g
+const menuParamRegex = /:([\s\S]+?)(?=\/)|$/g
export function configureDynamicParamsMenu(menu: Menu, params: RouteParams) {
const { path, paramPath } = toRaw(menu)
diff --git a/src/store/modules/lock.ts b/src/store/modules/lock.ts
index b491f15b..0c6e2563 100644
--- a/src/store/modules/lock.ts
+++ b/src/store/modules/lock.ts
@@ -50,7 +50,7 @@ export const useLockStore = defineStore('app-lock', {
// return res
}
- catch (error) {
+ catch {
return false
}
}
diff --git a/src/store/modules/multipleTab.ts b/src/store/modules/multipleTab.ts
index beb12a74..8c8d7c5e 100644
--- a/src/store/modules/multipleTab.ts
+++ b/src/store/modules/multipleTab.ts
@@ -123,8 +123,9 @@ export const useMultipleTabStore = defineStore('app-multiple-tab', {
|| path === PageEnum.BASE_LOGIN
|| !name
|| [REDIRECT_ROUTE.name, PAGE_NOT_FOUND_ROUTE.name].includes(name as string)
- )
+ ) {
return
+ }
let updateIndex = -1
// Existing pages, do not add tabs repeatedly
diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts
index f4bdc11a..0250be5a 100644
--- a/src/store/modules/permission.ts
+++ b/src/store/modules/permission.ts
@@ -129,7 +129,7 @@ export const usePermissionStore = defineStore('app-permission', {
try {
patcher(routes)
}
- catch (e) {
+ catch {
// 已处理完毕跳出循环
}
}
diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index bae9af22..0c976a04 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -129,7 +129,7 @@ export const useUserStore = defineStore('app-user', {
try {
router.addRoute(route as unknown as RouteRecordRaw)
}
- catch (e) {}
+ catch {}
})
router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw)
permissionStore.setDynamicAddedRoute(true)
@@ -155,7 +155,7 @@ export const useUserStore = defineStore('app-user', {
.map(i => `${i[0].toUpperCase()}${i.slice(1)}`)
.join('')
- const component = __menu.path.replaceAll(/\/:[\s|\S]*/g, '')
+ const component = __menu.path.replaceAll(/\/:[\s\S]*/g, '')
let isPadIndexExtension = false
if (!component.endsWith('index') && !/\/:/.test(__menu.path))
diff --git a/src/utils/cache/storageCache.ts b/src/utils/cache/storageCache.ts
index 77dd375f..c6d2dc53 100644
--- a/src/utils/cache/storageCache.ts
+++ b/src/utils/cache/storageCache.ts
@@ -84,7 +84,7 @@ export function createStorage({
this.remove(key)
}
- catch (e) {
+ catch {
return def
}
}
diff --git a/src/utils/cipher.ts b/src/utils/cipher.ts
index 72629b32..d70caa4d 100644
--- a/src/utils/cipher.ts
+++ b/src/utils/cipher.ts
@@ -10,13 +10,13 @@ import SHA512 from 'crypto-js/sha512'
// Define an interface for encryption
// 定义一个加密器的接口
export interface Encryption {
- encrypt(plainText: string): string
- decrypt(cipherText: string): string
+ encrypt: (plainText: string) => string
+ decrypt: (cipherText: string) => string
}
// Define an interface for Hashing
// 定义一个哈希算法的接口
export interface Hashing {
- hash(data: string): string
+ hash: (data: string) => string
}
export interface EncryptionParams {
diff --git a/src/utils/color.ts b/src/utils/color.ts
index 02b74d33..3fa08326 100644
--- a/src/utils/color.ts
+++ b/src/utils/color.ts
@@ -6,7 +6,7 @@
* @return Boolean
*/
export function isHexColor(color: string) {
- const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/
+ const reg = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i
return reg.test(color)
}
diff --git a/src/utils/dateUtil.ts b/src/utils/dateUtil.ts
index 1a183ba8..a592bfa3 100644
--- a/src/utils/dateUtil.ts
+++ b/src/utils/dateUtil.ts
@@ -29,28 +29,6 @@ export function betweenDay(date1, date2) {
return Math.floor((date2.getTime() - date1.getTime()) / (24 * 3600 * 1000))
}
-export function formatDate(date, fmt) {
- date = convertDate(date)
- const o = {
- 'M+': date.getMonth() + 1, // 月份
- 'd+': date.getDate(), // 日
- 'H+': date.getHours(), // 小时
- 'm+': date.getMinutes(), // 分
- 's+': date.getSeconds(), // 秒
- 'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
- 'S': date.getMilliseconds(), // 毫秒
- }
- if (/(y+)/.test(fmt)) {
- // 年份
- fmt = fmt.replace(RegExp.$1, (`${date.getFullYear()}`).substr(4 - RegExp.$1.length))
- }
- for (const k in o) {
- if (new RegExp(`(${k})`).test(fmt))
- fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : (`00${o[k]}`).substr((`${o[k]}`).length))
- }
- return fmt
-}
-
export function addTime(date, time) {
date = convertDate(date)
return new Date(date.getTime() + time)
diff --git a/src/utils/domUtils.ts b/src/utils/domUtils.ts
index 0ad2e7d5..ff392075 100644
--- a/src/utils/domUtils.ts
+++ b/src/utils/domUtils.ts
@@ -18,7 +18,7 @@ export function getBoundingClientRect(element: Element): DOMRect | number {
}
function trim(string: string) {
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '')
+ return (string || '').replace(/^\s+|\s+$/g, '')
}
/* istanbul ignore next */
diff --git a/src/utils/env.ts b/src/utils/env.ts
index aaf01f38..e62c7be4 100644
--- a/src/utils/env.ts
+++ b/src/utils/env.ts
@@ -24,7 +24,7 @@ export function getAppEnvConfig() {
VITE_GLOB_UPLOAD_URL,
} = ENV
- if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
+ if (!/^[a-z_]*$/i.test(VITE_GLOB_APP_SHORT_NAME)) {
warn(
'VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.',
)
diff --git a/src/utils/file/download.ts b/src/utils/file/download.ts
index 03500361..fd8bbb7a 100644
--- a/src/utils/file/download.ts
+++ b/src/utils/file/download.ts
@@ -59,7 +59,7 @@ export function downloadByUrl({ url, target = '_blank', fileName }: { url: strin
const isChrome = window.navigator.userAgent.toLowerCase().includes('chrome')
const isSafari = window.navigator.userAgent.toLowerCase().includes('safari')
- if (/(iP)/g.test(window.navigator.userAgent)) {
+ if (/(iP)/.test(window.navigator.userAgent)) {
console.error('Your browser does not support download!')
return false
}
diff --git a/src/utils/http/axios/Axios.ts b/src/utils/http/axios/Axios.ts
index 123e5111..87794f8b 100644
--- a/src/utils/http/axios/Axios.ts
+++ b/src/utils/http/axios/Axios.ts
@@ -234,8 +234,9 @@ export class VAxios {
contentType !== ContentTypeEnum.FORM_URLENCODED
|| !Reflect.has(config, 'data')
|| config.method?.toUpperCase() === RequestEnum.GET
- )
+ ) {
return config
+ }
return {
...config,
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 7f181f9b..19ece165 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -130,7 +130,7 @@ interface EventShim {
}
export type WithInstall = T & {
- install(app: App): void
+ install: (app: App) => void
} & EventShim
export type CustomComponent = Component & { displayName?: string }
@@ -176,10 +176,10 @@ export function simpleDebounce(fn, delay = 100) {
export function toCamelCase(str: string, upperCaseFirst: boolean) {
str = (str || '')
- .replace(/[-|\/](.)/g, (group1) => {
+ .replace(/[-|/](.)/g, (group1) => {
return group1.toUpperCase()
})
- .replaceAll(/[-|\/]/g, '')
+ .replaceAll(/[-|/]/g, '')
if (upperCaseFirst && str)
str = str.charAt(0).toUpperCase() + str.slice(1)
diff --git a/src/utils/is.ts b/src/utils/is.ts
index c4c19176..c3b79fae 100644
--- a/src/utils/is.ts
+++ b/src/utils/is.ts
@@ -61,6 +61,6 @@ export const isServer = typeof window === 'undefined'
export const isClient = !isServer
export function isHttpUrl(path: string): boolean {
- const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/
+ const reg = /^http(s)?:\/\/([\w\-]+\.)+[\w\-]+(\/[\w\- ./?%&=]*)?$/
return reg.test(path)
}
diff --git a/src/utils/mitt.ts b/src/utils/mitt.ts
index 2142c7c8..0f9f4bcd 100644
--- a/src/utils/mitt.ts
+++ b/src/utils/mitt.ts
@@ -25,15 +25,12 @@ export type EventHandlerMap> = Map<
export interface Emitter> {
all: EventHandlerMap
- on(type: Key, handler: Handler): void
- on(type: '*', handler: WildcardHandler): void
+ on: ((type: Key, handler: Handler) => void) & ((type: '*', handler: WildcardHandler) => void)
- off(type: Key, handler?: Handler): void
- off(type: '*', handler: WildcardHandler): void
+ off: ((type: Key, handler?: Handler) => void) & ((type: '*', handler: WildcardHandler) => void)
- emit(type: Key, event: Events[Key]): void
- emit(type: undefined extends Events[Key] ? Key : never): void
- clear(): void
+ emit: ((type: Key, event: Events[Key]) => void) & ((type: undefined extends Events[Key] ? Key : never) => void)
+ clear: () => void
}
/**
diff --git a/src/utils/props.ts b/src/utils/props.ts
index c68b6737..a7b115cb 100644
--- a/src/utils/props.ts
+++ b/src/utils/props.ts
@@ -138,13 +138,13 @@ export function buildProps<
: [O[K]] extends NativePropType
? O[K]
: O[K] extends BuildPropOption<
- infer T,
+ infer T,
- infer _D,
- infer R,
- infer V,
- infer C
- >
+ infer _D,
+ infer R,
+ infer V,
+ infer C
+ >
? BuildPropReturn
: never
}
diff --git a/src/utils/tree.ts b/src/utils/tree.ts
index 0666c5be..d09b3249 100644
--- a/src/utils/tree.ts
+++ b/src/utils/tree.ts
@@ -268,7 +268,7 @@ export function handleTree2(data, id, parentId, children, rootId) {
// 返回每一项的子级数组
return father[id] === child[parentId]
})
- // eslint-disable-next-line no-unused-expressions
+
branchArr.length > 0 ? (father.children = branchArr) : ''
// 返回第一层
return father[parentId] === rootId
diff --git a/vite.config.ts b/vite.config.ts
index 5db2182d..7ffbb6af 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -50,7 +50,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
},
// @/xxxx => src/xxxx
{
- find: /\@\//,
+ find: /@\//,
replacement: `${pathResolve('src')}/`,
},
],