After Vue uses keep-alive, the el-tooltip floating content does not disappear automatically when switching pages

Judge whether there is this element in the second page and remove it manually

beforeCreate() {
    const dom = document.querySelector('.el-tooltip__popper')
    if (dom) {
        dom.remove()
    }
},

Guess you like

Origin blog.csdn.net/Holly31/article/details/130572686