From 5abad236ee0e966896b9abdd0ca301dc5575fb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Tue, 16 Aug 2022 08:44:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(component):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20table=20=E7=BB=84=E4=BB=B6=E5=9B=A0=20loading=20=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=97=B6=E6=9C=BA=E4=BA=A7=E7=94=9F=E7=9A=84=E9=94=99?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/table/index.vue | 15 +++------------ package/component/src/utils/withInstall.ts | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index b6befb19..be2696b4 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -448,22 +448,13 @@ const classes = computed(() => { }); watch( - () => props.height, + () => [props.height, props.maxHeight, props.dataSource], () => { nextTick(() => { getScrollWidth(); - }); + }) } -); - -watch( - () => props.maxHeight, - () => { - nextTick(() => { - getScrollWidth(); - }); - } -); +) onMounted(() => { getScrollWidth(); diff --git a/package/component/src/utils/withInstall.ts b/package/component/src/utils/withInstall.ts index 8c6ba981..cbb7e465 100644 --- a/package/component/src/utils/withInstall.ts +++ b/package/component/src/utils/withInstall.ts @@ -10,4 +10,4 @@ export const withInstall = (comp: T): T & Plugin => { }; return component as T & Plugin; -}; +}; \ No newline at end of file