Skip to content

Commit 44d5874

Browse files
cydiacentangjinzhou
authored andcommitted
列表配置项改为全非必填 (#948)
1 parent ecf7c8b commit 44d5874

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

types/table/column.d.ts

+24-24
Original file line numberDiff line numberDiff line change
@@ -20,119 +20,119 @@ export declare class Column extends AntdComponent {
2020
* @default 'left'
2121
* @type string
2222
*/
23-
align: 'left' | 'right' | 'center';
23+
align?: 'left' | 'right' | 'center';
2424

2525
/**
2626
* Span of this column's title
2727
* @type number
2828
*/
29-
colSpan: number;
29+
colSpan?: number;
3030

3131
/**
3232
* Display field of the data record, could be set like a.b.c
3333
* @type string
3434
*/
35-
dataIndex: string;
35+
dataIndex?: string;
3636

3737
/**
3838
* Default order of sorted values: 'ascend' 'descend' null
3939
* @type string
4040
*/
41-
defaultSortOrder: SortOrder;
41+
defaultSortOrder?: SortOrder;
4242

4343
/**
4444
* Customized filter overlay
4545
* @type any (slot)
4646
*/
47-
filterDropdown: any;
47+
filterDropdown?: any;
4848

4949
/**
5050
* Whether filterDropdown is visible
5151
* @type boolean
5252
*/
53-
filterDropdownVisible: boolean;
53+
filterDropdownVisible?: boolean;
5454

5555
/**
5656
* Whether the dataSource is filtered
5757
* @default false
5858
* @type boolean
5959
*/
60-
filtered: boolean;
60+
filtered?: boolean;
6161

6262
/**
6363
* Controlled filtered value, filter icon will highlight
6464
* @type string[]
6565
*/
66-
filteredValue: string[];
66+
filteredValue?: string[];
6767

6868
/**
6969
* Customized filter icon
7070
* @default false
7171
* @type any
7272
*/
73-
filterIcon: any;
73+
filterIcon?: any;
7474

7575
/**
7676
* Whether multiple filters can be selected
7777
* @default true
7878
* @type boolean
7979
*/
80-
filterMultiple: boolean;
80+
filterMultiple?: boolean;
8181

8282
/**
8383
* Filter menu config
8484
* @type object[]
8585
*/
86-
filters: ColumnFilterItem[];
86+
filters?: ColumnFilterItem[];
8787

8888
/**
8989
* Set column to be fixed: true(same as left) 'left' 'right'
9090
* @default false
9191
* @type boolean | string
9292
*/
93-
fixed: boolean | 'left' | 'right';
93+
fixed?: boolean | 'left' | 'right';
9494

9595
/**
9696
* Unique key of this column, you can ignore this prop if you've set a unique dataIndex
9797
* @type string
9898
*/
99-
key: string;
99+
key?: string;
100100

101101
/**
102102
* Renderer of the table cell. The return value should be a VNode, or an object for colSpan/rowSpan config
103103
* @type Function | ScopedSlot
104104
*/
105-
customRender: Function | ScopedSlot;
105+
customRender?: Function | ScopedSlot;
106106

107107
/**
108108
* Sort function for local sort, see Array.sort's compareFunction. If you need sort buttons only, set to true
109109
* @type boolean | Function
110110
*/
111-
sorter: boolean | Function;
111+
sorter?: boolean | Function;
112112

113113
/**
114114
* Order of sorted values: 'ascend' 'descend' false
115115
* @type boolean | string
116116
*/
117-
sortOrder: boolean | SortOrder;
117+
sortOrder?: boolean | SortOrder;
118118

119119
/**
120120
* Title of this column
121121
* @type any (string | slot)
122122
*/
123-
title: any;
123+
title?: any;
124124

125125
/**
126126
* Width of this column
127127
* @type string | number
128128
*/
129-
width: string | number;
129+
width?: string | number;
130130

131131
/**
132132
* Set props on per cell
133133
* @type Function
134134
*/
135-
customCell: (
135+
customCell?: (
136136
record: any,
137137
rowIndex: number,
138138
) => {
@@ -148,7 +148,7 @@ export declare class Column extends AntdComponent {
148148
* Set props on per header cell
149149
* @type
150150
*/
151-
customHeaderCell: (
151+
customHeaderCell?: (
152152
column: any,
153153
) => {
154154
props: object;
@@ -163,25 +163,25 @@ export declare class Column extends AntdComponent {
163163
* Callback executed when the confirm filter button is clicked, Use as a filter event when using template or jsx
164164
* @type Function
165165
*/
166-
onFilter: Function;
166+
onFilter?: Function;
167167

168168
/**
169169
* Callback executed when filterDropdownVisible is changed, Use as a filterDropdownVisible event when using template or jsx
170170
* @type Function
171171
*/
172-
onFilterDropdownVisibleChange: (visible: boolean) => void;
172+
onFilterDropdownVisibleChange?: (visible: boolean) => void;
173173

174174
/**
175175
* When using columns, you can use this property to configure the properties that support the slot,
176176
* such as slots: { filterIcon: 'XXX'}
177177
* @type object
178178
*/
179-
slots: object;
179+
slots?: object;
180180

181181
/**
182182
* When using columns, you can use this property to configure the properties that support the slot-scope,
183183
* such as scopedSlots: { customRender: 'XXX'}
184184
* @type object
185185
*/
186-
scopedSlots: object;
186+
scopedSlots?: object;
187187
}

0 commit comments

Comments
 (0)