mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +00:00
picker component
This commit is contained in:
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user