@kengic/vue 0.0.2-beta.40 → 0.0.2-beta.41
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/kengic-vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Collapse as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as _, createVNode as h } from "vue";
|
|
2
|
+
import { Collapse as Y } from "ant-design-vue";
|
|
3
|
+
const Ee = _({
|
|
4
4
|
name: "KgPage",
|
|
5
5
|
setup(e, {
|
|
6
6
|
slots: t
|
|
@@ -12,20 +12,37 @@ const be = P({
|
|
|
12
12
|
}, [(i = t.default) == null ? void 0 : i.call(t)]);
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
})
|
|
16
|
-
|
|
15
|
+
}), W = {
|
|
16
|
+
kg: {
|
|
17
|
+
KgVarProfile: {
|
|
18
|
+
title: "Search"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, Z = {
|
|
22
|
+
kg: {
|
|
23
|
+
KgVarProfile: {
|
|
24
|
+
title: "\u67E5\u8BE2\u6761\u4EF6"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
let M = null;
|
|
29
|
+
function Ne(e) {
|
|
30
|
+
M = e;
|
|
31
|
+
}
|
|
32
|
+
const z = (e, ...t) => M ? M(e, ...t) : e, Be = { en: W, zh_CN: Z };
|
|
33
|
+
const Se = _({
|
|
17
34
|
name: "KgVarProfile",
|
|
18
35
|
setup(e, {
|
|
19
36
|
slots: t
|
|
20
37
|
}) {
|
|
21
38
|
return () => h("div", {
|
|
22
39
|
class: "kg-var-profile"
|
|
23
|
-
}, [h(
|
|
40
|
+
}, [h(Y, {
|
|
24
41
|
activeKey: "1"
|
|
25
42
|
}, {
|
|
26
|
-
default: () => [h(
|
|
43
|
+
default: () => [h(Y.Panel, {
|
|
27
44
|
key: "1",
|
|
28
|
-
header: "
|
|
45
|
+
header: z("kg.KgVarProfile.title")
|
|
29
46
|
}, {
|
|
30
47
|
default: () => {
|
|
31
48
|
var i;
|
|
@@ -34,46 +51,38 @@ const ge = P({
|
|
|
34
51
|
})]
|
|
35
52
|
})]);
|
|
36
53
|
}
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, W = {
|
|
42
|
-
foo: {
|
|
43
|
-
x: "\u554A\u554A\u554A"
|
|
44
|
-
}
|
|
45
|
-
}, Ee = { en: V, zh_CN: W };
|
|
46
|
-
var a = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "data-manager", e.BUSINESS_MANAGER = "business-manager", e.SYS = "sys", e))(a || {}), u = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "/wms/data-manager", e.BUSINESS_MANAGER = "/wms/business-manager", e.SYS = "/sys", e))(u || {});
|
|
47
|
-
const _ = ["data-manager", "business-manager", "sys"];
|
|
48
|
-
function Z(e, t) {
|
|
54
|
+
});
|
|
55
|
+
var b = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "data-manager", e.BUSINESS_MANAGER = "business-manager", e.SYS = "sys", e))(b || {}), u = /* @__PURE__ */ ((e) => (e.DATA_MANAGER = "/wms/data-manager", e.BUSINESS_MANAGER = "/wms/business-manager", e.SYS = "/sys", e))(u || {});
|
|
56
|
+
const L = ["data-manager", "business-manager", "sys"];
|
|
57
|
+
function F(e, t) {
|
|
49
58
|
var i, o;
|
|
50
59
|
switch (t) {
|
|
51
|
-
case
|
|
60
|
+
case b.DATA_MANAGER:
|
|
52
61
|
return (i = e == null ? void 0 : e.startsWith(u.DATA_MANAGER)) != null ? i : !1;
|
|
53
|
-
case
|
|
62
|
+
case b.BUSINESS_MANAGER:
|
|
54
63
|
return (o = e == null ? void 0 : e.startsWith(u.BUSINESS_MANAGER)) != null ? o : !1;
|
|
55
|
-
case
|
|
64
|
+
case b.SYS:
|
|
56
65
|
return (e == null ? void 0 : e.startsWith(u.SYS)) || !(e != null && e.startsWith(u.DATA_MANAGER)) && !(e != null && e.startsWith(u.BUSINESS_MANAGER));
|
|
57
66
|
default:
|
|
58
67
|
throw new Error(`\u672A\u77E5\u6A21\u5757: ${t}`);
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
|
-
function
|
|
62
|
-
const t =
|
|
70
|
+
function me(e) {
|
|
71
|
+
const t = L.find((i) => F(e, i));
|
|
63
72
|
if (t)
|
|
64
73
|
return t;
|
|
65
74
|
throw new Error(`\u5730\u5740\u65E0\u6CD5\u5339\u914D\u6A21\u5757. \u5730\u5740: ${e}`);
|
|
66
75
|
}
|
|
67
|
-
function
|
|
76
|
+
function de(e) {
|
|
68
77
|
let t = "";
|
|
69
78
|
switch (e) {
|
|
70
|
-
case
|
|
79
|
+
case b.DATA_MANAGER:
|
|
71
80
|
t = `${u.DATA_MANAGER}/views/adrmst`;
|
|
72
81
|
break;
|
|
73
|
-
case
|
|
82
|
+
case b.BUSINESS_MANAGER:
|
|
74
83
|
t = `${u.BUSINESS_MANAGER}/outbound-plan/outbound-order/outbound-order`;
|
|
75
84
|
break;
|
|
76
|
-
case
|
|
85
|
+
case b.SYS:
|
|
77
86
|
t = "/about/index";
|
|
78
87
|
break;
|
|
79
88
|
default:
|
|
@@ -88,7 +97,7 @@ function me(e) {
|
|
|
88
97
|
* @license BSD-3-Clause
|
|
89
98
|
* @version 10.0.6
|
|
90
99
|
*/
|
|
91
|
-
const
|
|
100
|
+
const J = "array", q = "bit", v = "bits", H = "byte", C = "bytes", E = "", Q = "exponent", X = "function", y = "iec", ee = "Invalid number", te = "Invalid rounding method", B = "jedec", ie = "object", U = ".", ne = "round", oe = "s", re = "kbit", se = "kB", ce = " ", le = "string", ue = "0", T = {
|
|
92
101
|
symbol: {
|
|
93
102
|
iec: {
|
|
94
103
|
bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
|
|
@@ -104,75 +113,75 @@ const z = "array", F = "bit", U = "bits", J = "byte", k = "bytes", E = "", q = "
|
|
|
104
113
|
jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
|
|
105
114
|
}
|
|
106
115
|
};
|
|
107
|
-
function
|
|
116
|
+
function fe(e, {
|
|
108
117
|
bits: t = !1,
|
|
109
118
|
pad: i = !1,
|
|
110
119
|
base: o = -1,
|
|
111
120
|
round: l = 2,
|
|
112
121
|
locale: c = E,
|
|
113
|
-
localeOptions:
|
|
122
|
+
localeOptions: A = {},
|
|
114
123
|
separator: f = E,
|
|
115
|
-
spacer:
|
|
124
|
+
spacer: S = ce,
|
|
116
125
|
symbols: R = {},
|
|
117
126
|
standard: s = E,
|
|
118
|
-
output: w =
|
|
119
|
-
fullform:
|
|
120
|
-
fullforms:
|
|
127
|
+
output: w = le,
|
|
128
|
+
fullform: O = !1,
|
|
129
|
+
fullforms: G = [],
|
|
121
130
|
exponent: p = -1,
|
|
122
|
-
roundingMethod:
|
|
123
|
-
precision:
|
|
131
|
+
roundingMethod: V = ne,
|
|
132
|
+
precision: m = 0
|
|
124
133
|
} = {}) {
|
|
125
|
-
let r = p, g = Number(e), n = [],
|
|
126
|
-
o === -1 && s.length === 0 ? (o = 10, s =
|
|
127
|
-
const d = o === 10 ? 1e3 : 1024,
|
|
134
|
+
let r = p, g = Number(e), n = [], a = 0, I = E;
|
|
135
|
+
o === -1 && s.length === 0 ? (o = 10, s = B) : o === -1 && s.length > 0 ? (s = s === y ? y : B, o = s === y ? 2 : 10) : (o = o === 2 ? 2 : 10, s = o === 10 || s === B ? B : y);
|
|
136
|
+
const d = o === 10 ? 1e3 : 1024, x = O === !0, $ = g < 0, D = Math[V];
|
|
128
137
|
if (typeof e != "bigint" && isNaN(e))
|
|
129
|
-
throw new TypeError(
|
|
130
|
-
if (typeof
|
|
131
|
-
throw new TypeError(
|
|
132
|
-
if (
|
|
138
|
+
throw new TypeError(ee);
|
|
139
|
+
if (typeof D !== X)
|
|
140
|
+
throw new TypeError(te);
|
|
141
|
+
if ($ && (g = -g), (r === -1 || isNaN(r)) && (r = Math.floor(Math.log(g) / Math.log(d)), r < 0 && (r = 0)), r > 8 && (m > 0 && (m += 8 - r), r = 8), w === Q)
|
|
133
142
|
return r;
|
|
134
143
|
if (g === 0)
|
|
135
|
-
n[0] = 0, I = n[1] = T.symbol[s][t ?
|
|
144
|
+
n[0] = 0, I = n[1] = T.symbol[s][t ? v : C][r];
|
|
136
145
|
else {
|
|
137
|
-
|
|
146
|
+
a = g / (o === 2 ? Math.pow(2, r * 10) : Math.pow(1e3, r)), t && (a = a * 8, a >= d && r < 8 && (a = a / d, r++));
|
|
138
147
|
const N = Math.pow(10, r > 0 ? l : 0);
|
|
139
|
-
n[0] =
|
|
148
|
+
n[0] = D(a * N) / N, n[0] === d && r < 8 && p === -1 && (n[0] = 1, r++), I = n[1] = o === 10 && r === 1 ? t ? re : se : T.symbol[s][t ? v : C][r];
|
|
140
149
|
}
|
|
141
|
-
if (
|
|
142
|
-
const N = f ||
|
|
143
|
-
n[0] = `${
|
|
150
|
+
if ($ && (n[0] = -n[0]), m > 0 && (n[0] = n[0].toPrecision(m)), n[1] = R[n[1]] || n[1], c === !0 ? n[0] = n[0].toLocaleString() : c.length > 0 ? n[0] = n[0].toLocaleString(c, A) : f.length > 0 && (n[0] = n[0].toString().replace(U, f)), i && Number.isInteger(n[0]) === !1 && l > 0) {
|
|
151
|
+
const N = f || U, K = n[0].toString().split(N), k = K[1] || E, P = k.length, j = l - P;
|
|
152
|
+
n[0] = `${K[0]}${N}${k.padEnd(P + j, ue)}`;
|
|
144
153
|
}
|
|
145
|
-
return
|
|
154
|
+
return x && (n[1] = G[r] ? G[r] : T.fullform[s][r] + (t ? q : H) + (n[0] === 1 ? E : oe)), w === J ? n : w === ie ? {
|
|
146
155
|
value: n[0],
|
|
147
156
|
symbol: n[1],
|
|
148
157
|
exponent: r,
|
|
149
158
|
unit: I
|
|
150
|
-
} : n.join(
|
|
159
|
+
} : n.join(S);
|
|
151
160
|
}
|
|
152
|
-
function
|
|
161
|
+
function ye(e) {
|
|
153
162
|
const t = Number(e);
|
|
154
|
-
return Number.isNaN(t) || t <= 0 ? "0 KB" : String(
|
|
163
|
+
return Number.isNaN(t) || t <= 0 ? "0 KB" : String(fe(t)).toUpperCase();
|
|
155
164
|
}
|
|
156
|
-
function
|
|
165
|
+
function ae(e, t, i = 512) {
|
|
157
166
|
let o = e;
|
|
158
167
|
o.startsWith("data:") && (o = e.split("base64,")[1]);
|
|
159
168
|
const l = atob(o), c = [];
|
|
160
|
-
for (let
|
|
161
|
-
const f = l.slice(
|
|
169
|
+
for (let A = 0; A < l.length; A += i) {
|
|
170
|
+
const f = l.slice(A, A + i), S = new Array(f.length);
|
|
162
171
|
for (let s = 0; s < f.length; s++)
|
|
163
|
-
|
|
164
|
-
const R = new Uint8Array(
|
|
172
|
+
S[s] = f.charCodeAt(s);
|
|
173
|
+
const R = new Uint8Array(S);
|
|
165
174
|
c.push(R);
|
|
166
175
|
}
|
|
167
176
|
return new Blob(c, { type: t });
|
|
168
177
|
}
|
|
169
|
-
function
|
|
178
|
+
function he(e, t, i) {
|
|
170
179
|
let o;
|
|
171
|
-
typeof e == "string" ? o = new Blob([
|
|
180
|
+
typeof e == "string" ? o = new Blob([ae(e, i)], { type: i }) : o = new Blob([e], { type: i });
|
|
172
181
|
const l = URL.createObjectURL(o), c = document.createElement("a");
|
|
173
182
|
document.body.appendChild(c), c.setAttribute("style", "display:none"), c.setAttribute("href", l), c.setAttribute("download", t), c.click(), URL.revokeObjectURL(l);
|
|
174
183
|
}
|
|
175
|
-
function
|
|
184
|
+
function be(e) {
|
|
176
185
|
const t = [];
|
|
177
186
|
return e.forEach((i) => {
|
|
178
187
|
[
|
|
@@ -181,28 +190,30 @@ function fe(e) {
|
|
|
181
190
|
"/online/cgformTreeList/:id",
|
|
182
191
|
"/online/cgreport/:id",
|
|
183
192
|
"/online/graphreport/chart/:code"
|
|
184
|
-
].includes(i.path) &&
|
|
193
|
+
].includes(i.path) && L.forEach((o) => {
|
|
185
194
|
t.push({
|
|
186
195
|
...i,
|
|
187
196
|
path: `/${o}${i.path}`,
|
|
188
197
|
name: `${o}-${i.name}`,
|
|
189
198
|
id: `${o}-${i.id}`
|
|
190
199
|
});
|
|
191
|
-
}), i.children && (i.children =
|
|
200
|
+
}), i.children && (i.children = be(i.children));
|
|
192
201
|
}), [...e, ...t];
|
|
193
202
|
}
|
|
194
203
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
204
|
+
L as KG_APPS,
|
|
205
|
+
b as KG_APPS_ENUM,
|
|
197
206
|
u as KG_APPS_PREFIXS_ENUM,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
Be as KG_I18N,
|
|
208
|
+
Ee as KgPage,
|
|
209
|
+
Se as KgVarProfile,
|
|
210
|
+
be as addOnlineRoutesForAllApps,
|
|
211
|
+
ae as base64toBlob,
|
|
212
|
+
he as downloadFile,
|
|
213
|
+
me as getAppByPath,
|
|
214
|
+
de as getAppIndexPath,
|
|
215
|
+
ye as getFileSize,
|
|
216
|
+
F as isPathInApp,
|
|
217
|
+
Ne as setT,
|
|
218
|
+
z as t
|
|
208
219
|
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export declare const KG_I18N: {
|
|
2
2
|
en: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
kg: {
|
|
4
|
+
KgVarProfile: {
|
|
5
|
+
title: string;
|
|
6
|
+
};
|
|
5
7
|
};
|
|
6
8
|
};
|
|
7
9
|
zh_CN: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
kg: {
|
|
11
|
+
KgVarProfile: {
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
10
14
|
};
|
|
11
15
|
};
|
|
12
16
|
};
|
|
17
|
+
export * from './t';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare type T = {
|
|
2
|
+
(key: string): string;
|
|
3
|
+
(key: string, locale: string): string;
|
|
4
|
+
(key: string, locale: string, list: unknown[]): string;
|
|
5
|
+
(key: string, locale: string, named: Record<string, unknown>): string;
|
|
6
|
+
(key: string, list: unknown[]): string;
|
|
7
|
+
(key: string, named: Record<string, unknown>): string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 设置翻译方法.
|
|
11
|
+
* @param t 翻译方法.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setT(t: T): void;
|
|
14
|
+
/**
|
|
15
|
+
* 翻译.
|
|
16
|
+
* @param key
|
|
17
|
+
* @param arg
|
|
18
|
+
*/
|
|
19
|
+
export declare const t: T;
|
|
20
|
+
export {};
|