From f3d475afaa9c72ff9e349c6f103edc9d3016eba5 Mon Sep 17 00:00:00 2001
From: sunhao <sunhao@easycorp.ltd>
Date: Thu, 29 Aug 2024 09:44:50 +0800
Subject: [PATCH]  * dtable: refactor types.

---
 lib/dtable/src/types/options.ts | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/dtable/src/types/options.ts b/lib/dtable/src/types/options.ts
index e4bee7b24b..d0df99a774 100644
--- a/lib/dtable/src/types/options.ts
+++ b/lib/dtable/src/types/options.ts
@@ -16,20 +16,20 @@ export interface DTableDataOptions<C = ColSetting> {
 }
 
 export interface DTableLayoutOptions {
-    width: number | '100%' | ((this: DTable) => number | '100%');
-    height: number | '100%' | 'auto' | {min: number, max: number} | ((this: DTable, actualHeight: number) => number | 'auto' | {min: number, max: number});
+    width?: number | '100%' | ((this: DTable) => number | '100%');
+    height?: number | '100%' | 'auto' | {min: number, max: number} | ((this: DTable, actualHeight: number) => number | 'auto' | {min: number, max: number});
     fixedLeftWidth?: number | 'auto' | `${number}%` | ((this: DTable) => number);
     fixedRightWidth?: number | 'auto' | `${number}%` | ((this: DTable) => number);
-    rowHeight: number;
-    defaultColWidth: number;
-    minColWidth: number;
-    maxColWidth: number;
+    rowHeight?: number;
+    defaultColWidth?: number;
+    minColWidth?: number;
+    maxColWidth?: number;
     header?: boolean | CustomRenderResultList<[layout: DTableLayout], DTable> | CustomRenderResultGenerator<[layout: DTableLayout], DTable> | CustomRenderResultItem;
     footer?: boolean | CustomRenderResultList<[layout: DTableLayout], DTable> | ((this: DTable, layout: DTableLayout) => CustomRenderResultList<[layout: DTableLayout], DTable>);
-    headerHeight: number;
-    footerHeight: number;
-    responsive: boolean | string;
-    scrollbarHover: boolean;
+    headerHeight?: number;
+    footerHeight?: number;
+    responsive?: boolean | string;
+    scrollbarHover?: boolean;
     scrollbarSize?: number;
     horzScrollbarPos?: 'inside' | 'outside';
     vertScrollbarPos?: 'inside' | 'outside';