[ 微信小程序 ] 使用mpvue绑定微信picker(mode:date)
<!-- picker 组件的绑定 mpvue的使用方式 --><picker mode="date"name="activity.endDate"v-bind:value="activity.endDate"start="2015-09-01"end="2017-09-01"@change="bindDateChange"><...
·
<!-- picker 组件的绑定 mpvue的使用方式 -->
<picker mode="date"
name="activity.endDate"
v-bind:value="activity.endDate"
start="2015-09-01"
end="2017-09-01"
@change="bindDateChange">
<view class="weui-input">{{activity.endDate}}</view>
</picker>
methods: {
bindDateChange(e) {
console.log(e)
this.activity.endDate = e.mp.detail.value
}
}
修改后的日期时在'e.mp.detail.value'
而不是文档中的'e.detail.value'
更多推荐
已为社区贡献4条内容
所有评论(0)