update popper.js to fix that props 'offset' doesn't work
This commit is contained in:
parent
06ff901ff4
commit
9734ab0f88
1 changed files with 3 additions and 3 deletions
|
@ -90,14 +90,14 @@ export default {
|
||||||
if (!options.modifiers.offset) {
|
if (!options.modifiers.offset) {
|
||||||
options.modifiers.offset = {};
|
options.modifiers.offset = {};
|
||||||
}
|
}
|
||||||
options.modifiers.offset = this.offset;
|
options.modifiers.offset.offset = this.offset;
|
||||||
options.onCreate =()=>{
|
options.onCreate =()=>{
|
||||||
this.$nextTick(this.updatePopper);
|
this.$nextTick(this.updatePopper);
|
||||||
this.$emit('created', this);
|
this.$emit('created', this);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.popperJS = new Popper(reference, popper, options);
|
this.popperJS = new Popper(reference, popper, options);
|
||||||
|
|
||||||
},
|
},
|
||||||
updatePopper() {
|
updatePopper() {
|
||||||
if (isServer) return;
|
if (isServer) return;
|
||||||
|
@ -112,7 +112,7 @@ export default {
|
||||||
},
|
},
|
||||||
updated (){
|
updated (){
|
||||||
this.$nextTick(()=>this.updatePopper());
|
this.$nextTick(()=>this.updatePopper());
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (isServer) return;
|
if (isServer) return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue