mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 20:28:45 +08:00 
			
		
		
		
	运费模板性能优化。区域选择使用懒加载
This commit is contained in:
		@@ -194,3 +194,17 @@ export const convertToInteger = (num: number | string | undefined): number => {
 | 
			
		||||
  // TODO 分转元后还有小数则四舍五入
 | 
			
		||||
  return Math.round(parsedNumber * 100)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 元转分
 | 
			
		||||
 */
 | 
			
		||||
export const yuanToFen = (amount: string | number): number => {
 | 
			
		||||
  return Math.round(Number(amount) * 100)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 分转元
 | 
			
		||||
 */
 | 
			
		||||
export const fenToYuan = (amount: string | number): number => {
 | 
			
		||||
  return Number((Number(amount) / 100).toFixed(2))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,8 @@ const DEFAULT_CONFIG: TreeHelperConfig = {
 | 
			
		||||
export const defaultProps = {
 | 
			
		||||
  children: 'children',
 | 
			
		||||
  label: 'name',
 | 
			
		||||
  value: 'id'
 | 
			
		||||
  value: 'id',
 | 
			
		||||
  isLeaf: 'leaf'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const getConfig = (config: Partial<TreeHelperConfig>) => Object.assign({}, DEFAULT_CONFIG, config)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user