fix[adaptive.js]: fixed v-el-height-adaptive-table directive bug (#1924)

This commit is contained in:
yuntao1997 2019-04-16 14:56:07 +08:00 committed by 花裤衩
parent 952da32879
commit c00564617e
1 changed files with 4 additions and 4 deletions

View File

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