From 3167ed5d86e3be03b85f8578939ec96f6fce1dd2 Mon Sep 17 00:00:00 2001 From: yshkaym Date: Fri, 10 Mar 2023 00:28:20 +0900 Subject: [PATCH] Change tableHeight conversion expression and type --- src/components/DataTable.vue | 2 +- src/propsWithDefault.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DataTable.vue b/src/components/DataTable.vue index cc97fa8..fa492a9 100644 --- a/src/components/DataTable.vue +++ b/src/components/DataTable.vue @@ -367,7 +367,7 @@ const { } = toRefs(props); // style related computed variables -const tableHeightPx = computed(() => (tableHeight.value ? `${tableHeight.value}px` : null)); +const tableHeightPx = computed(() => (tableHeight.value ? (isFinite(tableHeight.value) ? `${tableHeight.value}px` : tableHeight.value) : null)); const tableMinHeightPx = computed(() => `${tableMinHeight.value}px`); // global style related variable diff --git a/src/propsWithDefault.ts b/src/propsWithDefault.ts index ca60642..c3dd9a5 100644 --- a/src/propsWithDefault.ts +++ b/src/propsWithDefault.ts @@ -132,7 +132,7 @@ export default { default: 180, }, tableHeight: { - type: Number, + type: [Number, String], default: null, }, themeColor: {