在 Vue3 Element 中,可以通过设置'step'属性来控制输入框精确小数点后的位数。例如:

<el-input v-model='value' type='number' :step='0.000001'></el-input>

这样设置后,输入框的数值会精确到小数点后六位。需要注意的是,'type'属性必须为'number',否则'step'属性不起作用。

Vue3 Element Input: 精确控制小数点后六位

原文地址: https://www.cveoy.top/t/topic/mkdm 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录