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

2
pnpm-lock.yaml generated
View File

@@ -6354,4 +6354,4 @@ packages:
resolution: {integrity: sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==}
dependencies:
tslib: 2.3.0
dev: false
dev: false

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))
}
/**