fix: 修复 tagsView 刷新后 resizeListener 监听失效。

This commit is contained in:
Zhoujianlu 2020-04-23 15:24:09 +08:00
parent f917050b6d
commit 9603d50fdc
1 changed files with 2 additions and 2 deletions

View File

@ -30,12 +30,12 @@ export default {
await doResize(el, binding, vnode)
}
// parameter 1 is must be "Element" type
await addResizeListener(window.document.body, el.resizeListener)
addResizeListener(window.document.body, el.resizeListener)
},
async inserted(el, binding, vnode) {
await doResize(el, binding, vnode)
},
unbind(el) {
removeResizeListener(window.document.body, el.resizeListener)
removeResizeListener(el, el.resizeListener)
}
}