Merge pull request #3619 from ChuanfengZhang/2.0
Fix that popper.js' props 'offset' doesn't work
This commit is contained in:
commit
1ba0bb6eee
2 changed files with 7 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;
|
||||||
|
|
|
@ -69,6 +69,7 @@
|
||||||
bottom: 1px;
|
bottom: 1px;
|
||||||
margin-left: -@poptip-arrow-width;
|
margin-left: -@poptip-arrow-width;
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
|
border-top-width: @poptip-arrow-width;
|
||||||
border-top-color: #fff;
|
border-top-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +78,7 @@
|
||||||
left: 1px;
|
left: 1px;
|
||||||
bottom: -@poptip-arrow-width;
|
bottom: -@poptip-arrow-width;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
|
border-right-width: @poptip-arrow-width;
|
||||||
border-right-color: #fff;
|
border-right-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +87,7 @@
|
||||||
top: 1px;
|
top: 1px;
|
||||||
margin-left: -@poptip-arrow-width;
|
margin-left: -@poptip-arrow-width;
|
||||||
border-top-width: 0;
|
border-top-width: 0;
|
||||||
|
border-bottom-width: @poptip-arrow-width;
|
||||||
border-bottom-color: #fff;
|
border-bottom-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +95,7 @@
|
||||||
content: " ";
|
content: " ";
|
||||||
right: 1px;
|
right: 1px;
|
||||||
border-right-width: 0;
|
border-right-width: 0;
|
||||||
|
border-left-width: @poptip-arrow-width;
|
||||||
border-left-color: #fff;
|
border-left-color: #fff;
|
||||||
bottom: -@poptip-arrow-width;
|
bottom: -@poptip-arrow-width;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue