Commit 69af37ec88e21acf926fdf5969c2189dc7450822
1 parent
86de3104
fix(table): fix table typo
Showing
3 changed files
with
22 additions
and
12 deletions
CHANGELOG.zh_CN.md
src/components/Table/src/types/table.ts
1 | 1 | import type { VNodeChild } from 'vue'; |
2 | 2 | import type { PaginationProps } from './pagination'; |
3 | 3 | import type { FormProps } from '/@/components/Form/index'; |
4 | -import type { IColumnProps, ITableRowSelection } from 'ant-design-vue/lib/table/interface'; | |
4 | +import type { | |
5 | + ColumnProps, | |
6 | + TableRowSelection as ITableRowSelection, | |
7 | +} from 'ant-design-vue/lib/table/interface'; | |
5 | 8 | import { ComponentType } from './componentType'; |
6 | -import { ColumnProps } from './column'; | |
9 | +// import { ColumnProps } from './column'; | |
7 | 10 | export declare type SortOrder = 'ascend' | 'descend'; |
8 | 11 | export interface TableCurrentDataSource<T = any> { |
9 | 12 | currentDataSource: T[]; |
... | ... | @@ -55,8 +58,8 @@ export interface TableCustomRecord<T = any> { |
55 | 58 | index?: number; |
56 | 59 | } |
57 | 60 | |
58 | -export interface SorterResult<T> { | |
59 | - column: ColumnProps<T>; | |
61 | +export interface SorterResult { | |
62 | + column: ColumnProps; | |
60 | 63 | order: SortOrder; |
61 | 64 | field: string; |
62 | 65 | columnKey: string; |
... | ... | @@ -309,7 +312,7 @@ export interface BasicTableProps<T = any> { |
309 | 312 | * Set props on per header row |
310 | 313 | * @type Function |
311 | 314 | */ |
312 | - customHeaderRow?: (column: IColumnProps, index: number) => object; | |
315 | + customHeaderRow?: (column: ColumnProps, index: number) => object; | |
313 | 316 | |
314 | 317 | /** |
315 | 318 | * Set props on per row |
... | ... | @@ -366,8 +369,9 @@ export interface BasicTableProps<T = any> { |
366 | 369 | onExpandedRowsChange?: (expandedRows: string[] | number[]) => void; |
367 | 370 | } |
368 | 371 | |
369 | -export interface BasicColumn extends IColumnProps { | |
372 | +export interface BasicColumn extends ColumnProps { | |
370 | 373 | children?: BasicColumn[]; |
374 | + | |
371 | 375 | // |
372 | 376 | flag?: 'INDEX' | 'DEFAULT' | 'CHECKBOX' | 'RADIO' | 'ACTION'; |
373 | 377 | ... | ... |
src/views/demo/table/tableData.tsx
... | ... | @@ -80,8 +80,8 @@ export function getMultipleHeaderColumns(): BasicColumn[] { |
80 | 80 | dataIndex: 'no', |
81 | 81 | width: 120, |
82 | 82 | filters: [ |
83 | - { text: 'Male', value: 'male' }, | |
84 | - { text: 'Female', value: 'female' }, | |
83 | + { text: 'Male', value: 'male', children: [] }, | |
84 | + { text: 'Female', value: 'female', children: [] }, | |
85 | 85 | ], |
86 | 86 | }, |
87 | 87 | |
... | ... | @@ -125,8 +125,8 @@ export function getCustomHeaderColumns(): BasicColumn[] { |
125 | 125 | dataIndex: 'no', |
126 | 126 | width: 120, |
127 | 127 | filters: [ |
128 | - { text: 'Male', value: 'male' }, | |
129 | - { text: 'Female', value: 'female' }, | |
128 | + { text: 'Male', value: 'male', children: [] }, | |
129 | + { text: 'Female', value: 'female', children: [] }, | |
130 | 130 | ], |
131 | 131 | }, |
132 | 132 | { |
... | ... | @@ -190,8 +190,8 @@ export function getMergeHeaderColumns(): BasicColumn[] { |
190 | 190 | dataIndex: 'no', |
191 | 191 | colSpan: 0, |
192 | 192 | filters: [ |
193 | - { text: 'Male', value: 'male' }, | |
194 | - { text: 'Female', value: 'female' }, | |
193 | + { text: 'Male', value: 'male', children: [] }, | |
194 | + { text: 'Female', value: 'female', children: [] }, | |
195 | 195 | ], |
196 | 196 | customRender: renderContent, |
197 | 197 | }, | ... | ... |