修复datetimepicker的问题

This commit is contained in:
niunai
2017-03-28 14:43:53 +08:00
parent db438160cd
commit 56a3922a01
4 changed files with 100 additions and 33 deletions
+2 -8
View File
@@ -65,23 +65,19 @@ export default {
},
watch: {
value(val) {
this.currentValue = val;
},
values(val) {
this.currentValues = val;
},
currentValues(val) {
if (this.valueIndex === -1) {
this.currentValue = (val || [])[0];
}
},
currentValue(val) {
this.doOnValueChange();
this.$emit('change', this);
this.$emit('input', val);
this.$emit('columnChange', this);
}
},
@@ -236,8 +232,6 @@ export default {
const value = this.currentValue;
const wrapper = this.$refs.wrapper;
this.$emit('input', this.currentValue);
translateUtil.translateElement(wrapper, null, this.value2Translate(value));
}
}
+1 -1
View File
@@ -15,7 +15,7 @@
:itemHeight="itemHeight"
:visible-item-count="visibleItemCount"
:value-key="valueKey"
@change="columnValueChange(index)">
@columnChange="columnValueChange(index)">
</picker-column>
<div class="zan-picker-center-highlight" :style="{ height: itemHeight + 'px', marginTop: -itemHeight / 2 + 'px' }"></div>
</div>