@fangzhongya/fang-ui 0.0.58 → 0.0.60
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/dist/components/array/src/data.cjs +3 -3
- package/dist/components/array/src/data.d.ts +0 -3
- package/dist/components/array/src/data.js +3 -3
- package/dist/components/array/src/index2.cjs +27 -11
- package/dist/components/array/src/index2.js +23 -7
- package/dist/components/common/use.cjs +1 -1
- package/dist/components/common/use.js +1 -1
- package/dist/components/dialogs/src/data.cjs +2 -4
- package/dist/components/dialogs/src/data.d.ts +0 -2
- package/dist/components/dialogs/src/data.js +2 -4
- package/dist/components/dialogs/src/index2.cjs +24 -12
- package/dist/components/dialogs/src/index2.js +17 -5
- package/dist/components/forms/index.css +3 -0
- package/dist/components/forms/index.scss +3 -0
- package/dist/components/forms/src/index2.cjs +16 -14
- package/dist/components/forms/src/index2.js +3 -1
- package/dist/components/forms/src/setup.cjs +11 -5
- package/dist/components/forms/src/setup.d.ts +1 -1
- package/dist/components/forms/src/setup.js +11 -5
- package/dist/components/forms/src/util.cjs +5 -4
- package/dist/components/forms/src/util.d.ts +1 -1
- package/dist/components/forms/src/util.js +5 -4
- package/dist/components/forms-drag/src/index2.cjs +96 -45
- package/dist/components/forms-drag/src/index2.js +91 -40
- package/dist/components/icon-picker/index.css +1 -0
- package/dist/components/icon-picker/index.scss +1 -0
- package/dist/components/iframe/index.css +4 -0
- package/dist/components/iframe/index.scss +4 -0
- package/dist/components/iframe/src/index2.cjs +19 -7
- package/dist/components/iframe/src/index2.js +20 -8
- package/dist/components/iframe/style/index2.scss +3 -0
- package/dist/components/index.cjs +110 -108
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.scss +2 -1
- package/dist/components/index2.scss +3 -2
- package/dist/components/input-history/index.css +7 -17
- package/dist/components/input-history/index.scss +34 -42
- package/dist/components/input-history/src/index2.cjs +3 -12
- package/dist/components/input-history/src/index2.js +3 -12
- package/dist/components/inputs/src/index2.cjs +11 -9
- package/dist/components/inputs/src/index2.js +3 -1
- package/dist/components/keep-com/src/data.d.ts +3 -0
- package/dist/components/lists/index.css +0 -5
- package/dist/components/lists/index.scss +0 -5
- package/dist/components/lists/src/index2.cjs +2 -5
- package/dist/components/lists/src/index2.js +3 -6
- package/dist/components/listsp/index.css +1 -5
- package/dist/components/listsp/src/index2.cjs +11 -9
- package/dist/components/listsp/src/index2.js +3 -1
- package/dist/components/no-data/index.cjs +9 -0
- package/dist/components/no-data/index.css +19 -0
- package/dist/components/no-data/index.d.ts +4 -0
- package/dist/components/no-data/index.js +9 -0
- package/dist/components/no-data/index.scss +8 -0
- package/dist/components/no-data/src/data.cjs +24 -0
- package/dist/components/no-data/src/data.d.ts +26 -0
- package/dist/components/no-data/src/data.js +24 -0
- package/dist/components/no-data/src/index.cjs +4 -0
- package/dist/components/no-data/src/index.js +4 -0
- package/dist/components/no-data/src/index2.cjs +34 -0
- package/dist/components/no-data/src/index2.js +34 -0
- package/dist/components/page/index.css +4 -0
- package/dist/components/page/set-column.css +8 -8
- package/dist/components/page/src/index2.cjs +41 -39
- package/dist/components/page/src/index2.js +15 -13
- package/dist/components/page/src/set-column.cjs +1 -1
- package/dist/components/page/src/set-column.js +1 -1
- package/dist/components/page/src/set-column2.cjs +3 -6
- package/dist/components/page/src/set-column2.js +4 -7
- package/dist/components/paging/index.css +1 -0
- package/dist/components/paging/index.scss +1 -0
- package/dist/components/paging/src/index2.cjs +18 -10
- package/dist/components/paging/src/index2.js +12 -4
- package/dist/components/selector/src/index2.cjs +17 -15
- package/dist/components/selector/src/index2.js +8 -6
- package/dist/components/tables/common/pagin.cjs +3 -3
- package/dist/components/tables/common/pagin.d.ts +1 -1
- package/dist/components/tables/common/pagin.js +3 -3
- package/dist/components/tables/src/index2.cjs +4 -7
- package/dist/components/tables/src/index2.js +3 -6
- package/dist/components/tablesp/index.css +1 -0
- package/dist/components/tablesp/src/index2.cjs +11 -9
- package/dist/components/tablesp/src/index2.js +3 -1
- package/dist/components/tabless/src/index2.cjs +11 -9
- package/dist/components/tabless/src/index2.js +3 -1
- package/dist/components/tablesv/src/index2.cjs +2 -5
- package/dist/components/tablesv/src/index2.js +3 -6
- package/dist/components/tablesvp/index.css +1 -0
- package/dist/components/tablesvp/src/index2.cjs +9 -7
- package/dist/components/tablesvp/src/index2.js +3 -1
- package/dist/css/forms.css +3 -0
- package/dist/css/icon-picker.css +1 -0
- package/dist/css/iframe.css +4 -0
- package/dist/css/index.css +44 -22
- package/dist/css/input-history.css +7 -17
- package/dist/css/lists.css +0 -5
- package/dist/css/listsp.css +1 -5
- package/dist/css/no-data.css +19 -0
- package/dist/css/page/set-column.css +8 -8
- package/dist/css/page.css +4 -0
- package/dist/css/paging.css +1 -0
- package/dist/css/tablesp.css +1 -0
- package/dist/css/tablesvp.css +1 -0
- package/dist/expand/{chunk-ID2WVA6N.js → chunk-3HYUAX6P.js} +2 -0
- package/dist/expand/{chunk-NEHCZ3EJ.cjs → chunk-IPHLXLMM.cjs} +2 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/locale/index.cjs +51 -2
- package/dist/hooks/locale/index.d.ts +64 -3
- package/dist/hooks/locale/index.js +51 -2
- package/dist/icons/index.css +31 -31
- package/dist/icons/index.json +7 -7
- package/dist/index.cjs +128 -126
- package/dist/index.css +44 -22
- package/dist/index.js +2 -0
- package/dist/locale/en.cjs +38 -15
- package/dist/locale/en.d.ts +27 -4
- package/dist/locale/en.js +38 -15
- package/dist/locale/zh-cn.cjs +24 -3
- package/dist/locale/zh-cn.d.ts +23 -2
- package/dist/locale/zh-cn.js +24 -3
- package/dist/types/locale.d.ts +1 -1
- package/package.json +11 -11
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{option → keep-com}/index.css +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /package/dist/css/{option.css → keep-com.css} +0 -0
package/dist/css/index.css
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
.forms-elf.center .el-form-item__label {
|
|
100
100
|
justify-content: center;
|
|
101
101
|
}
|
|
102
|
+
.forms .forms-li.forms-buts {
|
|
103
|
+
margin-right: 0;
|
|
104
|
+
}
|
|
102
105
|
.forms-buts-div .el-button {
|
|
103
106
|
height: inherit;
|
|
104
107
|
}
|
|
@@ -234,6 +237,12 @@
|
|
|
234
237
|
padding: 20px 20px;
|
|
235
238
|
}
|
|
236
239
|
|
|
240
|
+
.no-data {
|
|
241
|
+
text-align: center;
|
|
242
|
+
margin-top: 20px;
|
|
243
|
+
color: #999;
|
|
244
|
+
}
|
|
245
|
+
|
|
237
246
|
.popup {
|
|
238
247
|
position: fixed;
|
|
239
248
|
width: 100vw;
|
|
@@ -420,6 +429,7 @@
|
|
|
420
429
|
cursor: pointer;
|
|
421
430
|
}
|
|
422
431
|
.icon-picker .icon-picker-dialog-list-item:hover {
|
|
432
|
+
background-color: #e5e5e5;
|
|
423
433
|
color: var(--on-icon-picker);
|
|
424
434
|
}
|
|
425
435
|
.icon-picker .icon-picker-dialog-list-icon {
|
|
@@ -463,6 +473,10 @@
|
|
|
463
473
|
width: 100%;
|
|
464
474
|
height: 100%;
|
|
465
475
|
}
|
|
476
|
+
.iframe > iframe {
|
|
477
|
+
width: 100%;
|
|
478
|
+
height: 100%;
|
|
479
|
+
}
|
|
466
480
|
|
|
467
481
|
.menus .menu-li-item {
|
|
468
482
|
display: flex;
|
|
@@ -584,6 +598,7 @@
|
|
|
584
598
|
}
|
|
585
599
|
.paging-slot > span {
|
|
586
600
|
margin-right: 10px;
|
|
601
|
+
white-space: nowrap;
|
|
587
602
|
}
|
|
588
603
|
.paging .el-pagination__total {
|
|
589
604
|
font-size: 14px;
|
|
@@ -940,7 +955,7 @@
|
|
|
940
955
|
padding: 0;
|
|
941
956
|
box-sizing: border-box;
|
|
942
957
|
}
|
|
943
|
-
.input-history-select-li {
|
|
958
|
+
.input-history-select-ul .input-history-select-li {
|
|
944
959
|
padding: 0 32px 0 20px;
|
|
945
960
|
position: relative;
|
|
946
961
|
white-space: nowrap;
|
|
@@ -952,36 +967,26 @@
|
|
|
952
967
|
box-sizing: border-box;
|
|
953
968
|
cursor: pointer;
|
|
954
969
|
}
|
|
955
|
-
.input-history-select-li.hover, .input-history-select-li:hover {
|
|
970
|
+
.input-history-select-ul .input-history-select-li.hover, .input-history-select-ul .input-history-select-li:hover {
|
|
956
971
|
background-color: #f5f7fa;
|
|
957
972
|
}
|
|
958
|
-
.input-history-select-li.hover .input-history-select-li-clean, .input-history-select-li:hover .input-history-select-li-clean {
|
|
973
|
+
.input-history-select-ul .input-history-select-li.hover .input-history-select-li-clean, .input-history-select-ul .input-history-select-li:hover .input-history-select-li-clean {
|
|
959
974
|
display: inline-flex;
|
|
960
975
|
}
|
|
961
|
-
.input-history-select-li.selected {
|
|
976
|
+
.input-history-select-ul .input-history-select-li.selected {
|
|
962
977
|
color: var(--bv-color-primary);
|
|
963
978
|
font-weight: 700;
|
|
964
979
|
}
|
|
965
|
-
.input-history-select-li.is-disabled {
|
|
980
|
+
.input-history-select-ul .input-history-select-li.is-disabled {
|
|
966
981
|
background-color: #ffffff;
|
|
967
982
|
color: #a8abb2;
|
|
968
983
|
cursor: not-allowed;
|
|
969
984
|
}
|
|
970
|
-
.input-history-select-li-clean {
|
|
971
|
-
position: absolute;
|
|
985
|
+
.input-history-select-ul .input-history-select-li-clean {
|
|
972
986
|
align-items: center;
|
|
973
987
|
justify-content: center;
|
|
974
|
-
right: 16px;
|
|
975
|
-
height: 100%;
|
|
976
988
|
display: none;
|
|
977
|
-
|
|
978
|
-
.input-history-select-clean {
|
|
979
|
-
padding: 0 20px;
|
|
980
|
-
}
|
|
981
|
-
.input-history-select-clean-but {
|
|
982
|
-
float: right;
|
|
983
|
-
color: #ccc;
|
|
984
|
-
cursor: pointer;
|
|
989
|
+
margin-left: 5px;
|
|
985
990
|
}
|
|
986
991
|
|
|
987
992
|
.input-num-input {
|
|
@@ -1190,11 +1195,6 @@
|
|
|
1190
1195
|
.lists-list-item .el-card {
|
|
1191
1196
|
background-color: transparent;
|
|
1192
1197
|
}
|
|
1193
|
-
.lists-list .lists-no-data {
|
|
1194
|
-
text-align: center;
|
|
1195
|
-
margin-top: 20px;
|
|
1196
|
-
color: #999;
|
|
1197
|
-
}
|
|
1198
1198
|
|
|
1199
1199
|
.listsp {
|
|
1200
1200
|
width: 100%;
|
|
@@ -1324,4 +1324,26 @@
|
|
|
1324
1324
|
left: 0;
|
|
1325
1325
|
z-index: 1;
|
|
1326
1326
|
opacity: 0;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
.tablesvp {
|
|
1330
|
+
width: 100%;
|
|
1331
|
+
height: var(--tablesvp-height);
|
|
1332
|
+
display: flex;
|
|
1333
|
+
flex-direction: column;
|
|
1334
|
+
}
|
|
1335
|
+
.tablesvp-main {
|
|
1336
|
+
display: flex;
|
|
1337
|
+
flex-direction: column;
|
|
1338
|
+
flex: 1;
|
|
1339
|
+
width: 100%;
|
|
1340
|
+
}
|
|
1341
|
+
.tablesvp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
1342
|
+
display: none;
|
|
1343
|
+
}
|
|
1344
|
+
.tablesvp-paginat {
|
|
1345
|
+
overflow: hidden;
|
|
1346
|
+
}
|
|
1347
|
+
.tablesvp-paginat .el-pagination {
|
|
1348
|
+
justify-content: flex-end;
|
|
1327
1349
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
padding: 0;
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
}
|
|
32
|
-
.input-history-select-li {
|
|
32
|
+
.input-history-select-ul .input-history-select-li {
|
|
33
33
|
padding: 0 32px 0 20px;
|
|
34
34
|
position: relative;
|
|
35
35
|
white-space: nowrap;
|
|
@@ -41,34 +41,24 @@
|
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
cursor: pointer;
|
|
43
43
|
}
|
|
44
|
-
.input-history-select-li.hover, .input-history-select-li:hover {
|
|
44
|
+
.input-history-select-ul .input-history-select-li.hover, .input-history-select-ul .input-history-select-li:hover {
|
|
45
45
|
background-color: #f5f7fa;
|
|
46
46
|
}
|
|
47
|
-
.input-history-select-li.hover .input-history-select-li-clean, .input-history-select-li:hover .input-history-select-li-clean {
|
|
47
|
+
.input-history-select-ul .input-history-select-li.hover .input-history-select-li-clean, .input-history-select-ul .input-history-select-li:hover .input-history-select-li-clean {
|
|
48
48
|
display: inline-flex;
|
|
49
49
|
}
|
|
50
|
-
.input-history-select-li.selected {
|
|
50
|
+
.input-history-select-ul .input-history-select-li.selected {
|
|
51
51
|
color: var(--bv-color-primary);
|
|
52
52
|
font-weight: 700;
|
|
53
53
|
}
|
|
54
|
-
.input-history-select-li.is-disabled {
|
|
54
|
+
.input-history-select-ul .input-history-select-li.is-disabled {
|
|
55
55
|
background-color: #ffffff;
|
|
56
56
|
color: #a8abb2;
|
|
57
57
|
cursor: not-allowed;
|
|
58
58
|
}
|
|
59
|
-
.input-history-select-li-clean {
|
|
60
|
-
position: absolute;
|
|
59
|
+
.input-history-select-ul .input-history-select-li-clean {
|
|
61
60
|
align-items: center;
|
|
62
61
|
justify-content: center;
|
|
63
|
-
right: 16px;
|
|
64
|
-
height: 100%;
|
|
65
62
|
display: none;
|
|
66
|
-
|
|
67
|
-
.input-history-select-clean {
|
|
68
|
-
padding: 0 20px;
|
|
69
|
-
}
|
|
70
|
-
.input-history-select-clean-but {
|
|
71
|
-
float: right;
|
|
72
|
-
color: #ccc;
|
|
73
|
-
cursor: pointer;
|
|
63
|
+
margin-left: 5px;
|
|
74
64
|
}
|
package/dist/css/lists.css
CHANGED
package/dist/css/listsp.css
CHANGED
|
@@ -49,11 +49,6 @@
|
|
|
49
49
|
.lists-list-item .el-card {
|
|
50
50
|
background-color: transparent;
|
|
51
51
|
}
|
|
52
|
-
.lists-list .lists-no-data {
|
|
53
|
-
text-align: center;
|
|
54
|
-
margin-top: 20px;
|
|
55
|
-
color: #999;
|
|
56
|
-
}
|
|
57
52
|
|
|
58
53
|
.paging {
|
|
59
54
|
padding: 10px;
|
|
@@ -67,6 +62,7 @@
|
|
|
67
62
|
}
|
|
68
63
|
.paging-slot > span {
|
|
69
64
|
margin-right: 10px;
|
|
65
|
+
white-space: nowrap;
|
|
70
66
|
}
|
|
71
67
|
.paging .el-pagination__total {
|
|
72
68
|
font-size: 14px;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--on: rgb(91, 189, 246);
|
|
3
|
+
--color-primary: #409eff;
|
|
4
|
+
--bag-primary: #409eff;
|
|
5
|
+
--bag-primary-text: #fff;
|
|
6
|
+
--border: #eee;
|
|
7
|
+
--layout-panel-gap: 10px;
|
|
8
|
+
--layout-panel-padding: 20px;
|
|
9
|
+
--layout-form-item-padding-right: var(
|
|
10
|
+
--layout-panel-gap
|
|
11
|
+
);
|
|
12
|
+
--g-main-bg: var(--bg-color-page);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.no-data {
|
|
16
|
+
text-align: center;
|
|
17
|
+
margin-top: 20px;
|
|
18
|
+
color: #999;
|
|
19
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
.set-column-dialog-main[data-v-
|
|
1
|
+
.set-column-dialog-main[data-v-f43f186a] {
|
|
2
2
|
font-size: 16px;
|
|
3
3
|
display: flex;
|
|
4
4
|
}
|
|
5
|
-
.set-column-dialog-main .set-column-check[data-v-
|
|
5
|
+
.set-column-dialog-main .set-column-check[data-v-f43f186a] {
|
|
6
6
|
flex: 1;
|
|
7
7
|
}
|
|
8
|
-
.set-column-dialog-main .set-column-check .set-column-check-list[data-v-
|
|
8
|
+
.set-column-dialog-main .set-column-check .set-column-check-list[data-v-f43f186a] {
|
|
9
9
|
padding: 10px;
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: row;
|
|
12
12
|
flex-wrap: wrap;
|
|
13
13
|
overflow-y: auto;
|
|
14
14
|
}
|
|
15
|
-
.set-column-dialog-main .set-column-check .set-column-check-list .set-column-check-list-li[data-v-
|
|
15
|
+
.set-column-dialog-main .set-column-check .set-column-check-list .set-column-check-list-li[data-v-f43f186a] {
|
|
16
16
|
width: 130px;
|
|
17
17
|
}
|
|
18
|
-
.set-column-dialog-main .set-column-already[data-v-
|
|
18
|
+
.set-column-dialog-main .set-column-already[data-v-f43f186a] {
|
|
19
19
|
border-left: 1px solid #999;
|
|
20
20
|
padding-left: 20px;
|
|
21
21
|
width: 260px;
|
|
22
22
|
}
|
|
23
|
-
.set-column-dialog-main .set-column-already .set-column-already-list[data-v-
|
|
23
|
+
.set-column-dialog-main .set-column-already .set-column-already-list[data-v-f43f186a] {
|
|
24
24
|
padding: 10px 10px 10px 0;
|
|
25
25
|
}
|
|
26
|
-
.set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li[data-v-
|
|
26
|
+
.set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li[data-v-f43f186a] {
|
|
27
27
|
height: 40px;
|
|
28
28
|
line-height: 40px;
|
|
29
29
|
border-bottom: 1px solid #ccc;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
}
|
|
34
|
-
.set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li .set-column-already-li-v[data-v-
|
|
34
|
+
.set-column-dialog-main .set-column-already .set-column-already-list .set-column-already-li .set-column-already-li-v[data-v-f43f186a] {
|
|
35
35
|
display: flex;
|
|
36
36
|
flex: 1;
|
|
37
37
|
align-items: center;
|
package/dist/css/page.css
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
.forms-elf.center .el-form-item__label {
|
|
100
100
|
justify-content: center;
|
|
101
101
|
}
|
|
102
|
+
.forms .forms-li.forms-buts {
|
|
103
|
+
margin-right: 0;
|
|
104
|
+
}
|
|
102
105
|
.forms-buts-div .el-button {
|
|
103
106
|
height: inherit;
|
|
104
107
|
}
|
|
@@ -215,6 +218,7 @@
|
|
|
215
218
|
}
|
|
216
219
|
.paging-slot > span {
|
|
217
220
|
margin-right: 10px;
|
|
221
|
+
white-space: nowrap;
|
|
218
222
|
}
|
|
219
223
|
.paging .el-pagination__total {
|
|
220
224
|
font-size: 14px;
|
package/dist/css/paging.css
CHANGED
package/dist/css/tablesp.css
CHANGED
package/dist/css/tablesvp.css
CHANGED
|
@@ -61,6 +61,7 @@ var config_default = {
|
|
|
61
61
|
"box-teleport",
|
|
62
62
|
"box-title",
|
|
63
63
|
"dialogs",
|
|
64
|
+
"no-data",
|
|
64
65
|
"popup",
|
|
65
66
|
"right-key",
|
|
66
67
|
"seamless-scroll",
|
|
@@ -148,6 +149,7 @@ var config_default = {
|
|
|
148
149
|
"box-mask",
|
|
149
150
|
"box-title",
|
|
150
151
|
"dialogs",
|
|
152
|
+
"no-data",
|
|
151
153
|
"popup",
|
|
152
154
|
"right-key",
|
|
153
155
|
"seamless-scroll",
|
|
@@ -61,6 +61,7 @@ var config_default = {
|
|
|
61
61
|
"box-teleport",
|
|
62
62
|
"box-title",
|
|
63
63
|
"dialogs",
|
|
64
|
+
"no-data",
|
|
64
65
|
"popup",
|
|
65
66
|
"right-key",
|
|
66
67
|
"seamless-scroll",
|
|
@@ -148,6 +149,7 @@ var config_default = {
|
|
|
148
149
|
"box-mask",
|
|
149
150
|
"box-title",
|
|
150
151
|
"dialogs",
|
|
152
|
+
"no-data",
|
|
151
153
|
"popup",
|
|
152
154
|
"right-key",
|
|
153
155
|
"seamless-scroll",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkIPHLXLMMcjs = require('./chunk-IPHLXLMM.cjs');
|
|
4
4
|
|
|
5
5
|
// expand/components.ts
|
|
6
6
|
var _humpToLine = require('@fangzhongya/utils/name/humpToLine');
|
|
@@ -29,11 +29,11 @@ function namefilter(c, name) {
|
|
|
29
29
|
function getFrom(mc, type, conf) {
|
|
30
30
|
const filename = mc.replace(new RegExp("^" + config.prefix + "-"), "");
|
|
31
31
|
if (type == 1) {
|
|
32
|
-
if (
|
|
32
|
+
if (_chunkIPHLXLMMcjs.config_default.components.includes(filename)) {
|
|
33
33
|
const name = _lineToLargeHump.lineToLargeHump.call(void 0, mc);
|
|
34
34
|
const from = `${config.name}/components/${filename}/index`;
|
|
35
35
|
let sideEffects;
|
|
36
|
-
if (
|
|
36
|
+
if (_chunkIPHLXLMMcjs.config_default.sideEffects.includes(filename)) {
|
|
37
37
|
if (conf.css) {
|
|
38
38
|
sideEffects = `${config.name}/components/${filename}/style/index2/.scss`;
|
|
39
39
|
} else {
|
|
@@ -49,14 +49,14 @@ function getFrom(mc, type, conf) {
|
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
} else {
|
|
52
|
-
if (
|
|
52
|
+
if (_chunkIPHLXLMMcjs.config_default.directives.includes(filename)) {
|
|
53
53
|
const name = "default";
|
|
54
54
|
const from = `${config.name}/directives/${filename}/index`;
|
|
55
55
|
return {
|
|
56
56
|
name,
|
|
57
57
|
from
|
|
58
58
|
};
|
|
59
|
-
} else if (
|
|
59
|
+
} else if (_chunkIPHLXLMMcjs.config_default.directives.includes("v-" + filename)) {
|
|
60
60
|
const name = "default";
|
|
61
61
|
const from = `${config.name}/directives/${"v-" + filename}/index`;
|
|
62
62
|
return {
|
package/dist/expand/config.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkIPHLXLMMcjs = require('./chunk-IPHLXLMM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = _chunkIPHLXLMMcjs.config_default;
|
package/dist/expand/config.js
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -11,7 +11,9 @@ exports.eventAliass = index$1.eventAliass;
|
|
|
11
11
|
exports.provideGlobalConfig = index$2.provideGlobalConfig;
|
|
12
12
|
exports.setGlobalConfig = index$2.setGlobalConfig;
|
|
13
13
|
exports.useGlobalConfig = index$2.useGlobalConfig;
|
|
14
|
+
exports.buildLocaleAdd = index$3.buildLocaleAdd;
|
|
14
15
|
exports.buildLocaleContext = index$3.buildLocaleContext;
|
|
16
|
+
exports.buildPropsDefault = index$3.buildPropsDefault;
|
|
15
17
|
exports.buildTranslator = index$3.buildTranslator;
|
|
16
18
|
exports.useLocale = index$3.useLocale;
|
|
17
19
|
exports.useAttrValue = index$4.useAttrValue;
|
package/dist/hooks/index.js
CHANGED
|
@@ -2,10 +2,12 @@ import { useCssName } from "./cssname/index.js";
|
|
|
2
2
|
import "./default-config/index.js";
|
|
3
3
|
import { eventAliass } from "./event-aliass/index.js";
|
|
4
4
|
import { provideGlobalConfig, setGlobalConfig, useGlobalConfig } from "./global-config/index.js";
|
|
5
|
-
import { buildLocaleContext, buildTranslator, useLocale } from "./locale/index.js";
|
|
5
|
+
import { buildLocaleAdd, buildLocaleContext, buildPropsDefault, buildTranslator, useLocale } from "./locale/index.js";
|
|
6
6
|
import { useAttrValue, useInherit } from "./inherit/index.js";
|
|
7
7
|
export {
|
|
8
|
+
buildLocaleAdd,
|
|
8
9
|
buildLocaleContext,
|
|
10
|
+
buildPropsDefault,
|
|
9
11
|
buildTranslator,
|
|
10
12
|
eventAliass,
|
|
11
13
|
provideGlobalConfig,
|
|
@@ -17,7 +17,52 @@ function getValue(key, locale) {
|
|
|
17
17
|
return obj;
|
|
18
18
|
}
|
|
19
19
|
function buildTranslator(locale) {
|
|
20
|
-
return (path) =>
|
|
20
|
+
return (path, ...values) => {
|
|
21
|
+
let v = getValue(path, vue.unref(locale).value);
|
|
22
|
+
if (values.length > 0) {
|
|
23
|
+
values.forEach((z, i) => {
|
|
24
|
+
v = v.replaceAll("$" + (i + 1), z);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return v;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function getPropsDefault(props, arr, getLocale) {
|
|
31
|
+
const keys = [];
|
|
32
|
+
const keyObj = {};
|
|
33
|
+
arr.forEach((v) => {
|
|
34
|
+
keys.push(v.prop);
|
|
35
|
+
keyObj[v.prop] = v;
|
|
36
|
+
});
|
|
37
|
+
return new Proxy(props, {
|
|
38
|
+
get(_target, k) {
|
|
39
|
+
if (typeof k === "string" && keys.includes(k)) {
|
|
40
|
+
const v = _target[k];
|
|
41
|
+
if (v === void 0) {
|
|
42
|
+
const o = keyObj[k];
|
|
43
|
+
const l = getLocale(o.locale);
|
|
44
|
+
if (o.filter) {
|
|
45
|
+
return o.filter(l);
|
|
46
|
+
}
|
|
47
|
+
return l;
|
|
48
|
+
}
|
|
49
|
+
return v;
|
|
50
|
+
}
|
|
51
|
+
return _target[k];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function buildPropsDefault(getLocale) {
|
|
56
|
+
return (props, arr) => getPropsDefault(props, arr, getLocale);
|
|
57
|
+
}
|
|
58
|
+
function buildLocaleAdd(locale, lang) {
|
|
59
|
+
return (...arr) => {
|
|
60
|
+
if (lang.value == "zh-cn") {
|
|
61
|
+
return arr.map((o) => getValue(o, vue.unref(locale).value)).join("");
|
|
62
|
+
} else {
|
|
63
|
+
return arr.map((o) => getValue(o, vue.unref(locale).value)).join(" ");
|
|
64
|
+
}
|
|
65
|
+
};
|
|
21
66
|
}
|
|
22
67
|
function buildLocaleContext(locale) {
|
|
23
68
|
const lang = vue.computed(() => vue.unref(locale).name);
|
|
@@ -25,7 +70,9 @@ function buildLocaleContext(locale) {
|
|
|
25
70
|
return {
|
|
26
71
|
lang,
|
|
27
72
|
locale: localeRef,
|
|
28
|
-
|
|
73
|
+
getPropsDefault: buildPropsDefault(buildTranslator(locale)),
|
|
74
|
+
getLocale: buildTranslator(locale),
|
|
75
|
+
getLocaleAdd: buildLocaleAdd(locale, lang)
|
|
29
76
|
};
|
|
30
77
|
}
|
|
31
78
|
function useLocale() {
|
|
@@ -43,6 +90,8 @@ function useLocale() {
|
|
|
43
90
|
})
|
|
44
91
|
);
|
|
45
92
|
}
|
|
93
|
+
exports.buildLocaleAdd = buildLocaleAdd;
|
|
46
94
|
exports.buildLocaleContext = buildLocaleContext;
|
|
95
|
+
exports.buildPropsDefault = buildPropsDefault;
|
|
47
96
|
exports.buildTranslator = buildTranslator;
|
|
48
97
|
exports.useLocale = useLocale;
|
|
@@ -1,5 +1,66 @@
|
|
|
1
|
-
import { Locale,
|
|
1
|
+
import { Locale, Translator } from '../../types/locale';
|
|
2
2
|
import { MaybeRef } from '../../types/hooks';
|
|
3
|
+
import { ComputedRef, Ref } from 'vue';
|
|
3
4
|
export declare function buildTranslator(locale: MaybeRef<Locale>): Translator;
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
type PropsDefault = {
|
|
6
|
+
prop: string;
|
|
7
|
+
locale: string;
|
|
8
|
+
filter?: (locale: string) => string;
|
|
9
|
+
};
|
|
10
|
+
export declare function buildPropsDefault(getLocale: Translator): (props: any, arr: Array<PropsDefault>) => any;
|
|
11
|
+
export declare function buildLocaleAdd(locale: MaybeRef<Locale>, lang: ComputedRef<string>): (...arr: string[]) => string;
|
|
12
|
+
export declare function buildLocaleContext(locale: MaybeRef<Locale>): {
|
|
13
|
+
lang: ComputedRef<string>;
|
|
14
|
+
locale: Ref<{
|
|
15
|
+
name: string;
|
|
16
|
+
value: {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly value: {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
}, Locale | {
|
|
25
|
+
name: string;
|
|
26
|
+
value: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
} | Readonly<Locale> | {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly value: {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
getPropsDefault: (props: any, arr: Array<PropsDefault>) => any;
|
|
36
|
+
getLocale: Translator;
|
|
37
|
+
getLocaleAdd: (...arr: string[]) => string;
|
|
38
|
+
};
|
|
39
|
+
export declare function useLocale(): {
|
|
40
|
+
lang: ComputedRef<string>;
|
|
41
|
+
locale: Ref<{
|
|
42
|
+
name: string;
|
|
43
|
+
value: {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly value: {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
};
|
|
51
|
+
}, Locale | {
|
|
52
|
+
name: string;
|
|
53
|
+
value: {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
};
|
|
56
|
+
} | Readonly<Locale> | {
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly value: {
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
getPropsDefault: (props: any, arr: Array<PropsDefault>) => any;
|
|
63
|
+
getLocale: Translator;
|
|
64
|
+
getLocaleAdd: (...arr: string[]) => string;
|
|
65
|
+
};
|
|
66
|
+
export {};
|
|
@@ -15,7 +15,52 @@ function getValue(key, locale) {
|
|
|
15
15
|
return obj;
|
|
16
16
|
}
|
|
17
17
|
function buildTranslator(locale) {
|
|
18
|
-
return (path) =>
|
|
18
|
+
return (path, ...values) => {
|
|
19
|
+
let v = getValue(path, unref(locale).value);
|
|
20
|
+
if (values.length > 0) {
|
|
21
|
+
values.forEach((z, i) => {
|
|
22
|
+
v = v.replaceAll("$" + (i + 1), z);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return v;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function getPropsDefault(props, arr, getLocale) {
|
|
29
|
+
const keys = [];
|
|
30
|
+
const keyObj = {};
|
|
31
|
+
arr.forEach((v) => {
|
|
32
|
+
keys.push(v.prop);
|
|
33
|
+
keyObj[v.prop] = v;
|
|
34
|
+
});
|
|
35
|
+
return new Proxy(props, {
|
|
36
|
+
get(_target, k) {
|
|
37
|
+
if (typeof k === "string" && keys.includes(k)) {
|
|
38
|
+
const v = _target[k];
|
|
39
|
+
if (v === void 0) {
|
|
40
|
+
const o = keyObj[k];
|
|
41
|
+
const l = getLocale(o.locale);
|
|
42
|
+
if (o.filter) {
|
|
43
|
+
return o.filter(l);
|
|
44
|
+
}
|
|
45
|
+
return l;
|
|
46
|
+
}
|
|
47
|
+
return v;
|
|
48
|
+
}
|
|
49
|
+
return _target[k];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function buildPropsDefault(getLocale) {
|
|
54
|
+
return (props, arr) => getPropsDefault(props, arr, getLocale);
|
|
55
|
+
}
|
|
56
|
+
function buildLocaleAdd(locale, lang) {
|
|
57
|
+
return (...arr) => {
|
|
58
|
+
if (lang.value == "zh-cn") {
|
|
59
|
+
return arr.map((o) => getValue(o, unref(locale).value)).join("");
|
|
60
|
+
} else {
|
|
61
|
+
return arr.map((o) => getValue(o, unref(locale).value)).join(" ");
|
|
62
|
+
}
|
|
63
|
+
};
|
|
19
64
|
}
|
|
20
65
|
function buildLocaleContext(locale) {
|
|
21
66
|
const lang = computed(() => unref(locale).name);
|
|
@@ -23,7 +68,9 @@ function buildLocaleContext(locale) {
|
|
|
23
68
|
return {
|
|
24
69
|
lang,
|
|
25
70
|
locale: localeRef,
|
|
26
|
-
|
|
71
|
+
getPropsDefault: buildPropsDefault(buildTranslator(locale)),
|
|
72
|
+
getLocale: buildTranslator(locale),
|
|
73
|
+
getLocaleAdd: buildLocaleAdd(locale, lang)
|
|
27
74
|
};
|
|
28
75
|
}
|
|
29
76
|
function useLocale() {
|
|
@@ -42,7 +89,9 @@ function useLocale() {
|
|
|
42
89
|
);
|
|
43
90
|
}
|
|
44
91
|
export {
|
|
92
|
+
buildLocaleAdd,
|
|
45
93
|
buildLocaleContext,
|
|
94
|
+
buildPropsDefault,
|
|
46
95
|
buildTranslator,
|
|
47
96
|
useLocale
|
|
48
97
|
};
|