Commit 09c894a0 authored by 田翔's avatar 田翔

fix: 码优化

parent c1620eb0
{
"name": "panda-xform",
"version": "5.9.21",
"description": "5.9.21 数值形态优化",
"version": "5.9.22",
"description": "5.9.22 数值形态优化",
"keywords": [
"panda-xform"
],
......
......@@ -61,7 +61,8 @@ const NumberInput = (props) => {
} else if (formatter === '${整数}') {
return `${parseInt(value)}`
} else if (formatter === '${小数}') {
return Number(value).toFixed(Number(decimalDigits))
// return Number(value).toFixed(Number(decimalDigits))
return value
} else if (formatter === '${科学计数法}') {
return Number(value).toExponential()
} else if (formatter) {
......@@ -71,20 +72,20 @@ const NumberInput = (props) => {
return value
}
if (formatter === '${小数}') {
return (
<div className={styles.textInput} isdisabled={JSON.stringify(disabled)}>
<Input
disabled={disabled}
value={value ? `${value}` : ''}
placeholder={disabled ? (placeholder || '') : (placeholder || '请输入内容')}
onChange={inputChange}
addonBefore={addonBefore}
addonAfter={addonAfter}
/>
</div>
)
}
// if (formatter === '${小数}') {
// return (
// <div className={styles.textInput} isdisabled={JSON.stringify(disabled)}>
// <Input
// disabled={disabled}
// value={value ? `${value}` : ''}
// placeholder={disabled ? (placeholder || '') : (placeholder || '请输入内容')}
// onChange={inputChange}
// addonBefore={addonBefore}
// addonAfter={addonAfter}
// />
// </div>
// )
// }
return (
<div className={styles.inputNumber} isdisabled={JSON.stringify(disabled)}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment