Browse Source

列表配置项改为全非必填 (#948)

pull/953/head
binhaoCen 5 years ago committed by tangjinzhou
parent
commit
44d587483c
  1. 48
      types/table/column.d.ts

48
types/table/column.d.ts vendored

@ -20,119 +20,119 @@ export declare class Column extends AntdComponent {
* @default 'left' * @default 'left'
* @type string * @type string
*/ */
align: 'left' | 'right' | 'center'; align?: 'left' | 'right' | 'center';
/** /**
* Span of this column's title * Span of this column's title
* @type number * @type number
*/ */
colSpan: number; colSpan?: number;
/** /**
* Display field of the data record, could be set like a.b.c * Display field of the data record, could be set like a.b.c
* @type string * @type string
*/ */
dataIndex: string; dataIndex?: string;
/** /**
* Default order of sorted values: 'ascend' 'descend' null * Default order of sorted values: 'ascend' 'descend' null
* @type string * @type string
*/ */
defaultSortOrder: SortOrder; defaultSortOrder?: SortOrder;
/** /**
* Customized filter overlay * Customized filter overlay
* @type any (slot) * @type any (slot)
*/ */
filterDropdown: any; filterDropdown?: any;
/** /**
* Whether filterDropdown is visible * Whether filterDropdown is visible
* @type boolean * @type boolean
*/ */
filterDropdownVisible: boolean; filterDropdownVisible?: boolean;
/** /**
* Whether the dataSource is filtered * Whether the dataSource is filtered
* @default false * @default false
* @type boolean * @type boolean
*/ */
filtered: boolean; filtered?: boolean;
/** /**
* Controlled filtered value, filter icon will highlight * Controlled filtered value, filter icon will highlight
* @type string[] * @type string[]
*/ */
filteredValue: string[]; filteredValue?: string[];
/** /**
* Customized filter icon * Customized filter icon
* @default false * @default false
* @type any * @type any
*/ */
filterIcon: any; filterIcon?: any;
/** /**
* Whether multiple filters can be selected * Whether multiple filters can be selected
* @default true * @default true
* @type boolean * @type boolean
*/ */
filterMultiple: boolean; filterMultiple?: boolean;
/** /**
* Filter menu config * Filter menu config
* @type object[] * @type object[]
*/ */
filters: ColumnFilterItem[]; filters?: ColumnFilterItem[];
/** /**
* Set column to be fixed: true(same as left) 'left' 'right' * Set column to be fixed: true(same as left) 'left' 'right'
* @default false * @default false
* @type boolean | string * @type boolean | string
*/ */
fixed: boolean | 'left' | 'right'; fixed?: boolean | 'left' | 'right';
/** /**
* Unique key of this column, you can ignore this prop if you've set a unique dataIndex * Unique key of this column, you can ignore this prop if you've set a unique dataIndex
* @type string * @type string
*/ */
key: string; key?: string;
/** /**
* Renderer of the table cell. The return value should be a VNode, or an object for colSpan/rowSpan config * Renderer of the table cell. The return value should be a VNode, or an object for colSpan/rowSpan config
* @type Function | ScopedSlot * @type Function | ScopedSlot
*/ */
customRender: Function | ScopedSlot; customRender?: Function | ScopedSlot;
/** /**
* Sort function for local sort, see Array.sort's compareFunction. If you need sort buttons only, set to true * Sort function for local sort, see Array.sort's compareFunction. If you need sort buttons only, set to true
* @type boolean | Function * @type boolean | Function
*/ */
sorter: boolean | Function; sorter?: boolean | Function;
/** /**
* Order of sorted values: 'ascend' 'descend' false * Order of sorted values: 'ascend' 'descend' false
* @type boolean | string * @type boolean | string
*/ */
sortOrder: boolean | SortOrder; sortOrder?: boolean | SortOrder;
/** /**
* Title of this column * Title of this column
* @type any (string | slot) * @type any (string | slot)
*/ */
title: any; title?: any;
/** /**
* Width of this column * Width of this column
* @type string | number * @type string | number
*/ */
width: string | number; width?: string | number;
/** /**
* Set props on per cell * Set props on per cell
* @type Function * @type Function
*/ */
customCell: ( customCell?: (
record: any, record: any,
rowIndex: number, rowIndex: number,
) => { ) => {
@ -148,7 +148,7 @@ export declare class Column extends AntdComponent {
* Set props on per header cell * Set props on per header cell
* @type * @type
*/ */
customHeaderCell: ( customHeaderCell?: (
column: any, column: any,
) => { ) => {
props: object; props: object;
@ -163,25 +163,25 @@ export declare class Column extends AntdComponent {
* Callback executed when the confirm filter button is clicked, Use as a filter event when using template or jsx * Callback executed when the confirm filter button is clicked, Use as a filter event when using template or jsx
* @type Function * @type Function
*/ */
onFilter: Function; onFilter?: Function;
/** /**
* Callback executed when filterDropdownVisible is changed, Use as a filterDropdownVisible event when using template or jsx * Callback executed when filterDropdownVisible is changed, Use as a filterDropdownVisible event when using template or jsx
* @type Function * @type Function
*/ */
onFilterDropdownVisibleChange: (visible: boolean) => void; onFilterDropdownVisibleChange?: (visible: boolean) => void;
/** /**
* When using columns, you can use this property to configure the properties that support the slot, * When using columns, you can use this property to configure the properties that support the slot,
* such as slots: { filterIcon: 'XXX'} * such as slots: { filterIcon: 'XXX'}
* @type object * @type object
*/ */
slots: object; slots?: object;
/** /**
* When using columns, you can use this property to configure the properties that support the slot-scope, * When using columns, you can use this property to configure the properties that support the slot-scope,
* such as scopedSlots: { customRender: 'XXX'} * such as scopedSlots: { customRender: 'XXX'}
* @type object * @type object
*/ */
scopedSlots: object; scopedSlots?: object;
} }

Loading…
Cancel
Save