@lingxiteam/ebe-utils 0.1.17 → 0.1.18
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/pcpublic/src/components/pcfactory/src/Table/BodyCell/index.tsx +17 -5
- package/lib/pcpublic/src/components/pcfactory/src/Table/EditComponent/index.tsx +12 -7
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/Thumbnail/index.tsx +284 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/FormatCell/index.tsx +37 -1
- package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/SingleBtn.tsx +120 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/OperationCell/index.tsx +436 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/TableHead/index.tsx +64 -47
- package/lib/pcpublic/src/components/pcfactory/src/Table/assets/placeholder.png +0 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/constant.ts +1 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useCMDActions.ts +17 -3
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useColumns.tsx +141 -522
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useExpandable.tsx +42 -3
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFilter.tsx +3 -2
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useFormatCell.tsx +326 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowEdit.ts +13 -7
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useRowMerge.ts +9 -4
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSort.ts +5 -2
- package/lib/pcpublic/src/components/pcfactory/src/Table/hooks/useSummaryCol.ts +21 -8
- package/lib/pcpublic/src/components/pcfactory/src/Table/index.tsx +3 -2
- package/lib/pcpublic/src/components/pcfactory/src/Table/types/OperationCell.d.ts +38 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/types/bodyCell.d.ts +3 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/types/contentStyle.d.ts +4 -0
- package/lib/pcpublic/src/components/pcfactory/src/Table/utils/index.ts +14 -9
- package/lib/pcpublic/src/components/pcfactory/src/styles/components/Table.less +138 -14
- package/package.json +2 -2
|
@@ -212,17 +212,22 @@ export const handleExpandColumn = ({
|
|
|
212
212
|
expandIconPositionRef
|
|
213
213
|
) {
|
|
214
214
|
// 找到行展开图标位置 基准列的索引(有可能也是分组)
|
|
215
|
-
const refColIndex = columns?.findIndex(
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
const refColIndex = columns?.findIndex(
|
|
216
|
+
(c: { dataIndex: string | string[]; [key: string]: any }) => {
|
|
217
|
+
if (c.dataIndex) {
|
|
218
|
+
return (
|
|
219
|
+
`${c.dataIndex || ''}` ===
|
|
220
|
+
`${expandIconPositionRef?.dataIndex || ''}`
|
|
221
|
+
);
|
|
222
|
+
}
|
|
219
223
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
if (c.title) {
|
|
225
|
+
return c.title === expandIconPositionRef?.title;
|
|
226
|
+
}
|
|
223
227
|
|
|
224
|
-
|
|
225
|
-
|
|
228
|
+
return false;
|
|
229
|
+
},
|
|
230
|
+
);
|
|
226
231
|
|
|
227
232
|
// 说明存在基准列,则进一步定位左右侧
|
|
228
233
|
if (refColIndex !== -1) {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
display: flex;
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
background-color: #fff;
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
.@{ant-prefix}-table-expanded-row-fixed:has(.@{ant-prefix}-empty-normal) {
|
|
20
20
|
width: 100%!important;
|
|
21
21
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
.@{ant-prefix}-table-summary {
|
|
24
24
|
background: transparent;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
.table-head-default,
|
|
28
28
|
.table-head-middle {
|
|
29
29
|
margin-bottom: 16px;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
.@{table-prefix-cls} {
|
|
42
42
|
line-height: @table-data-input-height;
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
.@{ant-prefix}-skeleton-element {
|
|
45
45
|
width: 100%;
|
|
46
46
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
&:hover {
|
|
56
56
|
color: color(~`colorPalette('@{primary-color}', 5) `);
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
&:active {
|
|
60
60
|
color: color(~`colorPalette('@{primary-color}', 7) `);
|
|
61
61
|
}
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
border-radius: 0;
|
|
71
71
|
.@{table-prefix-cls}-thead {
|
|
72
72
|
th {
|
|
73
|
-
background: tint(@primary-color, 90%);
|
|
73
|
+
background: tint(@primary-color, 90%);
|
|
74
74
|
}
|
|
75
|
-
}
|
|
75
|
+
}
|
|
76
76
|
tr {
|
|
77
77
|
td,
|
|
78
78
|
th {
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
&:empty {
|
|
359
359
|
height: @table-small-td-height;
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
|
|
362
362
|
.@{ant-prefix}-input:not(textarea),
|
|
363
363
|
.@{ant-prefix}-input-number,
|
|
364
364
|
.@{ant-prefix}-input-number-input,
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
.@{switch-prefix-cls} {
|
|
400
400
|
@small-switch-handle-input-height: @small-table-data-input-line-height - 4px;
|
|
401
401
|
min-width: @small-switch-handle-input-height * 2;
|
|
402
|
-
|
|
402
|
+
|
|
403
403
|
&-handle {
|
|
404
404
|
&::before {
|
|
405
405
|
border-radius: 50%;
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
.@{form-prefix-cls}-explain {
|
|
435
435
|
top: 2px;
|
|
436
436
|
}
|
|
437
|
-
}
|
|
437
|
+
}
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
&:empty {
|
|
470
470
|
height: @table-middle-td-height;
|
|
471
471
|
}
|
|
472
|
-
|
|
472
|
+
|
|
473
473
|
.@{ant-prefix}-input:not(textarea),
|
|
474
474
|
.@{ant-prefix}-input-number,
|
|
475
475
|
.@{ant-prefix}-input-number-input,
|
|
@@ -718,7 +718,7 @@
|
|
|
718
718
|
.@{ant-prefix}-table-fixed {
|
|
719
719
|
width: auto;
|
|
720
720
|
}
|
|
721
|
-
|
|
721
|
+
|
|
722
722
|
// 编辑器的表格内置分页组件中,为了显示快速跳转,会人为的让页数变为 2页,所以要写死隐藏 第2页的跳转标识
|
|
723
723
|
.@{ant-prefix}-pagination-item-2 {
|
|
724
724
|
display: none;
|
|
@@ -968,7 +968,8 @@
|
|
|
968
968
|
.ued-table-cell-pointTag {
|
|
969
969
|
display: inline-flex;
|
|
970
970
|
align-items: center;
|
|
971
|
-
|
|
971
|
+
vertical-align: middle;
|
|
972
|
+
|
|
972
973
|
&-point {
|
|
973
974
|
display: inline-block;
|
|
974
975
|
width: 4px;
|
|
@@ -976,7 +977,7 @@
|
|
|
976
977
|
border-radius: 50%;
|
|
977
978
|
margin-right: 4px;
|
|
978
979
|
}
|
|
979
|
-
|
|
980
|
+
|
|
980
981
|
&-text {
|
|
981
982
|
font-size: @font-size-sm;
|
|
982
983
|
color: @text-color;
|
|
@@ -991,6 +992,7 @@
|
|
|
991
992
|
font-size: 10px;
|
|
992
993
|
line-height: 18px;
|
|
993
994
|
padding: 0 6px;
|
|
995
|
+
vertical-align: middle;
|
|
994
996
|
}
|
|
995
997
|
|
|
996
998
|
.ued-table-cell-pureColourFill {
|
|
@@ -1013,6 +1015,55 @@
|
|
|
1013
1015
|
}
|
|
1014
1016
|
}
|
|
1015
1017
|
|
|
1018
|
+
.ued-table-cell-thumbnail {
|
|
1019
|
+
display: flex;
|
|
1020
|
+
&-item {
|
|
1021
|
+
position: relative;
|
|
1022
|
+
display: flex;
|
|
1023
|
+
align-items: center;
|
|
1024
|
+
overflow: hidden;
|
|
1025
|
+
img {
|
|
1026
|
+
width: 100%;
|
|
1027
|
+
}
|
|
1028
|
+
&:not(:last-child) {
|
|
1029
|
+
margin-right: 4px;
|
|
1030
|
+
}
|
|
1031
|
+
&:hover {
|
|
1032
|
+
.ued-table-cell-thumbnail-icons {
|
|
1033
|
+
display: flex;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
&-moreItem {
|
|
1038
|
+
background: #F7F7F7;
|
|
1039
|
+
border-radius: 2px;
|
|
1040
|
+
display: flex;
|
|
1041
|
+
align-items: center;
|
|
1042
|
+
justify-content: center;
|
|
1043
|
+
color: #64677A;
|
|
1044
|
+
font-size: 12px;
|
|
1045
|
+
&:hover {
|
|
1046
|
+
background: #EEEFEF;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
&-icons {
|
|
1050
|
+
display: none;
|
|
1051
|
+
background: rgba(0, 0, 0, 0.55);
|
|
1052
|
+
position: absolute;
|
|
1053
|
+
width: 100%;
|
|
1054
|
+
height: 100%;
|
|
1055
|
+
align-items: center;
|
|
1056
|
+
justify-content: center;
|
|
1057
|
+
top: 0;
|
|
1058
|
+
.ued-icon {
|
|
1059
|
+
color: #fff;
|
|
1060
|
+
&:not(:last-child) {
|
|
1061
|
+
margin-right: 4px;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1016
1067
|
.ued-table-row-expand-custom-icon {
|
|
1017
1068
|
border: none;
|
|
1018
1069
|
&::after {
|
|
@@ -1135,6 +1186,7 @@
|
|
|
1135
1186
|
max-height: 270px;
|
|
1136
1187
|
padding: 12px;
|
|
1137
1188
|
overflow-y: auto;
|
|
1189
|
+
width: 100%;
|
|
1138
1190
|
|
|
1139
1191
|
.@{ant-prefix}-tree li {
|
|
1140
1192
|
span.@{ant-prefix}-tree-node-content-wrapper {
|
|
@@ -1232,4 +1284,76 @@
|
|
|
1232
1284
|
// 上下合并后,下侧表头需合并
|
|
1233
1285
|
.ued-table-hidden-head-cell {
|
|
1234
1286
|
display: none;
|
|
1235
|
-
}
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
// 缩略图展示全部图片气泡卡片
|
|
1290
|
+
.ued-table-cell-thumbnail-popover {
|
|
1291
|
+
.@{ant-prefix}-popover-inner {
|
|
1292
|
+
max-height: 312px;
|
|
1293
|
+
overflow: auto;
|
|
1294
|
+
&::-webkit-scrollbar {
|
|
1295
|
+
display: none;
|
|
1296
|
+
height: 0;
|
|
1297
|
+
width: 0;
|
|
1298
|
+
background: transparent;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
.@{ant-prefix}-popover-inner-content {
|
|
1302
|
+
padding: 16px 20px !important;
|
|
1303
|
+
}
|
|
1304
|
+
&-content {
|
|
1305
|
+
display: grid;
|
|
1306
|
+
grid-template-columns: repeat(5, 1fr);
|
|
1307
|
+
row-gap: 20px;
|
|
1308
|
+
column-gap: 20px;
|
|
1309
|
+
}
|
|
1310
|
+
&-item {
|
|
1311
|
+
display: flex;
|
|
1312
|
+
flex-direction: column;
|
|
1313
|
+
}
|
|
1314
|
+
&-imgItem {
|
|
1315
|
+
width: 100px;
|
|
1316
|
+
height: 100px;
|
|
1317
|
+
border: 1px solid #F2F3F5;
|
|
1318
|
+
border-radius: 4px;
|
|
1319
|
+
position: relative;
|
|
1320
|
+
display: flex;
|
|
1321
|
+
align-items: center;
|
|
1322
|
+
overflow: hidden;
|
|
1323
|
+
img {
|
|
1324
|
+
width: 100%;
|
|
1325
|
+
}
|
|
1326
|
+
&:hover {
|
|
1327
|
+
.ued-table-cell-thumbnail-icons {
|
|
1328
|
+
display: flex;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
.ued-table-cell-thumbnail-icons {
|
|
1332
|
+
display: none;
|
|
1333
|
+
background: rgba(0, 0, 0, 0.55);
|
|
1334
|
+
position: absolute;
|
|
1335
|
+
width: 100%;
|
|
1336
|
+
height: 100%;
|
|
1337
|
+
align-items: center;
|
|
1338
|
+
justify-content: center;
|
|
1339
|
+
top: 0;
|
|
1340
|
+
.ued-icon {
|
|
1341
|
+
color: #fff;
|
|
1342
|
+
font-size: 16px;
|
|
1343
|
+
&:not(:last-child) {
|
|
1344
|
+
margin-right: 12px;
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
&-imgName {
|
|
1350
|
+
overflow: hidden;
|
|
1351
|
+
white-space: nowrap;
|
|
1352
|
+
text-overflow: ellipsis;
|
|
1353
|
+
width: 100px;
|
|
1354
|
+
font-size: 12px;
|
|
1355
|
+
margin-top: 8px;
|
|
1356
|
+
text-align: center;
|
|
1357
|
+
line-height: 22px;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingxiteam/ebe-utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@babel/types": "^7.12.12",
|
|
20
20
|
"cac": "^6.7.14",
|
|
21
21
|
"fs-extra": "9.x",
|
|
22
|
-
"@lingxiteam/ebe": "0.1.
|
|
22
|
+
"@lingxiteam/ebe": "0.1.18"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|