[临时修复]解决tooltip数据不更新的问题
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<script lang="ts">
|
||||
import usePopper from "../popper/usePopper";
|
||||
import { defineComponent} from "vue";
|
||||
import { on } from "../../tools/domUtil";
|
||||
import { defineComponent, h, render} from "vue";
|
||||
import popper from "../popper/index.vue";
|
||||
export default defineComponent({
|
||||
name: "LayTooltip",
|
||||
props: {
|
||||
@@ -23,7 +25,11 @@ export default defineComponent({
|
||||
mounted() {
|
||||
const _this = this;
|
||||
this.$nextTick(() => {
|
||||
usePopper.createPopper(_this.$el, _this.$props, "hover");
|
||||
on(_this.$el, 'mouseenter', () => {
|
||||
const container: HTMLDivElement = document.createElement("div");
|
||||
render(h(popper, {...this.$props, el: this.$el}), container);
|
||||
container.firstElementChild && document.body.appendChild(container.firstElementChild);
|
||||
})
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user