picker component

This commit is contained in:
cookfront 2017-02-17 17:49:49 +08:00
parent e415d039f0
commit 9b6d85a887
2 changed files with 13 additions and 3 deletions

View File

@ -1,6 +1,10 @@
<template>
<div class="z-picker-column">
<div class="z-picker-column-wrapper">
<div class="z-picker-item">
</div>
</div>
</div>
</template>
@ -35,17 +39,22 @@ export default {
data() {
return {
currentValue: this.value,
currentValues: this.values,
dragging: false
};
},
watch: {
values(val) {
this.currentValue = val;
},
currentValues(val) {
},
currentValue(val) {
this.$emit('change');
this.$emit('change', this);
}
},

View File

@ -115,6 +115,7 @@ export default {
*/
getColumnValues(index) {
let column = this.getColumn(index);
return column && column.currentValues;
},
/**
@ -123,7 +124,7 @@ export default {
setColumnValues(index, values) {
let column = this.getColumn(index);
if (column) {
column.currentValues = values;
}
},