diff --git a/src/utils/index.ts b/src/utils/index.ts index 31b2f937..421d5db5 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,5 @@ import type { RouteLocationNormalized, RouteRecordNormalized } from 'vue-router' import type { App, Component } from 'vue' - import { intersectionWith, isEqual, mergeWith, unionWith } from 'lodash-es' import { unref } from 'vue' import { isArray, isObject } from '@/utils/is' @@ -80,7 +79,10 @@ export function deepMerge = T & { export type CustomComponent = Component & { displayName?: string } export function withInstall(component: T, alias?: string) { - ;(component as Record).install = (app: App) => { + (component as Record).install = (app: App) => { const compName = component.name || component.displayName if (!compName) return diff --git a/src/utils/is.ts b/src/utils/is.ts index c3147e67..15946c7b 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -66,7 +66,7 @@ export function isString(val: unknown): val is string { return is(val, 'String') } -export function isFunction(val: unknown): val is Fn { +export function isFunction(val: unknown): val is Function { return typeof val === 'function' } @@ -99,6 +99,6 @@ export const isServer = typeof window === 'undefined' export const isClient = !isServer export function isUrl(path: string): boolean { - const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/ + const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/ return reg.test(path) }