From d6ca57e906d34c38b36b5a8e5dc63bdf1d8971ba Mon Sep 17 00:00:00 2001 From: fcyao <272128713@qq.com> Date: Fri, 8 Dec 2023 18:08:37 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#2156=20body.ts=20=E8=BF=99=E9=87=8C?= =?UTF-8?q?=E5=86=99=E9=94=99=E4=BA=86el=E6=9C=89=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=94=9F=E6=88=90=EF=BC=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E5=A4=9A=E5=A4=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #2156 body.ts 这里写错了el有时候无法生成,页面报错多处 --- packages/table/src/body.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/table/src/body.ts b/packages/table/src/body.ts index 110f2d70b..c1f88c6e8 100644 --- a/packages/table/src/body.ts +++ b/packages/table/src/body.ts @@ -714,8 +714,10 @@ export default defineComponent({ elemStore[`${prefix}xSpace`] = refBodyXSpace elemStore[`${prefix}ySpace`] = refBodyYSpace elemStore[`${prefix}emptyBlock`] = refBodyEmptyBlock - el.onscroll = scrollEvent - el._onscroll = scrollEvent + if (el) { + el.onscroll = scrollEvent + el._onscroll = scrollEvent + } }) })