From f917050b6d37096753e4431f32745ca24370b5c9 Mon Sep 17 00:00:00 2001 From: Zhoujianlu <736021777@qq.com> Date: Tue, 21 Apr 2020 17:41:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20el-height-adapt?= =?UTF-8?q?ive-table=20=E6=8C=87=E4=BB=A4=E5=88=B7=E6=96=B0=E6=88=96?= =?UTF-8?q?=E5=88=87=E6=8D=A2=20tagsView=20=E5=90=8E=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84=20bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directive/el-table/adaptive.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/directive/el-table/adaptive.js b/src/directive/el-table/adaptive.js index d229e9fd..ad84b51c 100644 --- a/src/directive/el-table/adaptive.js +++ b/src/directive/el-table/adaptive.js @@ -7,8 +7,8 @@ import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/re * bottomOffset: 30(default) // The height of the table from the bottom of the page. */ -const doResize = (el, binding, vnode) => { - const { componentInstance: $table } = vnode +const doResize = async(el, binding, vnode) => { + const { componentInstance: $table } = await vnode const { value } = binding @@ -25,15 +25,15 @@ const doResize = (el, binding, vnode) => { } export default { - bind(el, binding, vnode) { - el.resizeListener = () => { - doResize(el, binding, vnode) + async bind(el, binding, vnode) { + el.resizeListener = async() => { + await doResize(el, binding, vnode) } // parameter 1 is must be "Element" type - addResizeListener(window.document.body, el.resizeListener) + await addResizeListener(window.document.body, el.resizeListener) }, - inserted(el, binding, vnode) { - doResize(el, binding, vnode) + async inserted(el, binding, vnode) { + await doResize(el, binding, vnode) }, unbind(el) { removeResizeListener(window.document.body, el.resizeListener) From 9603d50fdcb31ced3731aed9f36a911b992131b1 Mon Sep 17 00:00:00 2001 From: Zhoujianlu <736021777@qq.com> Date: Thu, 23 Apr 2020 15:24:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20tagsView=20?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=90=8E=20resizeListener=20=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E5=A4=B1=E6=95=88=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directive/el-table/adaptive.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/directive/el-table/adaptive.js b/src/directive/el-table/adaptive.js index ad84b51c..cf5048d1 100644 --- a/src/directive/el-table/adaptive.js +++ b/src/directive/el-table/adaptive.js @@ -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) } } From 28e33fce5522ded0dfdc57c8e1d8355a755776a2 Mon Sep 17 00:00:00 2001 From: Zhoujianlu <736021777@qq.com> Date: Wed, 17 Jun 2020 10:12:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20tagsView=20?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=90=8E=E7=9B=91=E5=90=AC=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directive/el-table/adaptive.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/directive/el-table/adaptive.js b/src/directive/el-table/adaptive.js index cf5048d1..56ae883d 100644 --- a/src/directive/el-table/adaptive.js +++ b/src/directive/el-table/adaptive.js @@ -30,6 +30,7 @@ export default { await doResize(el, binding, vnode) } // parameter 1 is must be "Element" type + addResizeListener(el, el.resizeListener) addResizeListener(window.document.body, el.resizeListener) }, async inserted(el, binding, vnode) {