Skip to content

Commit

Permalink
fix(picker): fix #55
Browse files Browse the repository at this point in the history
  • Loading branch information
ly525 committed Feb 11, 2019
1 parent 8a174ac commit b44bf8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ export default {
togglePicker () {
// ---- fix #53 start ----
let elm = this.$refs.defaultActivator && this.$refs.defaultActivator.$el;
const slotActivator = this.$slots.input && this.$slots.input.length && this.$slots.input[0];
// fix #55: this.$slots.input[0] -> this.$slots.input[0].elm
const slotActivator = this.$slots.input && this.$slots.input.length && this.$slots.input[0].elm;
if (!elm && (slotActivator.querySelector('input') || slotActivator.querySelector('button'))) {
elm = slotActivator;
}
Expand All @@ -263,7 +264,7 @@ export default {
} else {
this.pickerVisible = !this.pickerVisible;
}
// ---- fix #53 start ----
// ---- fix #53 end ----
},
pickerStyles () {
return {
Expand Down

0 comments on commit b44bf8b

Please sign in to comment.