Commit a10bed0d by zhangxw

修改客户信息备注字段限制100字符

1 parent bc4e0532
......@@ -96,9 +96,13 @@ Page({
},
remarkInput(e) {
let value = e.detail.value;
if (value.length > 100) {
value = value.substring(0, 100);
}
this.setData({
currentWordNumber: e.detail.cursor,
'orderObj.remark': e.detail.value
currentWordNumber: value.length,
'orderObj.remark': value
})
},
......
......@@ -50,7 +50,7 @@
<view class="remark_box">
<view class="label">订单备注</view>
<view class="textArea_box">
<textarea value="{{orderObj.remark}}" placeholder="请输入" class="textarea" bindinput="remarkInput" />
<textarea value="{{orderObj.remark}}" placeholder="请输入" class="textarea" maxlength="100" bindinput="remarkInput" />
<view class="currentWordNumber">{{currentWordNumber || 0}} / 100</view>
</view>
</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!