fix issue textarea value not work
This commit is contained in:
parent
a6a65c8107
commit
d7737a9fe1
@ -1,8 +1,8 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/order/show",
|
||||
"pages/order/quasi",
|
||||
"pages/order/show",
|
||||
"pages/shop/show",
|
||||
"pages/order/list",
|
||||
"pages/order/content",
|
||||
|
@ -18,11 +18,15 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.callback = options.callback || 'callback'
|
||||
var {content} = options
|
||||
var content = options.content
|
||||
var that = this
|
||||
if (content) {
|
||||
this.setData({
|
||||
content
|
||||
})
|
||||
// fix textarea value not work
|
||||
setTimeout(function () {
|
||||
that.setData({
|
||||
content
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<view class="weui-cells weui-cells_after-title">
|
||||
<view class="weui-cell">
|
||||
<view class="weui-cell__bd">
|
||||
<textarea bindinput="onContentInput" value="{{content}}" class="weui-textarea" placeholder="口味, 偏好等要求" style="height: 3.3em" />
|
||||
<textarea bindinput="onContentInput" auto-focus="true" value="{{content}}" class="weui-textarea" placeholder="口味, 偏好等要求" style="height: 3.3em" />
|
||||
<view class="weui-textarea-counter">{{content.length}}/{{limit}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -14,7 +14,7 @@ Page({
|
||||
},
|
||||
onLoad: function (options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.id = options.id || '2853'
|
||||
this.id = options.id || '2859'
|
||||
this.loadData()
|
||||
},
|
||||
onReady: function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user