fix(测试跟踪): 自定义字段整型及浮点类型精度有误
--bug=1024232 --user=宋昌昌 【测试跟踪】自定义字段整型和浮点型输入、显示有误 https://www.tapd.cn/55049933/s/1348970
This commit is contained in:
parent
bcbbd2563d
commit
4ac4b93d5c
|
@ -75,14 +75,15 @@
|
|||
@click.native="clickPane"
|
||||
v-model="data[prop]"
|
||||
:disabled="disabled"
|
||||
@change="handleChange"/>
|
||||
@change="handleChange" :precision="0" :step="1"/>
|
||||
|
||||
<el-input-number
|
||||
v-else-if="data.type === 'float'"
|
||||
@click.native="clickPane"
|
||||
:disabled="disabled"
|
||||
@input.native="changeInput($event)"
|
||||
@change="handleChange"
|
||||
v-model="data[prop]" :precision="2" :step="0.1"/>
|
||||
v-model="data[prop]" :step="0.1"/>
|
||||
|
||||
<el-date-picker
|
||||
class="custom-with"
|
||||
|
@ -218,6 +219,12 @@ export default {
|
|||
getTranslateOption(item) {
|
||||
return item.system ? this.$t(item.text) : item.text;
|
||||
},
|
||||
changeInput(e) {
|
||||
// 默认浮点输入最多不超过10位
|
||||
if (e.target.value.indexOf('.') >= 0) {
|
||||
e.target.value = e.target.value.substring(0, e.target.value.indexOf('.') + 11);
|
||||
}
|
||||
},
|
||||
handleChange() {
|
||||
if (this.form) {
|
||||
this.$set(this.form, this.data.name, this.data[this.prop]);
|
||||
|
|
Loading…
Reference in New Issue