update Tooltip
update Tooltip
This commit is contained in:
parent
bf962a6917
commit
755df66c00
6 changed files with 17 additions and 22 deletions
|
@ -24,8 +24,9 @@ export default {
|
|||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
gpuAcceleration: false
|
||||
};
|
||||
gpuAcceleration: false,
|
||||
boundariesElement: 'body'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -66,24 +67,15 @@ export default {
|
|||
options.placement = this.placement;
|
||||
options.offset = this.offset;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.popperJS = new Popper(
|
||||
reference,
|
||||
popper,
|
||||
options
|
||||
);
|
||||
this.popperJS = new Popper(reference, popper, options);
|
||||
this.popperJS.onCreate(popper => {
|
||||
this.resetTransformOrigin(popper);
|
||||
this.$nextTick(this.updatePopper);
|
||||
this.$emit('created', this);
|
||||
});
|
||||
});
|
||||
},
|
||||
updatePopper() {
|
||||
if (this.popperJS) {
|
||||
this.popperJS.update();
|
||||
} else {
|
||||
this.createPopper();
|
||||
}
|
||||
this.popperJS ? this.popperJS.update() : this.createPopper();
|
||||
},
|
||||
doDestroy() {
|
||||
if (this.showPopper) return;
|
||||
|
|
2
dist/styles/iview.all.css
vendored
2
dist/styles/iview.all.css
vendored
File diff suppressed because one or more lines are too long
2
dist/styles/iview.css
vendored
2
dist/styles/iview.css
vendored
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
<style>
|
||||
.tooltip_out{
|
||||
border: 1px solid #ccc;
|
||||
padding: 20px;
|
||||
padding: 50px;
|
||||
}
|
||||
body{
|
||||
height: 1000px;
|
||||
|
@ -13,7 +13,9 @@
|
|||
123
|
||||
</div>
|
||||
<div class="tooltip_out">
|
||||
|
||||
<Tooltip content="Top23321" placement="left">
|
||||
<Button>上面的左面</Button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<Row>
|
||||
<i-col span="12">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iview",
|
||||
"version": "0.9.5-rc-3",
|
||||
"version": "0.9.5-rc-4",
|
||||
"title": "iView",
|
||||
"description": "A high quality UI components Library with Vue.js",
|
||||
"homepage": "http://www.iviewui.com",
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
background-color: @tooltip-bg;
|
||||
border-radius: @border-radius-small;
|
||||
box-shadow: @shadow-base;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
&-arrow{
|
||||
|
|
Loading…
Add table
Reference in a new issue