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,
|
type: Object,
|
||||||
default () {
|
default () {
|
||||||
return {
|
return {
|
||||||
gpuAcceleration: false
|
gpuAcceleration: false,
|
||||||
};
|
boundariesElement: 'body'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -66,24 +67,15 @@ export default {
|
||||||
options.placement = this.placement;
|
options.placement = this.placement;
|
||||||
options.offset = this.offset;
|
options.offset = this.offset;
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.popperJS = new Popper(reference, popper, options);
|
||||||
this.popperJS = new Popper(
|
this.popperJS.onCreate(popper => {
|
||||||
reference,
|
this.resetTransformOrigin(popper);
|
||||||
popper,
|
this.$nextTick(this.updatePopper);
|
||||||
options
|
this.$emit('created', this);
|
||||||
);
|
|
||||||
this.popperJS.onCreate(popper => {
|
|
||||||
this.resetTransformOrigin(popper);
|
|
||||||
this.$emit('created', this);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updatePopper() {
|
updatePopper() {
|
||||||
if (this.popperJS) {
|
this.popperJS ? this.popperJS.update() : this.createPopper();
|
||||||
this.popperJS.update();
|
|
||||||
} else {
|
|
||||||
this.createPopper();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doDestroy() {
|
doDestroy() {
|
||||||
if (this.showPopper) return;
|
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>
|
<style>
|
||||||
.tooltip_out{
|
.tooltip_out{
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
padding: 20px;
|
padding: 50px;
|
||||||
}
|
}
|
||||||
body{
|
body{
|
||||||
height: 1000px;
|
height: 1000px;
|
||||||
|
@ -13,7 +13,9 @@
|
||||||
123
|
123
|
||||||
</div>
|
</div>
|
||||||
<div class="tooltip_out">
|
<div class="tooltip_out">
|
||||||
|
<Tooltip content="Top23321" placement="left">
|
||||||
|
<Button>上面的左面</Button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<Row>
|
<Row>
|
||||||
<i-col span="12">
|
<i-col span="12">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iview",
|
"name": "iview",
|
||||||
"version": "0.9.5-rc-3",
|
"version": "0.9.5-rc-4",
|
||||||
"title": "iView",
|
"title": "iView",
|
||||||
"description": "A high quality UI components Library with Vue.js",
|
"description": "A high quality UI components Library with Vue.js",
|
||||||
"homepage": "http://www.iviewui.com",
|
"homepage": "http://www.iviewui.com",
|
||||||
|
|
|
@ -108,6 +108,7 @@
|
||||||
background-color: @tooltip-bg;
|
background-color: @tooltip-bg;
|
||||||
border-radius: @border-radius-small;
|
border-radius: @border-radius-small;
|
||||||
box-shadow: @shadow-base;
|
box-shadow: @shadow-base;
|
||||||
|
white-space:nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-arrow{
|
&-arrow{
|
||||||
|
|
Loading…
Add table
Reference in a new issue