@jiaozhiye/qm-design-react 1.12.7 → 1.12.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/empty/style/index.less +36 -36
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/pivot-grid/style/grid-layout.less +501 -501
- package/lib/style/index.css +2 -2
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/context/index.d.ts +1 -0
- package/lib/table/src/hooks/useTableLayout.d.ts +1 -0
- package/lib/table/src/hooks/useTableMemo.d.ts +3 -0
- package/lib/table/src/hooks/useTableRef.d.ts +2 -5
- package/lib/table/src/hooks/useTableVirtual.d.ts +2 -2
- package/lib/table/src/store/index.d.ts +2 -0
- package/lib/table/src/utils/index.d.ts +1 -0
- package/lib/table/style/body.less +105 -105
- package/lib/table/style/fast-search.less +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ITableProps, IColumn, IRowKey, IRecord, getRowKeyType, IFetchParams, ISorter, IFilter, IPagination, ISuperFilter, IMergedCell, IMergeCellItem } from '../table/types';
|
|
3
3
|
import type { ITableRef } from './useTableRef';
|
|
4
|
+
import type { ComponentSize } from '../../../_utils/types';
|
|
4
5
|
type IExtra = {
|
|
5
6
|
getRowKey: getRowKeyType;
|
|
6
7
|
tableRef: React.MutableRefObject<ITableRef>;
|
|
8
|
+
$size: ComponentSize;
|
|
7
9
|
tableFullData: IRecord[];
|
|
8
10
|
tableFlatData: IRecord[];
|
|
9
11
|
updateMark: number;
|
|
@@ -25,6 +27,7 @@ declare const useTableMemo: <T extends ITableProps>(props: T, extra: IExtra) =>
|
|
|
25
27
|
summationColumns: IColumn[];
|
|
26
28
|
leftFixedColumns: IColumn[];
|
|
27
29
|
rightFixedColumns: IColumn[];
|
|
30
|
+
tableRowHeight: number;
|
|
28
31
|
derivedMergeCells: IMergeCellItem[];
|
|
29
32
|
treeExpandIndex: string;
|
|
30
33
|
showSummary: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TableManager from '../manager';
|
|
3
3
|
import Store from '../store';
|
|
4
|
+
import type { Nullable } from '../../../_utils/types';
|
|
4
5
|
import type { ScrollbarRef } from '../../../scrollbar/src/scrollbar';
|
|
5
6
|
import type { getRowKeyType, IColumn, IFieldAuthItem, InsertMode, IRecord, IRowKey, ITableProps } from '../table/types';
|
|
6
|
-
import type { ComponentSize, Nullable } from '../../../_utils/types';
|
|
7
7
|
export type ITableRef = {
|
|
8
8
|
props: ITableProps;
|
|
9
9
|
uid: string;
|
|
@@ -16,7 +16,6 @@ export type ITableRef = {
|
|
|
16
16
|
fieldAuth: Record<string, IFieldAuthItem>;
|
|
17
17
|
columnsDefined: boolean;
|
|
18
18
|
scrollBarRef: React.RefObject<ScrollbarRef>;
|
|
19
|
-
rowHeight: number;
|
|
20
19
|
store: Store;
|
|
21
20
|
resizeState: {
|
|
22
21
|
width: number;
|
|
@@ -39,9 +38,8 @@ export type ITableRef = {
|
|
|
39
38
|
};
|
|
40
39
|
type IExtra = {
|
|
41
40
|
getRowKey: getRowKeyType;
|
|
42
|
-
$size: ComponentSize;
|
|
43
41
|
};
|
|
44
|
-
declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey
|
|
42
|
+
declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey }: IExtra) => {
|
|
45
43
|
setElementStore: (key: string, value: HTMLElement) => void;
|
|
46
44
|
setOriginColumns: (columns: IColumn[]) => void;
|
|
47
45
|
setTableFullData: (records: IRecord[]) => void;
|
|
@@ -69,7 +67,6 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
|
|
|
69
67
|
fieldAuth: Record<string, IFieldAuthItem>;
|
|
70
68
|
columnsDefined: boolean;
|
|
71
69
|
scrollBarRef: React.RefObject<ScrollbarRef>;
|
|
72
|
-
rowHeight: number;
|
|
73
70
|
store: Store;
|
|
74
71
|
resizeState: {
|
|
75
72
|
width: number;
|
|
@@ -9,8 +9,8 @@ declare const useTableVirtual: (tableFlatData: IRecord[], tableFlatColumns: ICol
|
|
|
9
9
|
getXIndexes: () => number[];
|
|
10
10
|
virtualTranslateY: () => number;
|
|
11
11
|
virtualTranslateX: () => number;
|
|
12
|
-
calcVirtualYSize: () => number |
|
|
13
|
-
calcVirtualXSize: () => number |
|
|
12
|
+
calcVirtualYSize: () => number | "";
|
|
13
|
+
calcVirtualXSize: () => number | "";
|
|
14
14
|
scrollToYIndex: (index: number) => void;
|
|
15
15
|
scrollToXIndex: (index: number) => void;
|
|
16
16
|
};
|
|
@@ -4,6 +4,7 @@ import type { IColumn, IDerivedRowKeys, IMergeCellItem, IRecord, IRowKey, ISorte
|
|
|
4
4
|
import type { Nullable, AnyObject } from '../../../_utils/types';
|
|
5
5
|
export declare const columnsFlatMap: (columns: IColumn[]) => IColumn[];
|
|
6
6
|
export declare const createFilterColumns: (columns: IColumn[]) => IColumn[];
|
|
7
|
+
export declare const createShadowColumns: (columns: IColumn[]) => IColumn[];
|
|
7
8
|
export declare const getAllColumns: (columns: IColumn[]) => IColumn[];
|
|
8
9
|
export declare const mapTableColumns: (columns: IColumn[], callback?: ((column: IColumn) => void) | undefined) => IColumn[];
|
|
9
10
|
export declare const deepFindColumn: (columns: IColumn[], mark: string) => Nullable<IColumn>;
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2020-02-28 22:13:54
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2024-12-01 18:48:00
|
|
6
|
-
*/
|
|
7
|
-
.body--row {
|
|
8
|
-
// position: sticky; // 解决列固定快读滚动时,非固定列上下留白卡顿问题(chrome 135~137),138版本后已修复
|
|
9
|
-
&-draggable {
|
|
10
|
-
position: relative;
|
|
11
|
-
.drop-indicator {
|
|
12
|
-
position: absolute;
|
|
13
|
-
right: 0;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
z-index: 5;
|
|
16
|
-
height: 2px;
|
|
17
|
-
background-color: @v-primary-color;
|
|
18
|
-
border-radius: 1px;
|
|
19
|
-
pointer-events: none;
|
|
20
|
-
&::after {
|
|
21
|
-
position: absolute;
|
|
22
|
-
top: -3px;
|
|
23
|
-
left: 0;
|
|
24
|
-
width: 8px;
|
|
25
|
-
height: 8px;
|
|
26
|
-
background-color: #fff;
|
|
27
|
-
border: 2px solid @v-primary-color;
|
|
28
|
-
border-radius: 50%;
|
|
29
|
-
content: '';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
.body--column {
|
|
35
|
-
.cell--edit {
|
|
36
|
-
margin: 0 -1 * (@v-module-distance - 1px);
|
|
37
|
-
// placeholder
|
|
38
|
-
input::placeholder {
|
|
39
|
-
text-align: left;
|
|
40
|
-
}
|
|
41
|
-
// search
|
|
42
|
-
.ant-input-search {
|
|
43
|
-
width: calc(100% + 1px);
|
|
44
|
-
& > .ant-input-group > .ant-input-group-addon {
|
|
45
|
-
line-height: 1;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
// search-helper-multiple
|
|
49
|
-
.search-helper-multiple {
|
|
50
|
-
.ant-input-group > .ant-select:first-child {
|
|
51
|
-
z-index: 1;
|
|
52
|
-
.ant-select-selector {
|
|
53
|
-
border-top-right-radius: 0;
|
|
54
|
-
border-bottom-right-radius: 0;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
.ant-select-multiple {
|
|
58
|
-
.ant-select-selection-overflow-item-rest {
|
|
59
|
-
pointer-events: none;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
// textArea
|
|
64
|
-
textarea[class='ant-input'] {
|
|
65
|
-
resize: none;
|
|
66
|
-
}
|
|
67
|
-
&.is-error {
|
|
68
|
-
position: relative;
|
|
69
|
-
.ant-input,
|
|
70
|
-
.ant-input-affix-wrapper,
|
|
71
|
-
.ant-select > .ant-select-selector {
|
|
72
|
-
border-color: @v-danger-color;
|
|
73
|
-
box-shadow: none;
|
|
74
|
-
z-index: 1;
|
|
75
|
-
}
|
|
76
|
-
.ant-input-search {
|
|
77
|
-
& + .cell-error {
|
|
78
|
-
right: 38px;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
.cell-error {
|
|
82
|
-
position: absolute;
|
|
83
|
-
top: calc(50% - 9px);
|
|
84
|
-
font-size: @v-font-size-small;
|
|
85
|
-
color: @v-danger-color;
|
|
86
|
-
right: 8px;
|
|
87
|
-
pointer-events: none;
|
|
88
|
-
z-index: 1;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
&.col--center {
|
|
93
|
-
.cell--edit .ant-input {
|
|
94
|
-
text-align: center;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
&.col--right {
|
|
98
|
-
.cell--edit .ant-input {
|
|
99
|
-
text-align: right;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
&.selected {
|
|
103
|
-
background-color: @v-table-row-selected-background-color !important;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2020-02-28 22:13:54
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2024-12-01 18:48:00
|
|
6
|
+
*/
|
|
7
|
+
.body--row {
|
|
8
|
+
// position: sticky; // 解决列固定快读滚动时,非固定列上下留白卡顿问题(chrome 135~137),138版本后已修复
|
|
9
|
+
&-draggable {
|
|
10
|
+
position: relative;
|
|
11
|
+
.drop-indicator {
|
|
12
|
+
position: absolute;
|
|
13
|
+
right: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
z-index: 5;
|
|
16
|
+
height: 2px;
|
|
17
|
+
background-color: @v-primary-color;
|
|
18
|
+
border-radius: 1px;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
&::after {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: -3px;
|
|
23
|
+
left: 0;
|
|
24
|
+
width: 8px;
|
|
25
|
+
height: 8px;
|
|
26
|
+
background-color: #fff;
|
|
27
|
+
border: 2px solid @v-primary-color;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
content: '';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.body--column {
|
|
35
|
+
.cell--edit {
|
|
36
|
+
margin: 0 -1 * (@v-module-distance - 1px);
|
|
37
|
+
// placeholder
|
|
38
|
+
input::placeholder {
|
|
39
|
+
text-align: left;
|
|
40
|
+
}
|
|
41
|
+
// search
|
|
42
|
+
.ant-input-search {
|
|
43
|
+
width: calc(100% + 1px);
|
|
44
|
+
& > .ant-input-group > .ant-input-group-addon {
|
|
45
|
+
line-height: 1;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// search-helper-multiple
|
|
49
|
+
.search-helper-multiple {
|
|
50
|
+
.ant-input-group > .ant-select:first-child {
|
|
51
|
+
z-index: 1;
|
|
52
|
+
.ant-select-selector {
|
|
53
|
+
border-top-right-radius: 0;
|
|
54
|
+
border-bottom-right-radius: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
.ant-select-multiple {
|
|
58
|
+
.ant-select-selection-overflow-item-rest {
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// textArea
|
|
64
|
+
textarea[class='ant-input'] {
|
|
65
|
+
resize: none;
|
|
66
|
+
}
|
|
67
|
+
&.is-error {
|
|
68
|
+
position: relative;
|
|
69
|
+
.ant-input,
|
|
70
|
+
.ant-input-affix-wrapper,
|
|
71
|
+
.ant-select > .ant-select-selector {
|
|
72
|
+
border-color: @v-danger-color;
|
|
73
|
+
box-shadow: none;
|
|
74
|
+
z-index: 1;
|
|
75
|
+
}
|
|
76
|
+
.ant-input-search {
|
|
77
|
+
& + .cell-error {
|
|
78
|
+
right: 38px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.cell-error {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: calc(50% - 9px);
|
|
84
|
+
font-size: @v-font-size-small;
|
|
85
|
+
color: @v-danger-color;
|
|
86
|
+
right: 8px;
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
z-index: 1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
&.col--center {
|
|
93
|
+
.cell--edit .ant-input {
|
|
94
|
+
text-align: center;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
&.col--right {
|
|
98
|
+
.cell--edit .ant-input {
|
|
99
|
+
text-align: right;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
&.selected {
|
|
103
|
+
background-color: @v-table-row-selected-background-color !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
overflow-y: auto;
|
|
48
48
|
.rtable {
|
|
49
49
|
width: 100%;
|
|
50
|
-
border: 1px solid @v-table-border-color;
|
|
51
50
|
thead {
|
|
52
51
|
position: sticky;
|
|
53
52
|
top: 0;
|
|
54
53
|
th {
|
|
54
|
+
border-bottom: 1px solid @v-table-border-color;
|
|
55
55
|
background-color: @v-table-header-background-color;
|
|
56
56
|
height: 30px;
|
|
57
57
|
text-align: center;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
td {
|
|
74
74
|
height: 30px;
|
|
75
75
|
text-align: center;
|
|
76
|
-
border-
|
|
76
|
+
border-bottom: 1px solid @v-table-border-color;
|
|
77
77
|
cursor: pointer;
|
|
78
78
|
.text-overflow-cut();
|
|
79
79
|
max-width: 0;
|