# 表单限制数字值大小或字符串长度
onInit () {
this.editFormOptions.forEach(x => {
x.forEach(item => {
//设置最大值与最小值
/*如果当前类型是字符串类型,min/max则为字符串的长度*/
if (item.field == "AvgPrice") {
item.min = -999;
item.max = 100;
}
})
})
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12