Commit a10bed0d by zhangxw

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

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