Skip to content

Commit 27e315d

Browse files
committed
fix: popper checking and removing
1 parent bb122be commit 27e315d

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

src/components/Dropdown/CDropdown.vue

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export default {
2828
visible: this.show
2929
}
3030
},
31+
mounted () {
32+
if(this.show)
33+
this.createPopper
34+
},
3135
props: {
3236
text: {
3337
type: String,
@@ -40,25 +44,6 @@ export default {
4044
menuClasses: String,
4145
toggleClasses: String,
4246
popperConfig: Object
43-
// popperConfig: {
44-
// type: Object,
45-
// default () {
46-
// return {
47-
// modifiers: {
48-
// placement: 'bottom-end',
49-
// offset: {
50-
// offset: '20px'
51-
// },
52-
// computeStyle: {
53-
// enabled: true
54-
// },
55-
// flip: {
56-
// enabled: true
57-
// }
58-
// }
59-
// }
60-
// }
61-
// }
6247
},
6348
mounted () {
6449
this.checkForPopper()
@@ -88,7 +73,7 @@ export default {
8873
}
8974
this._popper = null
9075
},
91-
createPopper () {
76+
createPopper (element) {
9277
this.removePopper()
9378
this._popper = new Popper(this.$refs.toggle, this.$refs.menu, this.popperConfig)
9479
}

0 commit comments

Comments
 (0)