Commit 9734ab0f88e0a469bee3d142f5927456e440a4cb

Authored by Chuanfeng
1 parent 06ff901f

update popper.js to fix that props 'offset' doesn't work

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
src/components/base/popper.js
@@ -90,14 +90,14 @@ export default { @@ -90,14 +90,14 @@ export default {
90 if (!options.modifiers.offset) { 90 if (!options.modifiers.offset) {
91 options.modifiers.offset = {}; 91 options.modifiers.offset = {};
92 } 92 }
93 - options.modifiers.offset = this.offset; 93 + options.modifiers.offset.offset = this.offset;
94 options.onCreate =()=>{ 94 options.onCreate =()=>{
95 this.$nextTick(this.updatePopper); 95 this.$nextTick(this.updatePopper);
96 this.$emit('created', this); 96 this.$emit('created', this);
97 }; 97 };
98 98
99 this.popperJS = new Popper(reference, popper, options); 99 this.popperJS = new Popper(reference, popper, options);
100 - 100 +
101 }, 101 },
102 updatePopper() { 102 updatePopper() {
103 if (isServer) return; 103 if (isServer) return;
@@ -112,7 +112,7 @@ export default { @@ -112,7 +112,7 @@ export default {
112 }, 112 },
113 updated (){ 113 updated (){
114 this.$nextTick(()=>this.updatePopper()); 114 this.$nextTick(()=>this.updatePopper());
115 - 115 +
116 }, 116 },
117 beforeDestroy() { 117 beforeDestroy() {
118 if (isServer) return; 118 if (isServer) return;