dcp-design-react 1.11.2 → 1.11.3
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/form/style/index.less +3 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/en.d.ts +4 -4
- package/lib/locale/lang/en.js +4 -4
- package/lib/locale/lang/zh-cn.d.ts +4 -4
- package/lib/locale/lang/zh-cn.js +4 -4
- package/lib/pivot-grid/src/main/Context.d.ts +6 -2
- package/lib/pivot-grid/src/utils/index.d.ts +4 -2
- package/lib/pivot-grid/style/grid-layout.less +239 -239
- package/lib/pivot-grid/style/top-bar.less +34 -3
- package/lib/pivot-grid/style/variable.less +7 -7
- package/lib/scrollbar/src/scrollbar.d.ts +1 -0
- package/lib/scrollbar/style/index.less +1 -0
- package/lib/style/index.css +49 -10
- package/lib/style/index.less +43 -43
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/body/DraggableTr.d.ts +2 -1
- package/lib/table/src/body/index.d.ts +2 -6
- package/lib/table/src/config/index.d.ts +1 -0
- package/lib/table/src/context/index.d.ts +3 -8
- package/lib/table/src/export/useExport.d.ts +1 -1
- package/lib/table/src/footer/index.d.ts +1 -4
- package/lib/table/src/header/index.d.ts +1 -3
- package/lib/table/src/hooks/useImperativeMethod.d.ts +0 -1
- package/lib/table/src/hooks/useTableCore.d.ts +3 -17
- package/lib/table/src/hooks/useTableEffect.d.ts +0 -2
- package/lib/table/src/hooks/useTableLayout.d.ts +3 -15
- package/lib/table/src/hooks/useTableMemo.d.ts +1 -3
- package/lib/table/src/hooks/useTableRef.d.ts +4 -33
- package/lib/table/src/hooks/useTableState.d.ts +5 -14
- package/lib/table/src/hooks/useTableVirtual.d.ts +17 -0
- package/lib/table/src/table/props.d.ts +0 -1
- package/lib/table/src/table/types.d.ts +3 -2
- package/lib/table/style/body.less +103 -103
- package/lib/table/style/column-filter.less +5 -5
- package/lib/table/style/index.less +31 -31
- package/lib/table/style/pivot-grid.less +19 -19
- package/lib/virtual-list/index.d.ts +1 -1
- package/lib/virtual-list/src/list-item.d.ts +2 -1
- package/lib/virtual-list/src/virtual-list.d.ts +5 -4
- package/lib/virtual-list/style/index.less +21 -16
- package/package.json +1 -1
|
@@ -1,103 +1,103 @@
|
|
|
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
|
-
&-draggable {
|
|
9
|
-
position: relative;
|
|
10
|
-
.drop-indicator {
|
|
11
|
-
position: absolute;
|
|
12
|
-
right: 0;
|
|
13
|
-
bottom: 0;
|
|
14
|
-
z-index: 5;
|
|
15
|
-
height: 2px;
|
|
16
|
-
background-color: @v-primary-color;
|
|
17
|
-
border-radius: 1px;
|
|
18
|
-
pointer-events: none;
|
|
19
|
-
&::after {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: -3px;
|
|
22
|
-
left: 0;
|
|
23
|
-
width: 8px;
|
|
24
|
-
height: 8px;
|
|
25
|
-
background-color: #fff;
|
|
26
|
-
border: 2px solid @v-primary-color;
|
|
27
|
-
border-radius: 50%;
|
|
28
|
-
content: '';
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
.body--column {
|
|
34
|
-
.cell--edit {
|
|
35
|
-
margin: 0 -1 * (@v-module-distance - 1px);
|
|
36
|
-
// placeholder
|
|
37
|
-
input::placeholder {
|
|
38
|
-
text-align: left;
|
|
39
|
-
}
|
|
40
|
-
// search
|
|
41
|
-
.ant-input-search {
|
|
42
|
-
width: calc(100% + 1px);
|
|
43
|
-
& > .ant-input-group > .ant-input-group-addon {
|
|
44
|
-
line-height: 1;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// search-helper-multiple
|
|
48
|
-
.search-helper-multiple {
|
|
49
|
-
.ant-input-group > .ant-select:first-child {
|
|
50
|
-
z-index: 1;
|
|
51
|
-
.ant-select-selector {
|
|
52
|
-
border-top-right-radius: 0;
|
|
53
|
-
border-bottom-right-radius: 0;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
.ant-select-multiple {
|
|
57
|
-
.ant-select-selection-overflow-item-rest {
|
|
58
|
-
pointer-events: none;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// textArea
|
|
63
|
-
textarea[class='ant-input'] {
|
|
64
|
-
resize: none;
|
|
65
|
-
}
|
|
66
|
-
&.is-error {
|
|
67
|
-
position: relative;
|
|
68
|
-
.ant-input,
|
|
69
|
-
.ant-input-affix-wrapper {
|
|
70
|
-
border-color: @v-danger-color;
|
|
71
|
-
box-shadow: none;
|
|
72
|
-
z-index: 1;
|
|
73
|
-
}
|
|
74
|
-
.ant-input-search {
|
|
75
|
-
& + .cell-error {
|
|
76
|
-
right: 38px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
.cell-error {
|
|
80
|
-
position: absolute;
|
|
81
|
-
top: calc(50% - 9px);
|
|
82
|
-
font-size: @v-font-size-small;
|
|
83
|
-
color: @v-danger-color;
|
|
84
|
-
right: 8px;
|
|
85
|
-
pointer-events: none;
|
|
86
|
-
z-index: 1;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
&.col--center {
|
|
91
|
-
.cell--edit .ant-input {
|
|
92
|
-
text-align: center;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
&.col--right {
|
|
96
|
-
.cell--edit .ant-input {
|
|
97
|
-
text-align: right;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
&.selected {
|
|
101
|
-
background-color: @v-table-row-selected-background-color !important;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
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
|
+
&-draggable {
|
|
9
|
+
position: relative;
|
|
10
|
+
.drop-indicator {
|
|
11
|
+
position: absolute;
|
|
12
|
+
right: 0;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
z-index: 5;
|
|
15
|
+
height: 2px;
|
|
16
|
+
background-color: @v-primary-color;
|
|
17
|
+
border-radius: 1px;
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
&::after {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: -3px;
|
|
22
|
+
left: 0;
|
|
23
|
+
width: 8px;
|
|
24
|
+
height: 8px;
|
|
25
|
+
background-color: #fff;
|
|
26
|
+
border: 2px solid @v-primary-color;
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
content: '';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.body--column {
|
|
34
|
+
.cell--edit {
|
|
35
|
+
margin: 0 -1 * (@v-module-distance - 1px);
|
|
36
|
+
// placeholder
|
|
37
|
+
input::placeholder {
|
|
38
|
+
text-align: left;
|
|
39
|
+
}
|
|
40
|
+
// search
|
|
41
|
+
.ant-input-search {
|
|
42
|
+
width: calc(100% + 1px);
|
|
43
|
+
& > .ant-input-group > .ant-input-group-addon {
|
|
44
|
+
line-height: 1;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// search-helper-multiple
|
|
48
|
+
.search-helper-multiple {
|
|
49
|
+
.ant-input-group > .ant-select:first-child {
|
|
50
|
+
z-index: 1;
|
|
51
|
+
.ant-select-selector {
|
|
52
|
+
border-top-right-radius: 0;
|
|
53
|
+
border-bottom-right-radius: 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.ant-select-multiple {
|
|
57
|
+
.ant-select-selection-overflow-item-rest {
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// textArea
|
|
63
|
+
textarea[class='ant-input'] {
|
|
64
|
+
resize: none;
|
|
65
|
+
}
|
|
66
|
+
&.is-error {
|
|
67
|
+
position: relative;
|
|
68
|
+
.ant-input,
|
|
69
|
+
.ant-input-affix-wrapper {
|
|
70
|
+
border-color: @v-danger-color;
|
|
71
|
+
box-shadow: none;
|
|
72
|
+
z-index: 1;
|
|
73
|
+
}
|
|
74
|
+
.ant-input-search {
|
|
75
|
+
& + .cell-error {
|
|
76
|
+
right: 38px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.cell-error {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: calc(50% - 9px);
|
|
82
|
+
font-size: @v-font-size-small;
|
|
83
|
+
color: @v-danger-color;
|
|
84
|
+
right: 8px;
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
z-index: 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
&.col--center {
|
|
91
|
+
.cell--edit .ant-input {
|
|
92
|
+
text-align: center;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
&.col--right {
|
|
96
|
+
.cell--edit .ant-input {
|
|
97
|
+
text-align: right;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
&.selected {
|
|
101
|
+
background-color: @v-table-row-selected-background-color !important;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
|
|
23
23
|
.column-filter__popper {
|
|
24
24
|
padding: 0 !important;
|
|
25
|
-
min-width:
|
|
26
|
-
max-width:
|
|
25
|
+
min-width: 160px;
|
|
26
|
+
max-width: 220px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.column-item__popper {
|
|
30
30
|
padding-right: @v-module-distance !important;
|
|
31
|
-
min-width:
|
|
32
|
-
max-width:
|
|
31
|
+
min-width: 160px;
|
|
32
|
+
max-width: 220px;
|
|
33
33
|
.ant-popover-arrow {
|
|
34
34
|
display: none;
|
|
35
35
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
.box-sizing-content();
|
|
47
47
|
li.item {
|
|
48
48
|
position: relative;
|
|
49
|
-
line-height: 1.
|
|
49
|
+
line-height: 1.85;
|
|
50
50
|
.text-overflow-cut();
|
|
51
51
|
.handle {
|
|
52
52
|
padding: 2px;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2021-07-23 19:05:57
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2024-12-01 14:16:57
|
|
6
|
-
*/
|
|
7
|
-
@import './variable.less';
|
|
8
|
-
@import './toper.less';
|
|
9
|
-
@import './alert.less';
|
|
10
|
-
@import './full-screen.less';
|
|
11
|
-
@import './reload.less';
|
|
12
|
-
@import './print.less';
|
|
13
|
-
@import './import.less';
|
|
14
|
-
@import './export.less';
|
|
15
|
-
@import './clipboard.less';
|
|
16
|
-
@import './tollbox.less';
|
|
17
|
-
@import './select-collection.less';
|
|
18
|
-
@import './group-summary.less';
|
|
19
|
-
@import './super-search.less';
|
|
20
|
-
@import './fast-search.less';
|
|
21
|
-
@import './pivot-grid.less';
|
|
22
|
-
@import './column-filter.less';
|
|
23
|
-
@import './table.less';
|
|
24
|
-
@import './header.less';
|
|
25
|
-
@import './body.less';
|
|
26
|
-
@import './footer.less';
|
|
27
|
-
@import './area-select.less';
|
|
28
|
-
@import './pager.less';
|
|
29
|
-
@import './empty.less';
|
|
30
|
-
@import './expandable.less';
|
|
31
|
-
@import './size.less';
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2024-12-01 14:16:57
|
|
6
|
+
*/
|
|
7
|
+
@import './variable.less';
|
|
8
|
+
@import './toper.less';
|
|
9
|
+
@import './alert.less';
|
|
10
|
+
@import './full-screen.less';
|
|
11
|
+
@import './reload.less';
|
|
12
|
+
@import './print.less';
|
|
13
|
+
@import './import.less';
|
|
14
|
+
@import './export.less';
|
|
15
|
+
@import './clipboard.less';
|
|
16
|
+
@import './tollbox.less';
|
|
17
|
+
@import './select-collection.less';
|
|
18
|
+
@import './group-summary.less';
|
|
19
|
+
@import './super-search.less';
|
|
20
|
+
@import './fast-search.less';
|
|
21
|
+
@import './pivot-grid.less';
|
|
22
|
+
@import './column-filter.less';
|
|
23
|
+
@import './table.less';
|
|
24
|
+
@import './header.less';
|
|
25
|
+
@import './body.less';
|
|
26
|
+
@import './footer.less';
|
|
27
|
+
@import './area-select.less';
|
|
28
|
+
@import './pager.less';
|
|
29
|
+
@import './empty.less';
|
|
30
|
+
@import './expandable.less';
|
|
31
|
+
@import './size.less';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2024-12-01 14:16:05
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2024-12-01 14:16:28
|
|
6
|
-
*/
|
|
7
|
-
.@{prefix-table}-pivot-grid {
|
|
8
|
-
display: inline-block;
|
|
9
|
-
padding: 5px 3px;
|
|
10
|
-
line-height: 1;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
transition: all 0.3s ease;
|
|
13
|
-
.icon {
|
|
14
|
-
font-size: 1.05em;
|
|
15
|
-
}
|
|
16
|
-
&:hover {
|
|
17
|
-
color: @v-primary-color;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2024-12-01 14:16:05
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2024-12-01 14:16:28
|
|
6
|
+
*/
|
|
7
|
+
.@{prefix-table}-pivot-grid {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
padding: 5px 3px;
|
|
10
|
+
line-height: 1;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
transition: all 0.3s ease;
|
|
13
|
+
.icon {
|
|
14
|
+
font-size: 1.05em;
|
|
15
|
+
}
|
|
16
|
+
&:hover {
|
|
17
|
+
color: @v-primary-color;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type IProps = {
|
|
3
|
+
dataIndex: number;
|
|
3
4
|
className?: string;
|
|
4
5
|
style?: React.CSSProperties;
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
};
|
|
7
|
-
declare const ListItem: React.
|
|
8
|
+
declare const ListItem: React.ForwardRefExoticComponent<IProps & React.RefAttributes<any>>;
|
|
8
9
|
export default ListItem;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Virtualizer } from './useVirtual';
|
|
3
3
|
import type { IRecord } from '../../table/src/table/types';
|
|
4
|
-
import ListItem from './list-item';
|
|
5
4
|
type IProps = {
|
|
6
5
|
height?: number;
|
|
6
|
+
maxHeight?: number;
|
|
7
7
|
itemHeight?: number;
|
|
8
8
|
dataSource?: IRecord[];
|
|
9
9
|
className?: string;
|
|
10
10
|
style?: React.CSSProperties;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
11
|
renderItem?: (item: IRecord, index: number) => React.ReactNode;
|
|
13
12
|
onScroll?: (instance: Virtualizer<Element, Element>, sync: boolean) => void;
|
|
14
13
|
};
|
|
15
14
|
export type VirtualListProps = IProps;
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
export type VirtualListRef = {
|
|
16
|
+
SCROLL_TO_INDEX: (index: number) => void;
|
|
17
|
+
SCROLL_TO_OFFSET: (offset: number) => void;
|
|
18
18
|
};
|
|
19
|
+
declare const VirtualList: React.ForwardRefExoticComponent<IProps & React.RefAttributes<VirtualListRef>>;
|
|
19
20
|
export default VirtualList;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2024-12-02 09:06:20
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2024-12-02 13:16:55
|
|
6
|
-
*/
|
|
7
|
-
@import '../../style/common';
|
|
8
|
-
|
|
9
|
-
@prefix-virtual-list: ~'@{qm-prefix}-virtual-list';
|
|
10
|
-
|
|
11
|
-
.@{prefix-virtual-list} {
|
|
12
|
-
.reset-container();
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2024-12-02 09:06:20
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2024-12-02 13:16:55
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-virtual-list: ~'@{qm-prefix}-virtual-list';
|
|
10
|
+
|
|
11
|
+
.@{prefix-virtual-list} {
|
|
12
|
+
.reset-container();
|
|
13
|
+
.container {
|
|
14
|
+
display: block;
|
|
15
|
+
ul {
|
|
16
|
+
li.list-item {
|
|
17
|
+
list-style: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|