@das-fed/upf-web 6.4.0-hot.3 → 6.4.0-hot.5
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/es5.js +32 -32
- package/{index-Z2BfbNda.js → index-7abDOKzJ.js} +1 -1
- package/{index-BcEiAZYT.js → index-CUfV9lMV.js} +1 -1
- package/index-CUfV9lMV.js.gz +0 -0
- package/{index-CuxN_o3P.js → index-DigREEzd.js} +520 -512
- package/index-DigREEzd.js.gz +0 -0
- package/index.js +1 -1
- package/package.json +6 -6
- package/packages/create-das-web-app/es5.js +92 -89
- package/packages/create-das-web-app/index.js +81 -73
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/i18n/es5.js +7 -7
- package/packages/i18n/index.js +7 -7
- package/packages/i18n/index.js.gz +0 -0
- package/index-BcEiAZYT.js.gz +0 -0
- package/index-CuxN_o3P.js.gz +0 -0
package/packages/i18n/es5.js
CHANGED
|
@@ -16,7 +16,7 @@ var D = "language",
|
|
|
16
16
|
j = h || window.localStorage.getItem(D) || window.navigator.language || "zh-CN",
|
|
17
17
|
c = vue.ref(j),
|
|
18
18
|
y = "dasI18n",
|
|
19
|
-
|
|
19
|
+
p = function p() {
|
|
20
20
|
var t = document.documentElement;
|
|
21
21
|
t && t.setAttribute("lang", c.value);
|
|
22
22
|
},
|
|
@@ -29,7 +29,7 @@ var D = "language",
|
|
|
29
29
|
var s = {};
|
|
30
30
|
for (var o in t) for (var n in t[o]) {
|
|
31
31
|
var _t$o$n;
|
|
32
|
-
s[n] || (s[n] = {}), s[n][o] = (_t$o$n = t[o][n]) !== null && _t$o$n !== void 0 ? _t$o$n : "", e && (l[n] || (l[n] = {}), l[n][o] = s[n][o]), r && (i[n] || (i[n] = {}), i[n][o] = s[n][o]);
|
|
32
|
+
s[n] || (s[n] = {}), s[n][o] = (_t$o$n = t[o][n]) !== null && _t$o$n !== void 0 ? _t$o$n : "", e && (l[n] || (l[n] = {}), l[n][o] = s[n][o]), r && (i[n] || (i[n] = {}, console.log("".concat(i[n], "\u4E3A\u7A7A\uFF0C\u91CD\u65B0\u8BBE\u7F6E\u4E3A{}"))), i[n][o] = s[n][o]);
|
|
33
33
|
}
|
|
34
34
|
console.log("customLangeData===", i), console.log("globalLangeData===", l);
|
|
35
35
|
},
|
|
@@ -50,7 +50,7 @@ var D = "language",
|
|
|
50
50
|
return _regenerator().w(function (_context) {
|
|
51
51
|
while (1) switch (_context.n) {
|
|
52
52
|
case 0:
|
|
53
|
-
|
|
53
|
+
p();
|
|
54
54
|
a = window[y];
|
|
55
55
|
a && b(a, "global");
|
|
56
56
|
case 1:
|
|
@@ -79,7 +79,7 @@ var D = "language",
|
|
|
79
79
|
s = (_m$e = m[e]) !== null && _m$e !== void 0 ? _m$e : {},
|
|
80
80
|
o = i[t] || l[t] || r[t] || s[t] || t;
|
|
81
81
|
if (o === t) return t;
|
|
82
|
-
typeof o == "string" && (o = {
|
|
82
|
+
console.log("customLangeData===222", i), typeof o == "string" && (o = {
|
|
83
83
|
"zh-CN": o
|
|
84
84
|
});
|
|
85
85
|
var n = o[c.value];
|
|
@@ -96,12 +96,12 @@ var D = "language",
|
|
|
96
96
|
return I.apply(void 0, [t].concat(a)).value;
|
|
97
97
|
},
|
|
98
98
|
T = function T(t) {
|
|
99
|
-
c.value = t, console.log("currentLang.value===", c.value),
|
|
99
|
+
c.value = t, console.log("currentLang.value===", c.value), p();
|
|
100
100
|
},
|
|
101
101
|
_ = function _() {
|
|
102
102
|
return c;
|
|
103
103
|
},
|
|
104
|
-
|
|
104
|
+
g = {
|
|
105
105
|
"en-US": {
|
|
106
106
|
ant: function ant() {
|
|
107
107
|
return Promise.resolve().then(function () {
|
|
@@ -270,7 +270,7 @@ var O = /*#__PURE__*/function () {
|
|
|
270
270
|
return _regenerator().w(function (_context2) {
|
|
271
271
|
while (1) switch (_context2.p = _context2.n) {
|
|
272
272
|
case 0:
|
|
273
|
-
a =
|
|
273
|
+
a = g[t] || g["zh-CN"];
|
|
274
274
|
_context2.p = 1;
|
|
275
275
|
_context2.n = 2;
|
|
276
276
|
return a.ant();
|
package/packages/i18n/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive as u, ref as L, computed as w } from "vue";
|
|
2
2
|
import { getUrlParams as C } from "@das-fed/upf-utils/common-tools";
|
|
3
|
-
const D = "language", i = u({}), l = u({}), m = u({}), h = C(location.href, "uiCulture") || "", j = h || window.localStorage.getItem(D) || window.navigator.language || "zh-CN", c = L(j), y = "dasI18n",
|
|
3
|
+
const D = "language", i = u({}), l = u({}), m = u({}), h = C(location.href, "uiCulture") || "", j = h || window.localStorage.getItem(D) || window.navigator.language || "zh-CN", c = L(j), y = "dasI18n", p = () => {
|
|
4
4
|
const t = document.documentElement;
|
|
5
5
|
t && t.setAttribute("lang", c.value);
|
|
6
6
|
}, M = (t = {}, a) => {
|
|
@@ -9,7 +9,7 @@ const D = "language", i = u({}), l = u({}), m = u({}), h = C(location.href, "uiC
|
|
|
9
9
|
const s = {};
|
|
10
10
|
for (const o in t)
|
|
11
11
|
for (const n in t[o])
|
|
12
|
-
s[n] || (s[n] = {}), s[n][o] = t[o][n] ?? "", e && (l[n] || (l[n] = {}), l[n][o] = s[n][o]), r && (i[n] || (i[n] = {}), i[n][o] = s[n][o]);
|
|
12
|
+
s[n] || (s[n] = {}), s[n][o] = t[o][n] ?? "", e && (l[n] || (l[n] = {}), l[n][o] = s[n][o]), r && (i[n] || (i[n] = {}, console.log(`${i[n]}为空,重新设置为{}`)), i[n][o] = s[n][o]);
|
|
13
13
|
console.log("customLangeData===", i), console.log("globalLangeData===", l);
|
|
14
14
|
}, b = (t = {}, a) => {
|
|
15
15
|
var s;
|
|
@@ -20,7 +20,7 @@ const D = "language", i = u({}), l = u({}), m = u({}), h = C(location.href, "uiC
|
|
|
20
20
|
n && (m[n] || (m[n] = {}), m[n][o] = t[o]), i[o] || (i[o] = t[o]);
|
|
21
21
|
}
|
|
22
22
|
}, R = async (t) => {
|
|
23
|
-
|
|
23
|
+
p();
|
|
24
24
|
const a = window[y];
|
|
25
25
|
a && b(a, "global");
|
|
26
26
|
}, v = (t) => {
|
|
@@ -31,14 +31,14 @@ const D = "language", i = u({}), l = u({}), m = u({}), h = C(location.href, "uiC
|
|
|
31
31
|
const e = v(location.pathname);
|
|
32
32
|
let r = m.framework ?? {}, s = m[e] ?? {}, o = i[t] || l[t] || r[t] || s[t] || t;
|
|
33
33
|
if (o === t) return t;
|
|
34
|
-
typeof o == "string" && (o = { "zh-CN": o });
|
|
34
|
+
console.log("customLangeData===222", i), typeof o == "string" && (o = { "zh-CN": o });
|
|
35
35
|
let n = o[c.value];
|
|
36
36
|
return c.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (n = o["zh-cn"]), a.map((f, d) => {
|
|
37
37
|
n && (n = n.replace(`$${d}`, f));
|
|
38
38
|
}), n;
|
|
39
39
|
}), I = A, N = (t, ...a) => I(t, ...a).value, T = (t) => {
|
|
40
|
-
c.value = t, console.log("currentLang.value===", c.value),
|
|
41
|
-
}, _ = () => c,
|
|
40
|
+
c.value = t, console.log("currentLang.value===", c.value), p();
|
|
41
|
+
}, _ = () => c, g = {
|
|
42
42
|
"en-US": { ant: () => import("ant-design-vue/es/locale/en_US"), dayjs: () => import("dayjs/locale/en") },
|
|
43
43
|
"zh-CN": { ant: () => import("ant-design-vue/es/locale/zh_CN"), dayjs: () => import("dayjs/locale/zh-cn") },
|
|
44
44
|
"zh-MO": { ant: () => import("ant-design-vue/es/locale/zh_TW"), dayjs: () => import("dayjs/locale/zh-tw") },
|
|
@@ -59,7 +59,7 @@ function x(t, a) {
|
|
|
59
59
|
return e && e[t] && e[t][a] ? e[t][a] : ((r = window.DATE_FORMAT_MAP[t]) == null ? void 0 : r[a]) || "YYYY-MM-DD";
|
|
60
60
|
}
|
|
61
61
|
const O = async (t) => {
|
|
62
|
-
const a =
|
|
62
|
+
const a = g[t] || g["zh-CN"];
|
|
63
63
|
try {
|
|
64
64
|
const e = await a.ant();
|
|
65
65
|
return await a.dayjs(), e.default;
|
|
Binary file
|
package/index-BcEiAZYT.js.gz
DELETED
|
Binary file
|
package/index-CuxN_o3P.js.gz
DELETED
|
Binary file
|