Merge pull request #3619 from ChuanfengZhang/2.0

Fix that popper.js' props 'offset' doesn't work
This commit is contained in:
Aresn 2018-05-16 14:24:42 +08:00 committed by GitHub
commit 1ba0bb6eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -90,14 +90,14 @@ export default {
if (!options.modifiers.offset) {
options.modifiers.offset = {};
}
options.modifiers.offset = this.offset;
options.modifiers.offset.offset = this.offset;
options.onCreate =()=>{
this.$nextTick(this.updatePopper);
this.$emit('created', this);
};
this.popperJS = new Popper(reference, popper, options);
},
updatePopper() {
if (isServer) return;
@ -112,7 +112,7 @@ export default {
},
updated (){
this.$nextTick(()=>this.updatePopper());
},
beforeDestroy() {
if (isServer) return;