Skip to content

Commit

Permalink
fix(table): fix table typo
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Nov 2, 2020
1 parent 86de310 commit 69af37e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
### 🎫 Chores

- 删除菜单背景图
- 更新`ant-design-vue`版本为`beta13`
- 更新`vite`版本为`rc.9`

### 🐛 Bug Fixes

- 修复升级之后 table 类型问题

## 2.0.0-rc.8 (2020-11-2)

Expand Down
16 changes: 10 additions & 6 deletions src/components/Table/src/types/table.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { VNodeChild } from 'vue';
import type { PaginationProps } from './pagination';
import type { FormProps } from '/@/components/Form/index';
import type { IColumnProps, ITableRowSelection } from 'ant-design-vue/lib/table/interface';
import type {
ColumnProps,
TableRowSelection as ITableRowSelection,
} from 'ant-design-vue/lib/table/interface';
import { ComponentType } from './componentType';
import { ColumnProps } from './column';
// import { ColumnProps } from './column';
export declare type SortOrder = 'ascend' | 'descend';
export interface TableCurrentDataSource<T = any> {
currentDataSource: T[];
Expand Down Expand Up @@ -55,8 +58,8 @@ export interface TableCustomRecord<T = any> {
index?: number;
}

export interface SorterResult<T> {
column: ColumnProps<T>;
export interface SorterResult {
column: ColumnProps;
order: SortOrder;
field: string;
columnKey: string;
Expand Down Expand Up @@ -309,7 +312,7 @@ export interface BasicTableProps<T = any> {
* Set props on per header row
* @type Function
*/
customHeaderRow?: (column: IColumnProps, index: number) => object;
customHeaderRow?: (column: ColumnProps, index: number) => object;

/**
* Set props on per row
Expand Down Expand Up @@ -366,8 +369,9 @@ export interface BasicTableProps<T = any> {
onExpandedRowsChange?: (expandedRows: string[] | number[]) => void;
}

export interface BasicColumn extends IColumnProps {
export interface BasicColumn extends ColumnProps {
children?: BasicColumn[];

//
flag?: 'INDEX' | 'DEFAULT' | 'CHECKBOX' | 'RADIO' | 'ACTION';

Expand Down
12 changes: 6 additions & 6 deletions src/views/demo/table/tableData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export function getMultipleHeaderColumns(): BasicColumn[] {
dataIndex: 'no',
width: 120,
filters: [
{ text: 'Male', value: 'male' },
{ text: 'Female', value: 'female' },
{ text: 'Male', value: 'male', children: [] },
{ text: 'Female', value: 'female', children: [] },
],
},

Expand Down Expand Up @@ -125,8 +125,8 @@ export function getCustomHeaderColumns(): BasicColumn[] {
dataIndex: 'no',
width: 120,
filters: [
{ text: 'Male', value: 'male' },
{ text: 'Female', value: 'female' },
{ text: 'Male', value: 'male', children: [] },
{ text: 'Female', value: 'female', children: [] },
],
},
{
Expand Down Expand Up @@ -190,8 +190,8 @@ export function getMergeHeaderColumns(): BasicColumn[] {
dataIndex: 'no',
colSpan: 0,
filters: [
{ text: 'Male', value: 'male' },
{ text: 'Female', value: 'female' },
{ text: 'Male', value: 'male', children: [] },
{ text: 'Female', value: 'female', children: [] },
],
customRender: renderContent,
},
Expand Down

0 comments on commit 69af37e

Please sign in to comment.