mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-10 08:57:10 +08:00
fix: 修复 lodash 升级为 lodash-es 后遗漏的错误代码 (#2)
This commit is contained in:
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@@ -6354,4 +6354,4 @@ packages:
|
|||||||
resolution: {integrity: sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==}
|
resolution: {integrity: sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.3.0
|
tslib: 2.3.0
|
||||||
dev: false
|
dev: false
|
@@ -1,7 +1,7 @@
|
|||||||
import { reactive, computed, ref, type Ref } from 'vue'
|
import { reactive, computed, ref, type Ref } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { Modal, Message, type FormInstance } from '@arco-design/web-vue'
|
import { Modal, Message, type FormInstance } from '@arco-design/web-vue'
|
||||||
import { isEqual } from 'lodash'
|
import { isEqual } from 'lodash-es'
|
||||||
|
|
||||||
type Option<T> = {
|
type Option<T> = {
|
||||||
key?: string
|
key?: string
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import _ from 'lodash'
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
export function useForm<F extends object>(initValue: F) {
|
export function useForm<F extends object>(initValue: F) {
|
||||||
const getInitValue = () => _.cloneDeep(initValue)
|
const getInitValue = () => cloneDeep(initValue)
|
||||||
|
|
||||||
const form = reactive(getInitValue())
|
const form = reactive(getInitValue())
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { isExternal } from '@/utils/validate'
|
import { isExternal } from '@/utils/validate'
|
||||||
import { browse, mapTree } from 'xe-utils'
|
import { browse, mapTree } from 'xe-utils'
|
||||||
import _ from 'lodash'
|
import { upperFirst, camelCase } from 'lodash-es'
|
||||||
import { Message } from '@arco-design/web-vue'
|
import { Message } from '@arco-design/web-vue'
|
||||||
|
|
||||||
export function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
|
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) => {
|
export const transformPathToName = (path: string) => {
|
||||||
if (!path) return ''
|
if (!path) return ''
|
||||||
if (isExternal(path)) return ''
|
if (isExternal(path)) return ''
|
||||||
return _.upperFirst(_.camelCase(path))
|
return upperFirst(camelCase(path))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user