mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vben.git
synced 2025-12-30 10:32:25 +00:00
!59 修复了数据字典值为true和false时,选中select value变nan的bug
Merge pull request !59 from Phone/master
This commit is contained in:
@@ -52,7 +52,9 @@ export function getDictOptions(dictType: string, valueType?: 'string' | 'number'
|
||||
? `${dict.value}`
|
||||
: valueType === 'boolean'
|
||||
? `${dict.value}` === 'true'
|
||||
: Number.parseInt(`${dict.value}`),
|
||||
: valueType === 'number' && !isNaN(parseFloat(`${dict.value}`))
|
||||
? Number.parseInt(`${dict.value}`)
|
||||
: dict.value,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user