Skip to content

Commit 0d5b0e3

Browse files
committed
fix: github release ci fix
1 parent 54518f0 commit 0d5b0e3

7 files changed

Lines changed: 38 additions & 23 deletions

File tree

packages/react-vtable/src/components/avatar/avatar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ function getGroupAttribute(props: AvatarProps) {
100100
height: size,
101101
clip: true,
102102
cornerRadius: shape === 'circle' ? size / 2 : panelStyle.cornerRadius ?? 2,
103-
cornerType: 'round', // 添加必需的 cornerType 属性
104103
display: 'flex',
105104
alignItems: 'center',
106105
justifyContent: 'center',

packages/react-vtable/src/tables/list-table-simple.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import { ListTableSimple as ListTableConstrouctor } from '@visactor/vtable';
44
import type { BaseTableProps } from './base-table';
55
import { createTable } from './base-table';
66

7-
export interface ListTableProps
8-
extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,
9-
Omit<ListTableConstructorOptions, 'container'> {}
7+
// 类型覆盖工具:让 ListTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性
8+
type Override<T, U> = Omit<T, keyof U> & U;
9+
10+
export type ListTableProps = Override<
11+
Omit<BaseTableProps, 'records' | 'container'>,
12+
Omit<ListTableConstructorOptions, 'container'>
13+
>;
1014

1115
export const ListTableSimple = createTable<React.PropsWithChildren<ListTableProps>>('ListTable', {
1216
type: 'list-table',

packages/react-vtable/src/tables/list-table.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import { ListTable as ListTableConstrouctor } from '@visactor/vtable';
44
import type { BaseTableProps } from './base-table';
55
import { createTable } from './base-table';
66

7-
export interface ListTableProps
8-
extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,
9-
Omit<ListTableConstructorOptions, 'container'> {}
7+
// 类型覆盖工具:让 ListTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性
8+
type Override<T, U> = Omit<T, keyof U> & U;
9+
10+
export type ListTableProps = Override<
11+
Omit<BaseTableProps, 'records' | 'container'>,
12+
Omit<ListTableConstructorOptions, 'container'>
13+
>;
1014

1115
export const ListTable = createTable<React.PropsWithChildren<ListTableProps>>('ListTable', {
1216
type: 'list-table',

packages/react-vtable/src/tables/pivot-chart.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
import type React from 'react';
2-
import { register } from '@visactor/vtable';
3-
import type { PivotChartConstructorOptions } from '@visactor/vtable';
4-
import { PivotChart as PivotChartConstrouctor } from '@visactor/vtable';
2+
import { register, PivotChart as PivotChartConstrouctor, type PivotChartConstructorOptions } from '@visactor/vtable';
53
import type { BaseTableProps } from './base-table';
64
import { createTable } from './base-table';
75

6+
// 类型覆盖工具:让 PivotChartConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性
7+
type Override<T, U> = Omit<T, keyof U> & U;
8+
89
interface AnyRecords {
910
records: Record<string, unknown>[];
1011
}
11-
export interface PivotChartProps
12-
extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,
13-
Omit<PivotChartConstructorOptions, 'container' | 'records'>,
14-
AnyRecords {}
12+
13+
export type PivotChartProps = Override<
14+
Omit<BaseTableProps, 'records' | 'container'>,
15+
Omit<PivotChartConstructorOptions, 'container' | 'records'>
16+
> &
17+
AnyRecords;
1518

1619
export const PivotChart = createTable<React.PropsWithChildren<PivotChartProps>>('PivotChart', {
1720
type: 'pivot-chart',

packages/react-vtable/src/tables/pivot-table-simple.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import { PivotTableSimple as PivotTableConstrouctor } from '@visactor/vtable';
44
import type { BaseTableProps } from './base-table';
55
import { createTable } from './base-table';
66

7-
export interface PivotTableProps
8-
extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,
9-
Omit<PivotTableConstructorOptions, 'container'> {}
7+
// 类型覆盖工具:让 PivotTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性
8+
type Override<T, U> = Omit<T, keyof U> & U;
9+
10+
export type PivotTableProps = Override<
11+
Omit<BaseTableProps, 'records' | 'container'>,
12+
Omit<PivotTableConstructorOptions, 'container'>
13+
>;
1014

1115
export const PivotTableSimple = createTable<React.PropsWithChildren<PivotTableProps>>('PivotTable', {
1216
type: 'pivot-table',

packages/react-vtable/src/tables/pivot-table.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import { PivotTable as PivotTableConstrouctor } from '@visactor/vtable';
44
import type { BaseTableProps } from './base-table';
55
import { createTable } from './base-table';
66

7-
export interface PivotTableProps
8-
extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,
9-
Omit<PivotTableConstructorOptions, 'container'> {}
7+
// 类型覆盖工具:让 PivotTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性
8+
type Override<T, U> = Omit<T, keyof U> & U;
9+
10+
export type PivotTableProps = Override<
11+
Omit<BaseTableProps, 'records' | 'container'>,
12+
Omit<PivotTableConstructorOptions, 'container'>
13+
>;
1014

1115
export const PivotTable = createTable<React.PropsWithChildren<PivotTableProps>>('PivotTable', {
1216
type: 'pivot-table',

packages/vtable-gantt/src/Gantt.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ export class Gantt extends EventTarget {
631631
if (record) {
632632
return (record.children?.length || 1) * this.parsedOptions.rowHeight;
633633
}
634-
return this.parsedOptions.rowHeight;
635634
};
636635
listTable_options.defaultRowHeight = 'auto';
637636
listTable_options.customConfig = { forceComputeAllRowHeight: true };
@@ -642,7 +641,6 @@ export class Gantt extends EventTarget {
642641
if (record) {
643642
return computeRowsCountByRecordDateForCompact(this, record) * this.parsedOptions.rowHeight;
644643
}
645-
return this.parsedOptions.rowHeight;
646644
};
647645
listTable_options.defaultRowHeight = 'auto';
648646
listTable_options.customConfig = { forceComputeAllRowHeight: true };
@@ -653,7 +651,6 @@ export class Gantt extends EventTarget {
653651
if (record) {
654652
return computeRowsCountByRecordDate(this, record) * this.parsedOptions.rowHeight;
655653
}
656-
return this.parsedOptions.rowHeight;
657654
};
658655
listTable_options.defaultRowHeight = 'auto';
659656
listTable_options.customConfig = { forceComputeAllRowHeight: true };

0 commit comments

Comments
 (0)