修复了数据字典值为true和false时,选中select value变nan的bug
parent
62f27cfb3a
commit
c97a2a9135
|
@ -52,7 +52,9 @@ export function getDictOptions(dictType: string, valueType?: 'string' | 'number'
|
||||||
? `${dict.value}`
|
? `${dict.value}`
|
||||||
: valueType === 'boolean'
|
: valueType === 'boolean'
|
||||||
? `${dict.value}` === 'true'
|
? `${dict.value}` === 'true'
|
||||||
: Number.parseInt(`${dict.value}`),
|
: valueType === 'number' && !isNaN(parseFloat(`${dict.value}`))
|
||||||
|
? Number.parseInt(`${dict.value}`)
|
||||||
|
: dict.value,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue