@qn-pandora/pandora-component 5.1.1 → 5.1.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/es/components/AutoComplete/style.css +17 -17
- package/es/components/Button/style.css +69 -69
- package/es/components/Button/style.less +1 -1
- package/es/components/Card/style.css +11 -11
- package/es/components/CheckTransformList/style.css +19 -19
- package/es/components/Checkbox/index.js +9 -1
- package/es/components/CheckboxList/style.css +5 -5
- package/es/components/Collapse/style.css +1 -1
- package/es/components/DateTimePicker/Base/index.d.ts +3 -0
- package/es/components/DateTimePicker/Base/index.js +51 -6
- package/es/components/DateTimePicker/Base/style.css +67 -61
- package/es/components/DateTimePicker/Base/style.less +7 -0
- package/es/components/DateTimePicker/DisplayInput/index.js +3 -1
- package/es/components/DateTimePicker/DisplayInput/style.css +14 -14
- package/es/components/DateTimePicker/constants.d.ts +7 -1
- package/es/components/DateTimePicker/constants.js +1 -0
- package/es/components/DateTimePicker/time.d.ts +1 -0
- package/es/components/DateTimePicker/time.js +1 -0
- package/es/components/DateTimePicker/transform.js +4 -2
- package/es/components/Drawer/index.d.ts +1 -1
- package/es/components/FileResumable/index.js +2 -3
- package/es/components/FileResumable/style.css +8 -8
- package/es/components/FlameGraph/customTooltip.d.ts +22 -0
- package/es/components/FlameGraph/customTooltip.js +91 -0
- package/es/components/FlameGraph/index.d.ts +16 -0
- package/es/components/FlameGraph/index.js +96 -0
- package/es/components/FlameGraph/style.css +8 -0
- package/es/components/FlameGraph/style.less +14 -0
- package/es/components/Input/style.css +14 -14
- package/es/components/Menu/Option.d.ts +1 -1
- package/es/components/Menu/Option.js +12 -4
- package/es/components/Menu/style.css +23 -23
- package/es/components/Modal/style.css +1 -1
- package/es/components/NameExplainTooltip/style.css +1 -1
- package/es/components/OptionList/InlineOptionList/style.css +1 -1
- package/es/components/OptionList/OptionItem/style.css +2 -2
- package/es/components/OptionList/PopoverOptionList/style.css +3 -3
- package/es/components/OptionList/style.css +6 -6
- package/es/components/RadioGroup/style.css +35 -32
- package/es/components/RadioGroup/style.less +4 -0
- package/es/components/RangeInput/style.css +29 -29
- package/es/components/Selector/style.css +17 -17
- package/es/components/Spin/style.css +2 -2
- package/es/components/Steps/style.css +16 -16
- package/es/components/Table/ColumnSetting/index.d.ts +1 -0
- package/es/components/Table/ColumnSetting/index.js +19 -14
- package/es/components/Table/ColumnTag/style.css +4 -4
- package/es/components/Table/EmptyText.d.ts +7 -0
- package/es/components/Table/EmptyText.js +22 -0
- package/es/components/Table/ResizableTitle/index.js +12 -2
- package/es/components/Table/index.d.ts +11 -83
- package/es/components/Table/index.js +114 -287
- package/es/components/Table/style.css +54 -44
- package/es/components/Table/style.less +23 -4
- package/es/components/Table/type.d.ts +63 -0
- package/es/components/Table/type.js +5 -0
- package/es/components/Table/util.d.ts +59 -0
- package/es/components/Table/util.js +224 -0
- package/es/components/Tabs/style.css +10 -10
- package/es/components/TagList/Tag/style.css +5 -5
- package/es/components/TagList/TagSwitch/style.css +1 -1
- package/es/components/TagList/style.css +6 -6
- package/es/components/Timeline/TimelineItem/style.css +1 -1
- package/es/components/TreeSelector/style.css +21 -21
- package/es/constants/language/datetime/en.js +4 -2
- package/es/constants/language/datetime/type.d.ts +4 -2
- package/es/constants/language/datetime/zh.js +4 -2
- package/es/index.css +4666 -4639
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +18 -17
- package/es/style/theme.less +3 -3
- package/lib/components/AutoComplete/style.css +17 -17
- package/lib/components/Button/style.css +69 -69
- package/lib/components/Button/style.less +1 -1
- package/lib/components/Card/style.css +11 -11
- package/lib/components/CheckTransformList/style.css +19 -19
- package/lib/components/Checkbox/index.js +9 -1
- package/lib/components/CheckboxList/style.css +5 -5
- package/lib/components/Collapse/style.css +1 -1
- package/lib/components/DateTimePicker/Base/index.d.ts +3 -0
- package/lib/components/DateTimePicker/Base/index.js +51 -6
- package/lib/components/DateTimePicker/Base/style.css +67 -61
- package/lib/components/DateTimePicker/Base/style.less +7 -0
- package/lib/components/DateTimePicker/DisplayInput/index.js +3 -1
- package/lib/components/DateTimePicker/DisplayInput/style.css +14 -14
- package/lib/components/DateTimePicker/constants.d.ts +7 -1
- package/lib/components/DateTimePicker/constants.js +1 -0
- package/lib/components/DateTimePicker/time.d.ts +1 -0
- package/lib/components/DateTimePicker/time.js +1 -0
- package/lib/components/DateTimePicker/transform.js +4 -2
- package/lib/components/Drawer/index.d.ts +1 -1
- package/lib/components/FileResumable/index.js +2 -3
- package/lib/components/FileResumable/style.css +8 -8
- package/lib/components/FlameGraph/customTooltip.d.ts +22 -0
- package/lib/components/FlameGraph/customTooltip.js +114 -0
- package/lib/components/FlameGraph/index.d.ts +16 -0
- package/lib/components/FlameGraph/index.js +117 -0
- package/lib/components/FlameGraph/style.css +8 -0
- package/lib/components/FlameGraph/style.less +14 -0
- package/lib/components/Input/style.css +14 -14
- package/lib/components/Menu/Option.d.ts +1 -1
- package/lib/components/Menu/Option.js +17 -25
- package/lib/components/Menu/style.css +23 -23
- package/lib/components/Modal/style.css +1 -1
- package/lib/components/NameExplainTooltip/style.css +1 -1
- package/lib/components/OptionList/InlineOptionList/style.css +1 -1
- package/lib/components/OptionList/OptionItem/style.css +2 -2
- package/lib/components/OptionList/PopoverOptionList/style.css +3 -3
- package/lib/components/OptionList/style.css +6 -6
- package/lib/components/RadioGroup/style.css +35 -32
- package/lib/components/RadioGroup/style.less +4 -0
- package/lib/components/RangeInput/style.css +29 -29
- package/lib/components/Selector/style.css +17 -17
- package/lib/components/Spin/style.css +2 -2
- package/lib/components/Steps/style.css +16 -16
- package/lib/components/Table/ColumnSetting/index.d.ts +1 -0
- package/lib/components/Table/ColumnSetting/index.js +19 -14
- package/lib/components/Table/ColumnTag/style.css +4 -4
- package/lib/components/Table/EmptyText.d.ts +7 -0
- package/lib/components/Table/EmptyText.js +27 -0
- package/lib/components/Table/ResizableTitle/index.js +12 -2
- package/lib/components/Table/index.d.ts +11 -83
- package/lib/components/Table/index.js +118 -289
- package/lib/components/Table/style.css +54 -44
- package/lib/components/Table/style.less +23 -4
- package/lib/components/Table/type.d.ts +63 -0
- package/lib/components/Table/type.js +8 -0
- package/lib/components/Table/util.d.ts +59 -0
- package/lib/components/Table/util.js +233 -0
- package/lib/components/Tabs/style.css +10 -10
- package/lib/components/TagList/Tag/style.css +5 -5
- package/lib/components/TagList/TagSwitch/style.css +1 -1
- package/lib/components/TagList/style.css +6 -6
- package/lib/components/Timeline/TimelineItem/style.css +1 -1
- package/lib/components/TreeSelector/style.css +21 -21
- package/lib/constants/language/datetime/en.js +4 -2
- package/lib/constants/language/datetime/type.d.ts +4 -2
- package/lib/constants/language/datetime/zh.js +4 -2
- package/lib/index.css +6603 -6576
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index.less +22 -21
- package/lib/style/theme.less +3 -3
- package/package.json +8 -5
|
@@ -271,11 +271,11 @@
|
|
|
271
271
|
background: #f3f7fd;
|
|
272
272
|
}
|
|
273
273
|
.ant-table-tbody > tr.ant-table-row-selected > td {
|
|
274
|
-
background: #
|
|
274
|
+
background: #436bff;
|
|
275
275
|
border-color: rgba(0, 0, 0, 0.03);
|
|
276
276
|
}
|
|
277
277
|
.ant-table-tbody > tr.ant-table-row-selected:hover > td {
|
|
278
|
-
background: #
|
|
278
|
+
background: #3963ff;
|
|
279
279
|
}
|
|
280
280
|
.ant-table-summary {
|
|
281
281
|
position: relative;
|
|
@@ -334,7 +334,7 @@ div.ant-table-summary {
|
|
|
334
334
|
background-color: transparent !important;
|
|
335
335
|
}
|
|
336
336
|
.ant-table-thead th.ant-table-column-has-sorters:focus-visible {
|
|
337
|
-
color: #
|
|
337
|
+
color: #436bff;
|
|
338
338
|
}
|
|
339
339
|
.ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-left:hover,
|
|
340
340
|
.ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-right:hover {
|
|
@@ -405,7 +405,7 @@ td.ant-table-column-sort {
|
|
|
405
405
|
}
|
|
406
406
|
.ant-table-column-sorter-up.active,
|
|
407
407
|
.ant-table-column-sorter-down.active {
|
|
408
|
-
color: #
|
|
408
|
+
color: #436bff;
|
|
409
409
|
}
|
|
410
410
|
.ant-table-column-sorter-up + .ant-table-column-sorter-down {
|
|
411
411
|
margin-top: -0.3em;
|
|
@@ -443,7 +443,7 @@ td.ant-table-column-sort {
|
|
|
443
443
|
background: rgba(0, 0, 0, 0.04);
|
|
444
444
|
}
|
|
445
445
|
.ant-table-filter-trigger.active {
|
|
446
|
-
color: #
|
|
446
|
+
color: #436bff;
|
|
447
447
|
}
|
|
448
448
|
.ant-table-filter-dropdown {
|
|
449
449
|
-webkit-box-sizing: border-box;
|
|
@@ -482,11 +482,11 @@ td.ant-table-column-sort {
|
|
|
482
482
|
padding: 8px 8px 0;
|
|
483
483
|
}
|
|
484
484
|
.ant-table-filter-dropdown-tree .ant-tree-treenode .ant-tree-node-content-wrapper:hover {
|
|
485
|
-
background-color: rgba(
|
|
485
|
+
background-color: rgba(67, 107, 255, 0.05);
|
|
486
486
|
}
|
|
487
487
|
.ant-table-filter-dropdown-tree .ant-tree-treenode-checkbox-checked .ant-tree-node-content-wrapper,
|
|
488
488
|
.ant-table-filter-dropdown-tree .ant-tree-treenode-checkbox-checked .ant-tree-node-content-wrapper:hover {
|
|
489
|
-
background-color: rgba(
|
|
489
|
+
background-color: rgba(67, 107, 255, 0.05);
|
|
490
490
|
}
|
|
491
491
|
.ant-table-filter-dropdown-search {
|
|
492
492
|
padding: 8px;
|
|
@@ -593,7 +593,7 @@ table tr th.ant-table-selection-column::after {
|
|
|
593
593
|
height: 1px;
|
|
594
594
|
}
|
|
595
595
|
.ant-table-row-expand-icon {
|
|
596
|
-
color: #
|
|
596
|
+
color: #436bff;
|
|
597
597
|
outline: none;
|
|
598
598
|
cursor: pointer;
|
|
599
599
|
-webkit-transition: color 0.3s;
|
|
@@ -621,10 +621,10 @@ table tr th.ant-table-selection-column::after {
|
|
|
621
621
|
}
|
|
622
622
|
.ant-table-row-expand-icon:focus-visible,
|
|
623
623
|
.ant-table-row-expand-icon:hover {
|
|
624
|
-
color: #
|
|
624
|
+
color: #436bff;
|
|
625
625
|
}
|
|
626
626
|
.ant-table-row-expand-icon:active {
|
|
627
|
-
color: #
|
|
627
|
+
color: #436bff;
|
|
628
628
|
}
|
|
629
629
|
.ant-table-row-expand-icon:focus,
|
|
630
630
|
.ant-table-row-expand-icon:hover,
|
|
@@ -1014,40 +1014,40 @@ tr.ant-table-expanded-row .ant-descriptions-view table {
|
|
|
1014
1014
|
text-decoration: none;
|
|
1015
1015
|
}
|
|
1016
1016
|
.ant-pagination-item:hover {
|
|
1017
|
-
border-color: #
|
|
1017
|
+
border-color: #436bff;
|
|
1018
1018
|
-webkit-transition: all 0.3s;
|
|
1019
1019
|
transition: all 0.3s;
|
|
1020
1020
|
}
|
|
1021
1021
|
.ant-pagination-item:hover a {
|
|
1022
|
-
color: #
|
|
1022
|
+
color: #436bff;
|
|
1023
1023
|
}
|
|
1024
1024
|
.ant-pagination-item:focus-visible {
|
|
1025
|
-
border-color: #
|
|
1025
|
+
border-color: #436bff;
|
|
1026
1026
|
-webkit-transition: all 0.3s;
|
|
1027
1027
|
transition: all 0.3s;
|
|
1028
1028
|
}
|
|
1029
1029
|
.ant-pagination-item:focus-visible a {
|
|
1030
|
-
color: #
|
|
1030
|
+
color: #436bff;
|
|
1031
1031
|
}
|
|
1032
1032
|
.ant-pagination-item-active {
|
|
1033
1033
|
font-weight: 500;
|
|
1034
1034
|
background: #ffffff;
|
|
1035
|
-
border-color: #
|
|
1035
|
+
border-color: #436bff;
|
|
1036
1036
|
}
|
|
1037
1037
|
.ant-pagination-item-active a {
|
|
1038
|
-
color: #
|
|
1038
|
+
color: #436bff;
|
|
1039
1039
|
}
|
|
1040
1040
|
.ant-pagination-item-active:hover {
|
|
1041
|
-
border-color: #
|
|
1041
|
+
border-color: #6b90ff;
|
|
1042
1042
|
}
|
|
1043
1043
|
.ant-pagination-item-active:focus-visible {
|
|
1044
|
-
border-color: #
|
|
1044
|
+
border-color: #6b90ff;
|
|
1045
1045
|
}
|
|
1046
1046
|
.ant-pagination-item-active:hover a {
|
|
1047
|
-
color: #
|
|
1047
|
+
color: #6b90ff;
|
|
1048
1048
|
}
|
|
1049
1049
|
.ant-pagination-item-active:focus-visible a {
|
|
1050
|
-
color: #
|
|
1050
|
+
color: #6b90ff;
|
|
1051
1051
|
}
|
|
1052
1052
|
.ant-pagination-jump-prev,
|
|
1053
1053
|
.ant-pagination-jump-next {
|
|
@@ -1059,7 +1059,7 @@ tr.ant-table-expanded-row .ant-descriptions-view table {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon,
|
|
1061
1061
|
.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon {
|
|
1062
|
-
color: #
|
|
1062
|
+
color: #436bff;
|
|
1063
1063
|
font-size: 12px;
|
|
1064
1064
|
letter-spacing: -1px;
|
|
1065
1065
|
opacity: 0;
|
|
@@ -1147,7 +1147,7 @@ tr.ant-table-expanded-row .ant-descriptions-view table {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
.ant-pagination-prev:hover button,
|
|
1149
1149
|
.ant-pagination-next:hover button {
|
|
1150
|
-
border-color: #
|
|
1150
|
+
border-color: #6b90ff;
|
|
1151
1151
|
}
|
|
1152
1152
|
.ant-pagination-prev .ant-pagination-item-link,
|
|
1153
1153
|
.ant-pagination-next .ant-pagination-item-link {
|
|
@@ -1166,13 +1166,13 @@ tr.ant-table-expanded-row .ant-descriptions-view table {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
.ant-pagination-prev:focus-visible .ant-pagination-item-link,
|
|
1168
1168
|
.ant-pagination-next:focus-visible .ant-pagination-item-link {
|
|
1169
|
-
color: #
|
|
1170
|
-
border-color: #
|
|
1169
|
+
color: #436bff;
|
|
1170
|
+
border-color: #436bff;
|
|
1171
1171
|
}
|
|
1172
1172
|
.ant-pagination-prev:hover .ant-pagination-item-link,
|
|
1173
1173
|
.ant-pagination-next:hover .ant-pagination-item-link {
|
|
1174
|
-
color: #
|
|
1175
|
-
border-color: #
|
|
1174
|
+
color: #436bff;
|
|
1175
|
+
border-color: #436bff;
|
|
1176
1176
|
}
|
|
1177
1177
|
.ant-pagination-disabled,
|
|
1178
1178
|
.ant-pagination-disabled:hover {
|
|
@@ -1262,14 +1262,14 @@ tr.ant-table-expanded-row .ant-descriptions-view table {
|
|
|
1262
1262
|
text-overflow: ellipsis;
|
|
1263
1263
|
}
|
|
1264
1264
|
.ant-pagination-options-quick-jumper input:hover {
|
|
1265
|
-
border-color: #
|
|
1265
|
+
border-color: #436bff;
|
|
1266
1266
|
border-right-width: 1px;
|
|
1267
1267
|
}
|
|
1268
1268
|
.ant-pagination-options-quick-jumper input:focus,
|
|
1269
1269
|
.ant-pagination-options-quick-jumper input-focused {
|
|
1270
|
-
border-color: #
|
|
1271
|
-
-webkit-box-shadow: 0 0 0 2px rgba(
|
|
1272
|
-
box-shadow: 0 0 0 2px rgba(
|
|
1270
|
+
border-color: #6b90ff;
|
|
1271
|
+
-webkit-box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
1272
|
+
box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
1273
1273
|
border-right-width: 1px;
|
|
1274
1274
|
outline: 0;
|
|
1275
1275
|
}
|
|
@@ -1363,12 +1363,12 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1363
1363
|
transition: border-color 0.3s;
|
|
1364
1364
|
}
|
|
1365
1365
|
.ant-pagination-simple .ant-pagination-simple-pager input:hover {
|
|
1366
|
-
border-color: #
|
|
1366
|
+
border-color: #436bff;
|
|
1367
1367
|
}
|
|
1368
1368
|
.ant-pagination-simple .ant-pagination-simple-pager input:focus {
|
|
1369
|
-
border-color: #
|
|
1370
|
-
-webkit-box-shadow: 0 0 0 2px rgba(
|
|
1371
|
-
box-shadow: 0 0 0 2px rgba(
|
|
1369
|
+
border-color: #6b90ff;
|
|
1370
|
+
-webkit-box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
1371
|
+
box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
1372
1372
|
}
|
|
1373
1373
|
.ant-pagination-simple .ant-pagination-simple-pager input[disabled] {
|
|
1374
1374
|
color: rgba(0, 0, 0, 0.25);
|
|
@@ -1516,7 +1516,7 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1516
1516
|
margin-left: 0;
|
|
1517
1517
|
}
|
|
1518
1518
|
.pandora-sdk-table-wrapper a {
|
|
1519
|
-
color: #
|
|
1519
|
+
color: #436bff;
|
|
1520
1520
|
}
|
|
1521
1521
|
.pandora-sdk-table-wrapper a:hover {
|
|
1522
1522
|
text-decoration: underline;
|
|
@@ -1551,7 +1551,7 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1551
1551
|
line-height: 20px;
|
|
1552
1552
|
}
|
|
1553
1553
|
.pandora-sdk-table-wrapper .ant-table-thead > tr > th .anticon-filter.ant-table-filter-selected {
|
|
1554
|
-
color: #
|
|
1554
|
+
color: #436bff;
|
|
1555
1555
|
}
|
|
1556
1556
|
.pandora-sdk-table-wrapper .ant-table-thead > tr > th .ant-table-column-sorter .ant-table-column-sorter-inner {
|
|
1557
1557
|
margin-left: 8px;
|
|
@@ -1639,11 +1639,11 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1639
1639
|
}
|
|
1640
1640
|
.pandora-sdk-table-wrapper .ant-pagination-item:hover,
|
|
1641
1641
|
.pandora-sdk-table-wrapper .ant-pagination-item-active {
|
|
1642
|
-
border-color: #
|
|
1642
|
+
border-color: #436bff;
|
|
1643
1643
|
}
|
|
1644
1644
|
.pandora-sdk-table-wrapper .ant-pagination-item:hover a,
|
|
1645
1645
|
.pandora-sdk-table-wrapper .ant-pagination-item-active a {
|
|
1646
|
-
color: #
|
|
1646
|
+
color: #436bff;
|
|
1647
1647
|
}
|
|
1648
1648
|
.pandora-sdk-table-wrapper .ant-pagination-item-link,
|
|
1649
1649
|
.pandora-sdk-table-wrapper .ant-pagination-item-link {
|
|
@@ -1655,11 +1655,11 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
.pandora-sdk-table-wrapper .ant-pagination-item-link:hover,
|
|
1657
1657
|
.pandora-sdk-table-wrapper .ant-pagination-item-link:hover {
|
|
1658
|
-
border-color: #
|
|
1658
|
+
border-color: #436bff;
|
|
1659
1659
|
}
|
|
1660
1660
|
.pandora-sdk-table-wrapper .ant-pagination-item-link:hover i,
|
|
1661
1661
|
.pandora-sdk-table-wrapper .ant-pagination-item-link:hover i {
|
|
1662
|
-
color: #
|
|
1662
|
+
color: #436bff;
|
|
1663
1663
|
}
|
|
1664
1664
|
.pandora-sdk-table-wrapper .ant-pagination-disabled .ant-pagination-item-link:hover,
|
|
1665
1665
|
.pandora-sdk-table-wrapper .ant-pagination-disabled .ant-pagination-item-link:hover {
|
|
@@ -1706,9 +1706,6 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1706
1706
|
.pandora-sdk-table-wrapper .ant-table-thead > tr > th .ant-table-column-sorters .ant-table-filter-trigger-container {
|
|
1707
1707
|
position: relative;
|
|
1708
1708
|
}
|
|
1709
|
-
.pandora-sdk-table-wrapper .ant-table-filter-dropdown .ant-dropdown-menu {
|
|
1710
|
-
max-height: 200px;
|
|
1711
|
-
}
|
|
1712
1709
|
.pandora-sdk-table-wrapper .ant-table-tbody > tr.ant-table-row:hover > td {
|
|
1713
1710
|
background-color: #f3f7fd;
|
|
1714
1711
|
}
|
|
@@ -1716,6 +1713,9 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1716
1713
|
display: block;
|
|
1717
1714
|
line-height: 28px;
|
|
1718
1715
|
}
|
|
1716
|
+
.pandora-sdk-table-wrapper .ant-table-filter-trigger.active .anticon {
|
|
1717
|
+
color: #436bff;
|
|
1718
|
+
}
|
|
1719
1719
|
.pandora-sdk-table-wrapper .pandora-sdk-table-empty {
|
|
1720
1720
|
margin: 32px 0;
|
|
1721
1721
|
}
|
|
@@ -1739,7 +1739,7 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1739
1739
|
.pandora-sdk-table-batch-opt .pandora-sdk-table-batch-opt-item {
|
|
1740
1740
|
margin-right: 10px;
|
|
1741
1741
|
cursor: pointer;
|
|
1742
|
-
color: #
|
|
1742
|
+
color: #436bff;
|
|
1743
1743
|
}
|
|
1744
1744
|
.pandora-sdk-table-batch-opt .pandora-sdk-table-batch-opt-disabled {
|
|
1745
1745
|
pointer-events: none;
|
|
@@ -1786,3 +1786,13 @@ textarea.ant-pagination-options-quick-jumper input {
|
|
|
1786
1786
|
.ant-table-thead > tr > th > .ant-table-filter-column > .ant-table-column-title > .ant-table-column-sorters > .ant-table-column-title {
|
|
1787
1787
|
position: static;
|
|
1788
1788
|
}
|
|
1789
|
+
.ant-table-filter-dropdown .ant-dropdown-menu {
|
|
1790
|
+
max-height: 200px;
|
|
1791
|
+
}
|
|
1792
|
+
.ant-table-filter-dropdown .ant-dropdown-menu-item,
|
|
1793
|
+
.ant-table-filter-dropdown .ant-dropdown-menu-submenu-title {
|
|
1794
|
+
font-size: 12px;
|
|
1795
|
+
}
|
|
1796
|
+
.ant-table-filter-dropdown .ant-table-filter-dropdown-btns button {
|
|
1797
|
+
font-size: 12px;
|
|
1798
|
+
}
|
|
@@ -240,10 +240,6 @@
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
.@{ant-prefix}-table-filter-dropdown .@{ant-prefix}-dropdown-menu {
|
|
244
|
-
max-height: 200px;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
243
|
.@{ant-prefix}-table-tbody > tr.@{ant-prefix}-table-row:hover > td {
|
|
248
244
|
background-color: @table-row-hover-bg;
|
|
249
245
|
}
|
|
@@ -251,6 +247,12 @@
|
|
|
251
247
|
display: block;
|
|
252
248
|
line-height: 28px;
|
|
253
249
|
}
|
|
250
|
+
|
|
251
|
+
.@{ant-prefix}-table-filter-trigger.active {
|
|
252
|
+
.anticon {
|
|
253
|
+
color: @theme-color;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
254
256
|
.@{sdk-prefix}-table-empty {
|
|
255
257
|
margin: 32px 0;
|
|
256
258
|
.@{sdk-prefix}-table-empty-text {
|
|
@@ -343,3 +345,20 @@
|
|
|
343
345
|
}
|
|
344
346
|
}
|
|
345
347
|
}
|
|
348
|
+
|
|
349
|
+
// 内置的过滤下拉菜单字体 12px
|
|
350
|
+
.@{ant-prefix}-table-filter-dropdown {
|
|
351
|
+
.@{ant-prefix}-dropdown-menu {
|
|
352
|
+
max-height: 200px;
|
|
353
|
+
}
|
|
354
|
+
.@{ant-prefix}-dropdown-menu-item,
|
|
355
|
+
.@{ant-prefix}-dropdown-menu-submenu-title {
|
|
356
|
+
font-size: 12px;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.@{ant-prefix}-table-filter-dropdown-btns {
|
|
360
|
+
button {
|
|
361
|
+
font-size: 12px;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TableProps, ColumnType, ColumnGroupType } from 'antd/es/table';
|
|
3
|
+
export interface IOptionItem {
|
|
4
|
+
/**
|
|
5
|
+
* 操作名称
|
|
6
|
+
*/
|
|
7
|
+
text: string;
|
|
8
|
+
/**
|
|
9
|
+
* 点击后的操作
|
|
10
|
+
*/
|
|
11
|
+
onClick?: (selectedRowKeys: any[]) => void;
|
|
12
|
+
/**
|
|
13
|
+
* 禁用当前操作
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean | ((selectItems: any[]) => boolean);
|
|
16
|
+
}
|
|
17
|
+
export interface ISaveFieldItem {
|
|
18
|
+
field: string;
|
|
19
|
+
hide?: boolean;
|
|
20
|
+
width?: number;
|
|
21
|
+
index?: number;
|
|
22
|
+
fixed?: boolean | 'right' | 'left';
|
|
23
|
+
}
|
|
24
|
+
export declare enum ETableSettingType {
|
|
25
|
+
SORT = "sort",
|
|
26
|
+
RESIZE = "resize"
|
|
27
|
+
}
|
|
28
|
+
export interface IColumnType<T> extends ColumnType<T> {
|
|
29
|
+
colTitle?: string | React.ReactNode;
|
|
30
|
+
configurable?: boolean;
|
|
31
|
+
resizable?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface IColumnGroupType<T> extends ColumnGroupType<T> {
|
|
34
|
+
colTitle?: string | React.ReactNode;
|
|
35
|
+
configurable?: boolean;
|
|
36
|
+
resizable?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare type IColumnsType<T> = Array<IColumnGroupType<T> | IColumnType<T>>;
|
|
39
|
+
export interface ITableProps<T> extends Omit<TableProps<T>, 'columns'> {
|
|
40
|
+
columns?: IColumnsType<T>;
|
|
41
|
+
/**
|
|
42
|
+
* 设置selectedRow选项, 可以获取当前选中的所有
|
|
43
|
+
* 数据.
|
|
44
|
+
* 若不传该参数, 翻页后(服务端翻页)数据会丢失, 外层只会获取当前页选中的数据
|
|
45
|
+
*/
|
|
46
|
+
selectedRows?: T[];
|
|
47
|
+
/** 如果支持多选,则batchOptions为多选时的一些批量操作,如删除、添加等 */
|
|
48
|
+
batchOptions?: IOptionItem[];
|
|
49
|
+
emptyText?: React.ReactNode;
|
|
50
|
+
showColumnSetting?: boolean;
|
|
51
|
+
hiddenColumns?: string[];
|
|
52
|
+
onHiddenColumnsChange?: (keys: string[]) => void;
|
|
53
|
+
columnSettingOverlayClass?: string;
|
|
54
|
+
draggable?: boolean | ETableSettingType;
|
|
55
|
+
saveSettingKey?: string;
|
|
56
|
+
onSettingChange?: (fields: ISaveFieldItem[]) => void;
|
|
57
|
+
/**
|
|
58
|
+
* 是否需要填充空白列, 默认为true
|
|
59
|
+
* 如果支持拖拽,在屏幕宽度大于table总的列宽的时候,会把剩余空间平均分到每一列上。那么拖拽一列会导致其他列的宽度都发生变更
|
|
60
|
+
* 添加一个空白列,宽度auto.可以解决此问题。如果可以接受上述问题,那就无需空白列,needEmptyColumn = false
|
|
61
|
+
*/
|
|
62
|
+
needEmptyColumn?: boolean;
|
|
63
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ETableSettingType = void 0;
|
|
4
|
+
var ETableSettingType;
|
|
5
|
+
(function (ETableSettingType) {
|
|
6
|
+
ETableSettingType["SORT"] = "sort";
|
|
7
|
+
ETableSettingType["RESIZE"] = "resize";
|
|
8
|
+
})(ETableSettingType = exports.ETableSettingType || (exports.ETableSettingType = {}));
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { IColumnsType, IColumnType, ISaveFieldItem } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* 如果支持拖拽,在屏幕宽度大于table总的列宽的时候,添加一个空白列,宽度auto.
|
|
4
|
+
* 空白列添加到右固定列的前面
|
|
5
|
+
* @param columns 列
|
|
6
|
+
* @param hiddenColumns 隐藏列
|
|
7
|
+
* @param needEmptyColumn 是否需要填充空白列, 默认需要填充
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function addEmptyColumn(columns: IKeyValues[], hiddenColumns?: string[], needEmptyColumn?: boolean): IKeyValues<any>[];
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param columns 原始数据
|
|
14
|
+
* @param settingFields 已配置的列
|
|
15
|
+
* @param hiddenColumns 默认隐藏的列
|
|
16
|
+
* @returns sortableColumns 排序的列
|
|
17
|
+
* @returns hiddenColumns 隐藏的列
|
|
18
|
+
*/
|
|
19
|
+
export declare function getSortAndHiddenKeys<T>(columns: Array<IColumnType<T>>, settingFields: ISaveFieldItem[], hiddenColumns?: string[]): {
|
|
20
|
+
sortableColumns: ISaveFieldItem[];
|
|
21
|
+
settingFields: ISaveFieldItem[];
|
|
22
|
+
hiddenColumns: string[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 对列做排序(疑问: 是否可以只对key 排序,不影响其他内容)
|
|
26
|
+
* 重申此函数的意义,跑排序table的columns
|
|
27
|
+
*
|
|
28
|
+
* @param source 原始数组
|
|
29
|
+
* @param sortKeys 排序的列
|
|
30
|
+
* @param hiddenColumn 隐藏的列
|
|
31
|
+
* @returns 返回排序后的列
|
|
32
|
+
*/
|
|
33
|
+
export declare function getSortedCoulmns(source: IKeyValues[], sortKeys: string[], hiddenColumn: string[]): IKeyValues<any>[];
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @param source 列数组
|
|
37
|
+
* @returns allKeys 所有列的key, unconfigableKeys: 不能配置的列 resetKeys 可以配置的
|
|
38
|
+
*/
|
|
39
|
+
export declare function getColumnKeys(source: IKeyValues[]): {
|
|
40
|
+
allKeys: string[];
|
|
41
|
+
unconfigableKeys: string[];
|
|
42
|
+
resetKeys: string[];
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param columns 原始的列
|
|
47
|
+
* @param saveFields 配置信息
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
export declare function getResizeColumns<T>(columns: IKeyValues[], settingFields: ISaveFieldItem[], resizable: boolean, handleResize: (col: IColumnType<T>, size: {
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
}, oldColumn: IColumnsType<T>) => void): IKeyValues<any>[];
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param saveSettingKey 配置key
|
|
57
|
+
* @returns 返回localStorage 配置信息
|
|
58
|
+
*/
|
|
59
|
+
export declare function getLocalSettings(saveSettingKey?: string): ISaveFieldItem[];
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
var __spread = (this && this.__spread) || function () {
|
|
30
|
+
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.getLocalSettings = exports.getResizeColumns = exports.getColumnKeys = exports.getSortedCoulmns = exports.getSortAndHiddenKeys = exports.addEmptyColumn = void 0;
|
|
35
|
+
var lodash_1 = require("lodash");
|
|
36
|
+
/**
|
|
37
|
+
* 如果支持拖拽,在屏幕宽度大于table总的列宽的时候,添加一个空白列,宽度auto.
|
|
38
|
+
* 空白列添加到右固定列的前面
|
|
39
|
+
* @param columns 列
|
|
40
|
+
* @param hiddenColumns 隐藏列
|
|
41
|
+
* @param needEmptyColumn 是否需要填充空白列, 默认需要填充
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
function addEmptyColumn(columns, hiddenColumns, needEmptyColumn) {
|
|
45
|
+
if (hiddenColumns === void 0) { hiddenColumns = []; }
|
|
46
|
+
var cols = hiddenColumns.length === 0
|
|
47
|
+
? columns
|
|
48
|
+
: columns.filter(function (col) { return !lodash_1.includes(hiddenColumns, col.dataIndex); });
|
|
49
|
+
if (needEmptyColumn === false)
|
|
50
|
+
return cols;
|
|
51
|
+
var firstFixedRightIndex = cols.findIndex(function (item) { return lodash_1.get(item, 'fixed') === 'right'; });
|
|
52
|
+
var column = {
|
|
53
|
+
title: '',
|
|
54
|
+
dataIndex: '__empty__',
|
|
55
|
+
key: '__empty__'
|
|
56
|
+
};
|
|
57
|
+
if (firstFixedRightIndex === -1) {
|
|
58
|
+
cols.push(column);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
cols.splice(firstFixedRightIndex, 0, column);
|
|
62
|
+
}
|
|
63
|
+
return cols;
|
|
64
|
+
}
|
|
65
|
+
exports.addEmptyColumn = addEmptyColumn;
|
|
66
|
+
// 根据列,以及之前存储的列的一些信息,获取那些列需要隐藏,那些列可以排序
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @param columns 原始数据
|
|
70
|
+
* @param settingFields 已配置的列
|
|
71
|
+
* @param hiddenColumns 默认隐藏的列
|
|
72
|
+
* @returns sortableColumns 排序的列
|
|
73
|
+
* @returns hiddenColumns 隐藏的列
|
|
74
|
+
*/
|
|
75
|
+
function getSortAndHiddenKeys(columns, settingFields, hiddenColumns) {
|
|
76
|
+
if (hiddenColumns === void 0) { hiddenColumns = []; }
|
|
77
|
+
var sortableColumns = [];
|
|
78
|
+
var hideKeys = [];
|
|
79
|
+
var newSettingFields = [];
|
|
80
|
+
// 已配置的列和实际的对不上
|
|
81
|
+
// 可能新增或者删除列的情况
|
|
82
|
+
// 已配置列
|
|
83
|
+
// 旧类型数据为对象类型,未配置
|
|
84
|
+
columns.forEach(function (column) {
|
|
85
|
+
var settingField = settingFields.find(function (field) { return field.field === (column.dataIndex || column.key); });
|
|
86
|
+
newSettingFields.push(settingField || {
|
|
87
|
+
field: (column.dataIndex || column.key).toString(),
|
|
88
|
+
fixed: column.fixed
|
|
89
|
+
});
|
|
90
|
+
if (column.dataIndex && !(column.fixed || column.configurable === false)) {
|
|
91
|
+
if (settingField) {
|
|
92
|
+
if (settingField.hide) {
|
|
93
|
+
hideKeys.push(settingField.field);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
sortableColumns.push(settingField);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
sortableColumns.push({
|
|
101
|
+
field: column.dataIndex.toString(),
|
|
102
|
+
fixed: column.fixed
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return {
|
|
108
|
+
sortableColumns: sortableColumns,
|
|
109
|
+
settingFields: newSettingFields,
|
|
110
|
+
hiddenColumns: lodash_1.uniq(hiddenColumns.concat(hideKeys))
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
exports.getSortAndHiddenKeys = getSortAndHiddenKeys;
|
|
114
|
+
/**
|
|
115
|
+
* 对列做排序(疑问: 是否可以只对key 排序,不影响其他内容)
|
|
116
|
+
* 重申此函数的意义,跑排序table的columns
|
|
117
|
+
*
|
|
118
|
+
* @param source 原始数组
|
|
119
|
+
* @param sortKeys 排序的列
|
|
120
|
+
* @param hiddenColumn 隐藏的列
|
|
121
|
+
* @returns 返回排序后的列
|
|
122
|
+
*/
|
|
123
|
+
function getSortedCoulmns(source, sortKeys, hiddenColumn) {
|
|
124
|
+
var fixedRightColumn = [];
|
|
125
|
+
var fixedLeftColumn = [];
|
|
126
|
+
var selectedCols = [];
|
|
127
|
+
var unconfigurableCols = [];
|
|
128
|
+
source.forEach(function (column) {
|
|
129
|
+
if (column.fixed === 'left' || column.fixed === true) {
|
|
130
|
+
fixedLeftColumn.push(column);
|
|
131
|
+
}
|
|
132
|
+
else if (column.fixed === 'right') {
|
|
133
|
+
fixedRightColumn.push(column);
|
|
134
|
+
}
|
|
135
|
+
else if (column.configurable === false) {
|
|
136
|
+
unconfigurableCols.push(column);
|
|
137
|
+
}
|
|
138
|
+
else if (!lodash_1.includes(hiddenColumn, column.key)) {
|
|
139
|
+
selectedCols.push(column);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
var sortColumns = sortKeys
|
|
143
|
+
.map(function (key) { return source.find(function (column) { return column.dataIndex === key; }); })
|
|
144
|
+
.filter(function (f) { return !!f; });
|
|
145
|
+
// 顺序应该是: 左固定列、不可配置列、排序列、右固定列
|
|
146
|
+
return __spread(fixedLeftColumn, unconfigurableCols, sortColumns, fixedRightColumn);
|
|
147
|
+
}
|
|
148
|
+
exports.getSortedCoulmns = getSortedCoulmns;
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* @param source 列数组
|
|
152
|
+
* @returns allKeys 所有列的key, unconfigableKeys: 不能配置的列 resetKeys 可以配置的
|
|
153
|
+
*/
|
|
154
|
+
function getColumnKeys(source) {
|
|
155
|
+
var allKeys = [];
|
|
156
|
+
var unconfigableKeys = [];
|
|
157
|
+
var resetKeys = [];
|
|
158
|
+
source.forEach(function (col) {
|
|
159
|
+
if (col.key) {
|
|
160
|
+
// 不可配置,或者列固定的列,(在这里统称不可配置的列)
|
|
161
|
+
if (col.configurable === false || col.fixed) {
|
|
162
|
+
unconfigableKeys.push(col.key.toString());
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
resetKeys.push(col.key.toString());
|
|
166
|
+
}
|
|
167
|
+
allKeys.push(col.key.toString());
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
return {
|
|
171
|
+
allKeys: allKeys,
|
|
172
|
+
unconfigableKeys: unconfigableKeys,
|
|
173
|
+
resetKeys: resetKeys
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
exports.getColumnKeys = getColumnKeys;
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @param columns 原始的列
|
|
180
|
+
* @param saveFields 配置信息
|
|
181
|
+
* @returns
|
|
182
|
+
*/
|
|
183
|
+
function getResizeColumns(columns, settingFields, resizable, handleResize) {
|
|
184
|
+
// debugger
|
|
185
|
+
if (!resizable && settingFields.length === 0)
|
|
186
|
+
return columns;
|
|
187
|
+
var transformColumns = columns.map(function (col, index) {
|
|
188
|
+
var _a;
|
|
189
|
+
var dataIndex = lodash_1.get(col, 'dataIndex');
|
|
190
|
+
var width = (_a = settingFields === null || settingFields === void 0 ? void 0 : settingFields.find(function (f) { return f.field === dataIndex; })) === null || _a === void 0 ? void 0 : _a.width;
|
|
191
|
+
if (lodash_1.get(col, 'resizable') && resizable) {
|
|
192
|
+
return __assign(__assign({}, col), { width: lodash_1.isNumber(width) ? width : lodash_1.get(col, 'width'), ellipsis: {
|
|
193
|
+
showTitle: true
|
|
194
|
+
}, onHeaderCell: function (col) {
|
|
195
|
+
var _a;
|
|
196
|
+
return ({
|
|
197
|
+
width: col.width,
|
|
198
|
+
// !传入newColumn,而不传入column是因为需要拿到有onHeaderCell的值,外面column的变化内部监听不到
|
|
199
|
+
onResize: function (_, _a) {
|
|
200
|
+
var size = _a.size;
|
|
201
|
+
handleResize(col, size, transformColumns);
|
|
202
|
+
},
|
|
203
|
+
isLastColumn: index === ((_a = (columns || [])) === null || _a === void 0 ? void 0 : _a.length) - 1
|
|
204
|
+
});
|
|
205
|
+
} });
|
|
206
|
+
}
|
|
207
|
+
return lodash_1.isNumber(width) ? __assign(__assign({}, col), { width: width }) : col;
|
|
208
|
+
});
|
|
209
|
+
return transformColumns;
|
|
210
|
+
}
|
|
211
|
+
exports.getResizeColumns = getResizeColumns;
|
|
212
|
+
/**
|
|
213
|
+
*
|
|
214
|
+
* @param saveSettingKey 配置key
|
|
215
|
+
* @returns 返回localStorage 配置信息
|
|
216
|
+
*/
|
|
217
|
+
function getLocalSettings(saveSettingKey) {
|
|
218
|
+
var settingFields = [];
|
|
219
|
+
if (saveSettingKey) {
|
|
220
|
+
try {
|
|
221
|
+
var settingStr = localStorage.getItem(saveSettingKey);
|
|
222
|
+
var settingConfig = !!settingStr && JSON.parse(settingStr);
|
|
223
|
+
if (lodash_1.isArray(settingConfig)) {
|
|
224
|
+
settingFields = settingConfig;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
throw new Error("parse " + saveSettingKey + " error: " + error + ", please check the data format");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return settingFields;
|
|
232
|
+
}
|
|
233
|
+
exports.getLocalSettings = getLocalSettings;
|