Commit 2e9c8e2e by zhangxw

输入框输入限制

1 parent d1f8b4f9
......@@ -59,21 +59,30 @@ Page({
},
onProfitInput(e) {
const val = e.detail.value || ''
let val = e.detail.value || ""
if (val.length > 50) {
val = val.substring(0, 50)
}
this.setData({
'infoData.profitRule': val,
profitLength: val.length
})
},
onProductInput(e) {
const val = e.detail.value || ''
let val = e.detail.value || ""
if (val.length > 50) {
val = val.substring(0, 50)
}
this.setData({
'infoData.productInfo': val,
productLength: val.length
})
},
onFailInput(e) {
const val = e.detail.value || ''
let val = e.detail.value || ""
if (val.length > 100) {
val = val.substring(0, 100)
}
this.setData({
'infoData.failReason': val,
failLength: val.length
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!