mirror of
				https://github.com/continew-org/continew-admin-ui.git
				synced 2025-11-04 08:59:22 +08:00 
			
		
		
		
	fix: 修复 lodash 升级为 lodash-es 后遗漏的错误代码 (#2)
This commit is contained in:
		@@ -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