fix: 修复 lodash 升级为 lodash-es 后遗漏的错误代码 (#2)

This commit is contained in:
Gap Zhang
2024-04-17 17:55:15 +08:00
committed by GitHub
parent 66c4526aac
commit c0007c33dc
4 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import { reactive, computed, ref, type Ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { Modal, Message, type FormInstance } from '@arco-design/web-vue'
import { isEqual } from 'lodash'
import { isEqual } from 'lodash-es'
type Option<T> = {
key?: string

View File

@@ -1,8 +1,8 @@
import { reactive } from 'vue'
import _ from 'lodash'
import { cloneDeep } from 'lodash-es'
export function useForm<F extends object>(initValue: F) {
const getInitValue = () => _.cloneDeep(initValue)
const getInitValue = () => cloneDeep(initValue)
const form = reactive(getInitValue())

View File

@@ -1,6 +1,6 @@
import { isExternal } from '@/utils/validate'
import { browse, mapTree } from 'xe-utils'
import _ from 'lodash'
import { upperFirst, camelCase } from 'lodash-es'
import { Message } from '@arco-design/web-vue'
export function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
@@ -184,7 +184,7 @@ export const randomHex = () => {
export const transformPathToName = (path: string) => {
if (!path) return ''
if (isExternal(path)) return ''
return _.upperFirst(_.camelCase(path))
return upperFirst(camelCase(path))
}
/**