forked from opentiny/tiny-vue
fix(numeric): 解决bug: 设置数值精度后无法输入小数点; 超出小数位数后裁剪值不对. (#270)
This commit is contained in:
parent
8f9f3868b7
commit
0d3ca6bda6
|
@ -188,6 +188,7 @@ export class BigIntDecimal {
|
|||
this.integer = BigInt(numbers[0])
|
||||
const decimalStr = numbers[1] || '0'
|
||||
this.decimal = convertBigInt(decimalStr)
|
||||
this.decimalLen = decimalStr.length
|
||||
} else {
|
||||
this.nan = true
|
||||
}
|
||||
|
|
|
@ -263,7 +263,6 @@ export const handleInput = ({ state, api, emit, props }) => (event) => {
|
|||
event.target.value = isNull(value) ? '' : value
|
||||
state.lastInput = value
|
||||
state.userInput = value
|
||||
api.setCurrentValue(value === '-' ? 0 : value)
|
||||
}
|
||||
|
||||
export const handleInputChange = ({ api }) => (event) => {
|
||||
|
|
Loading…
Reference in New Issue