Skip to content

Commit

Permalink
popup-picker: Fix on-change event. Close #934. v2.1.0-rc.50
Browse files Browse the repository at this point in the history
  • Loading branch information
airyland committed Feb 16, 2017
1 parent 7ae35b4 commit e871a76
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vux",
"version": "2.1.0-rc.49",
"version": "2.1.0-rc.50",
"main": "index.js",
"description": "Mobile web UI based on Vue and WeUI",
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion src/components/popup-picker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ export default {
}
},
currentValue (val) {
this.$emit('input', val)
this.$emit('on-change', getObject(val))
this.$emit('input', getObject(val))
},
show (val) {
this.showValue = val
Expand Down
4 changes: 4 additions & 0 deletions src/components/popup-picker/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ events:
on-hide:
params: '`(closeType)` true表示confirm(选择确认), false表示其他情况的关闭'
zh-CN: 弹窗关闭时触发
changes:
v2.1.0-rc.50:
zh-CN:
- '[fix] 修复`on-change`事件没有触发 #934 @howyhuang'
5 changes: 5 additions & 0 deletions src/components/swipeout/metas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
icon: ''
changes:
v2.1.0-rc.50:
zh-CN:
- '[feature] `swipeout`组件`beta`版本'
5 changes: 4 additions & 1 deletion src/demos/PopupPicker.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<group title="single column">
<popup-picker :title="title1" :data="list1" v-model="value1" @on-show="onShow" @on-hide="onHide"></popup-picker>
<popup-picker :title="title1" :data="list1" v-model="value1" @on-show="onShow" @on-hide="onHide" @on-change="onChange"></popup-picker>
</group>
<br>
<div class="picker-buttons">
Expand Down Expand Up @@ -58,6 +58,9 @@ export default {
XSwitch
},
methods: {
onChange (val) {
console.log('val change', val)
},
changeList10 () {
this.list1 = [['小米1', 'iPhone1', '华为1', '情怀1', '三星1', '其他1', '不告诉你1']]
},
Expand Down

0 comments on commit e871a76

Please sign in to comment.