@skyfox2000/webui 1.5.7 → 1.5.10
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/assets/modules/{baseLayout-DfTxHOFc.js → baseLayout-BuQjrozB.js} +9 -9
- package/lib/assets/modules/{file-upload-DTOdV5vM.js → file-upload-DcusqXDb.js} +5 -5
- package/lib/assets/modules/{index-M1qERbea.js → index-BlQB5KSU.js} +2 -2
- package/lib/assets/modules/{index-BwMaOrJT.js → index-CW_ZCHWs.js} +1 -1
- package/lib/assets/modules/index-CekzHbWp.js +114 -0
- package/lib/assets/modules/{menuTabs-DWaBSRNr.js → menuTabs-BYSjomB7.js} +44 -36
- package/lib/assets/modules/{toolIcon-BYnHhAy-.js → toolIcon-D4vAp0qA.js} +1 -1
- package/lib/assets/modules/{upload-template-BKm9mFq8.js → upload-template-NU0Bpg4N.js} +2056 -2176
- package/lib/assets/modules/uploadList-ENSsTfpD.js +472 -0
- package/lib/const/options.d.ts +6 -20
- package/lib/const/stores.d.ts +11 -0
- package/lib/es/AceEditor/index.js +70 -70
- package/lib/es/BasicLayout/index.js +6 -6
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +16 -16
- package/lib/es/MenuLayout/index.js +6 -6
- package/lib/es/TemplateFile/index.js +5 -5
- package/lib/es/UploadForm/index.js +5 -5
- package/lib/index.d.ts +2 -1
- package/lib/locales/default.d.ts +137 -115
- package/lib/utils/tools.d.ts +1 -0
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1692 -1547
- package/package.json +1 -1
- package/src/components/content/dialog/index.vue +1 -0
- package/src/components/content/form/formItem.vue +3 -2
- package/src/components/content/search/index.vue +1 -0
- package/src/components/content/search/searchItem.vue +3 -2
- package/src/components/form/aceEditor/index.vue +5 -3
- package/src/components/form/cascader/index.vue +5 -3
- package/src/components/form/checkbox/index.vue +1 -1
- package/src/components/form/datePicker/index.vue +2 -1
- package/src/components/form/input/index.vue +1 -1
- package/src/components/form/input/inputNumber.vue +3 -1
- package/src/components/form/input/inputPassword.vue +3 -1
- package/src/components/form/propEditor/index.vue +8 -3
- package/src/components/form/radio/index.vue +2 -1
- package/src/components/form/radio/radioStatus.vue +2 -1
- package/src/components/form/switch/index.vue +3 -1
- package/src/components/form/textarea/index.vue +1 -1
- package/src/components/form/timePicker/index.vue +4 -1
- package/src/components/form/treeSelect/index.vue +3 -1
- package/src/components/form/upload/imageList.vue +8 -6
- package/src/components/form/upload/uploadList.vue +6 -5
- package/src/components/layout/datetime/index.vue +15 -4
- package/src/components/layout/header/language.vue +2 -0
- package/src/const/options.ts +76 -52
- package/src/const/stores.ts +58 -0
- package/src/index.ts +2 -0
- package/src/locales/default.ts +145 -123
- package/src/locales/en-US.json +320 -0
- package/src/locales/index.ts +109 -39
- package/src/stores/hostInfo.ts +2 -19
- package/src/stores/userInfo.ts +2 -30
- package/src/utils/options.ts +2 -2
- package/src/utils/tools.ts +88 -83
- package/lib/assets/modules/index-BDoBUrYA.js +0 -114
- package/lib/assets/modules/uploadList-CHvr6Hp1.js +0 -472
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, defineAsyncComponent as J, ref as m, watch as K, onMounted as W, createElementBlock as x, openBlock as p, Fragment as z, createElementVNode as f, createVNode as N, toDisplayString as $, unref as l, createBlock as A, withKeys as v, normalizeClass as O, withModifiers as w, withCtx as L, createCommentVNode as q } from "vue";
|
|
2
2
|
import "ant-design-vue";
|
|
3
|
-
import { _ as
|
|
3
|
+
import { _ as D } from "../../assets/modules/toolIcon-D4vAp0qA.js";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
|
-
import "../../assets/modules/upload-template-
|
|
6
|
-
import { _ as D } from "../../assets/modules/index-BDoBUrYA.js";
|
|
7
|
-
import "@skyfox2000/microbase";
|
|
5
|
+
import { $ as b } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
8
6
|
import "vue-m-message";
|
|
7
|
+
import { _ as Q } from "../../assets/modules/index-CekzHbWp.js";
|
|
8
|
+
import "@skyfox2000/microbase";
|
|
9
9
|
import "async-validator";
|
|
10
10
|
import "dayjs";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
|
-
const
|
|
12
|
+
const g = async (s) => window.ace ? window.ace : new Promise((i, t) => {
|
|
13
13
|
const o = document.createElement("script");
|
|
14
14
|
o.src = `${s}ace/ace.js`, o.async = !0, o.onload = () => {
|
|
15
15
|
window.ace.config.set("basePath", `${s}ace/`);
|
|
16
16
|
const n = document.createElement("script");
|
|
17
17
|
n.src = `${s}ace/ext-language_tools.js`, n.async = !0, n.onload = () => {
|
|
18
|
-
|
|
18
|
+
i(window.ace);
|
|
19
19
|
}, n.onerror = () => {
|
|
20
20
|
t(new Error("Failed to load language tools extension"));
|
|
21
21
|
}, document.head.appendChild(n);
|
|
22
22
|
}, o.onerror = () => {
|
|
23
23
|
t(new Error("Failed to load Ace editor"));
|
|
24
24
|
}, document.head.appendChild(o);
|
|
25
|
-
}),
|
|
26
|
-
const t = await
|
|
25
|
+
}), R = async (s, i) => {
|
|
26
|
+
const t = await g(s), o = `${s}ace/mode-${i}.js`, n = `${s}ace/worker-${i}.js`;
|
|
27
27
|
if (!document.querySelector(`script[src="${o}"]`)) {
|
|
28
28
|
const r = document.createElement("script");
|
|
29
29
|
r.src = o, r.async = !0, document.head.appendChild(r), await new Promise((a) => {
|
|
30
30
|
r.onload = a, r.onerror = a;
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
t.config.setModuleUrl(`ace/mode/${
|
|
34
|
-
},
|
|
35
|
-
const t = await
|
|
33
|
+
t.config.setModuleUrl(`ace/mode/${i}`, o), t.config.setModuleUrl(`ace/mode/${i}_worker`, n);
|
|
34
|
+
}, T = async (s, i) => {
|
|
35
|
+
const t = await g(s), o = `${s}ace/theme-${i}.js`;
|
|
36
36
|
if (!document.querySelector(`script[src="${o}"]`)) {
|
|
37
37
|
const n = document.createElement("script");
|
|
38
38
|
n.src = o, n.async = !0, document.head.appendChild(n), await new Promise((r) => {
|
|
39
39
|
n.onload = r, n.onerror = r;
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
t.config.setModuleUrl(`ace/theme/${
|
|
43
|
-
},
|
|
42
|
+
t.config.setModuleUrl(`ace/theme/${i}`, o);
|
|
43
|
+
}, G = { class: "w-full overflow-hidden rounded-md border-1 border-solid border-gray-300" }, H = { class: "w-full h-[30px] bg-[#ccc] relative flex items-center justify-between px-2" }, I = { class: "flex-1 overflow-hidden" }, X = {
|
|
44
44
|
key: 1,
|
|
45
45
|
class: "h-[500px] w-[99.3%] flex justify-center items-center border-1 border-solid border-gray-200"
|
|
46
|
-
},
|
|
46
|
+
}, S = "github", ce = /* @__PURE__ */ V({
|
|
47
47
|
__name: "index",
|
|
48
48
|
props: {
|
|
49
49
|
value: {},
|
|
@@ -51,8 +51,8 @@ const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
|
|
|
51
51
|
lang: {}
|
|
52
52
|
},
|
|
53
53
|
emits: ["update:value"],
|
|
54
|
-
setup(s, { emit:
|
|
55
|
-
const t = s, o = t.baseUrl.endsWith("/") ? t.baseUrl : t.baseUrl + "/", n =
|
|
54
|
+
setup(s, { emit: i }) {
|
|
55
|
+
const t = s, o = t.baseUrl.endsWith("/") ? t.baseUrl : t.baseUrl + "/", n = J(() => g(o).then(() => import("vue3-ace-editor").then((c) => c.VAceEditor))), r = t.lang ?? "json", a = m(""), k = t.value ? "h-[240px]" : "h-[100px]", E = {
|
|
56
56
|
useWorker: !0,
|
|
57
57
|
showPrintMargin: !1,
|
|
58
58
|
highlightActiveLine: !0,
|
|
@@ -61,40 +61,40 @@ const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
|
|
|
61
61
|
fontSize: 10,
|
|
62
62
|
wrap: !0,
|
|
63
63
|
readOnly: !1
|
|
64
|
-
},
|
|
65
|
-
...
|
|
66
|
-
}),
|
|
67
|
-
r === "json" ?
|
|
68
|
-
},
|
|
64
|
+
}, h = m({
|
|
65
|
+
...E
|
|
66
|
+
}), C = i, j = () => {
|
|
67
|
+
r === "json" ? U() && C("update:value", JSON.parse(a.value)) : C("update:value", a.value);
|
|
68
|
+
}, U = () => {
|
|
69
69
|
if (a.value) {
|
|
70
70
|
let e = a.value;
|
|
71
|
-
const
|
|
72
|
-
e = e.replace(
|
|
73
|
-
const
|
|
74
|
-
e = e.replace(
|
|
71
|
+
const d = /(\w+)(?=\s*:)/g;
|
|
72
|
+
e = e.replace(d, '"$1"');
|
|
73
|
+
const F = /'([^']*)'/g;
|
|
74
|
+
e = e.replace(F, '"$1"');
|
|
75
75
|
try {
|
|
76
|
-
const
|
|
77
|
-
return a.value =
|
|
76
|
+
const P = JSON.parse(e), M = JSON.stringify(P, null, 3);
|
|
77
|
+
return a.value = M, !0;
|
|
78
78
|
} catch {
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
return !1;
|
|
82
|
-
},
|
|
82
|
+
}, _ = () => {
|
|
83
83
|
t.value && typeof t.value == "object" ? a.value = JSON.stringify(t.value, null, 3) : a.value = t.value ?? "";
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
K(
|
|
86
86
|
() => t.value,
|
|
87
87
|
(c, e) => {
|
|
88
|
-
c !== e &&
|
|
88
|
+
c !== e && _();
|
|
89
89
|
}
|
|
90
90
|
);
|
|
91
|
-
const
|
|
92
|
-
|
|
91
|
+
const u = m(!1), y = m(!1), B = () => {
|
|
92
|
+
u.value = !u.value;
|
|
93
93
|
};
|
|
94
|
-
return
|
|
94
|
+
return W(async () => {
|
|
95
95
|
try {
|
|
96
|
-
await
|
|
97
|
-
...
|
|
96
|
+
await g(o), await Promise.all([T(o, S), R(o, r)]), y.value = !0, _(), h.value = {
|
|
97
|
+
...E
|
|
98
98
|
// TODO 会提示拼写错误
|
|
99
99
|
// enableBasicAutocompletion: true,
|
|
100
100
|
// enableLiveAutocompletion: true,
|
|
@@ -103,65 +103,65 @@ const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
|
|
|
103
103
|
} catch (c) {
|
|
104
104
|
console.error("Failed to load Ace editor:", c);
|
|
105
105
|
}
|
|
106
|
-
}), (c, e) => (p(), x(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
}), (c, e) => (p(), x(z, null, [
|
|
107
|
+
f("div", G, [
|
|
108
|
+
f("div", H, [
|
|
109
|
+
f("div", null, $(l(r).toUpperCase()), 1),
|
|
110
|
+
N(l(D), {
|
|
111
111
|
icon: "icon-fullscreen",
|
|
112
112
|
clickable: "",
|
|
113
113
|
class: "w-4 h-4 text-[12px]",
|
|
114
|
-
onClick:
|
|
114
|
+
onClick: B
|
|
115
115
|
})
|
|
116
116
|
]),
|
|
117
|
-
|
|
118
|
-
y.value ? (p(),
|
|
117
|
+
f("div", I, [
|
|
118
|
+
y.value ? (p(), A(l(n), {
|
|
119
119
|
key: 0,
|
|
120
|
-
class:
|
|
120
|
+
class: O([l(k)]),
|
|
121
121
|
value: a.value,
|
|
122
|
-
"onUpdate:value": e[0] || (e[0] = (
|
|
123
|
-
lang:
|
|
124
|
-
theme:
|
|
125
|
-
options:
|
|
126
|
-
onBlur:
|
|
127
|
-
onKeyup: e[1] || (e[1] =
|
|
122
|
+
"onUpdate:value": e[0] || (e[0] = (d) => a.value = d),
|
|
123
|
+
lang: l(r),
|
|
124
|
+
theme: S,
|
|
125
|
+
options: h.value,
|
|
126
|
+
onBlur: j,
|
|
127
|
+
onKeyup: e[1] || (e[1] = v(w(() => {
|
|
128
128
|
}, ["stop"]), ["enter", "native"])),
|
|
129
|
-
onKeydown: e[2] || (e[2] =
|
|
129
|
+
onKeydown: e[2] || (e[2] = v(w(() => {
|
|
130
130
|
}, ["stop"]), ["enter", "native"]))
|
|
131
131
|
}, null, 8, ["class", "value", "lang", "options"])) : (p(), x("div", {
|
|
132
132
|
key: 1,
|
|
133
|
-
class:
|
|
134
|
-
}, "
|
|
133
|
+
class: O([l(k), "flex justify-center items-center"])
|
|
134
|
+
}, $(l(b)("webui.components.form.aceEditor.loading")), 3))
|
|
135
135
|
])
|
|
136
136
|
]),
|
|
137
|
-
|
|
138
|
-
title: "
|
|
139
|
-
open:
|
|
140
|
-
"onUpdate:open": e[6] || (e[6] = (
|
|
137
|
+
N(l(Q), {
|
|
138
|
+
title: l(b)("webui.components.form.aceEditor.title"),
|
|
139
|
+
open: u.value,
|
|
140
|
+
"onUpdate:open": e[6] || (e[6] = (d) => u.value = d),
|
|
141
141
|
width: 680,
|
|
142
142
|
footer: null
|
|
143
143
|
}, {
|
|
144
|
-
default:
|
|
145
|
-
|
|
144
|
+
default: L(() => [
|
|
145
|
+
u.value && y.value ? (p(), A(l(n), {
|
|
146
146
|
key: 0,
|
|
147
147
|
class: "h-[500px] w-[99.3%] border-1 border-solid border-gray-200",
|
|
148
148
|
value: a.value,
|
|
149
|
-
"onUpdate:value": e[3] || (e[3] = (
|
|
150
|
-
lang:
|
|
151
|
-
theme:
|
|
152
|
-
options:
|
|
153
|
-
onBlur:
|
|
154
|
-
onKeyup: e[4] || (e[4] =
|
|
149
|
+
"onUpdate:value": e[3] || (e[3] = (d) => a.value = d),
|
|
150
|
+
lang: l(r),
|
|
151
|
+
theme: S,
|
|
152
|
+
options: h.value,
|
|
153
|
+
onBlur: j,
|
|
154
|
+
onKeyup: e[4] || (e[4] = v(w(() => {
|
|
155
155
|
}, ["stop"]), ["enter", "native"])),
|
|
156
|
-
onKeydown: e[5] || (e[5] =
|
|
156
|
+
onKeydown: e[5] || (e[5] = v(w(() => {
|
|
157
157
|
}, ["stop"]), ["enter", "native"]))
|
|
158
|
-
}, null, 8, ["value", "lang", "options"])) :
|
|
158
|
+
}, null, 8, ["value", "lang", "options"])) : u.value ? (p(), x("div", X, $(l(b)("webui.components.form.aceEditor.loading")), 1)) : q("", !0)
|
|
159
159
|
]),
|
|
160
160
|
_: 1
|
|
161
|
-
}, 8, ["open"])
|
|
161
|
+
}, 8, ["title", "open"])
|
|
162
162
|
], 64));
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
export {
|
|
166
|
-
|
|
166
|
+
ce as default
|
|
167
167
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as f, ref as d, watch as _, onMounted as v, resolveComponent as h, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as w, KeepAlive as y, unref as n, resolveDynamicComponent as I } from "vue";
|
|
2
|
-
import { _ as g } from "../../assets/modules/baseLayout-
|
|
3
|
-
import {
|
|
2
|
+
import { _ as g } from "../../assets/modules/baseLayout-BuQjrozB.js";
|
|
3
|
+
import { ak as k, a as A } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
4
4
|
import "@skyfox2000/microbase";
|
|
5
5
|
import "@skyfox2000/fapi";
|
|
6
|
-
import
|
|
6
|
+
import S from "vue-m-message";
|
|
7
7
|
import "async-validator";
|
|
8
8
|
import "dayjs";
|
|
9
9
|
import "ant-design-vue";
|
|
@@ -14,15 +14,15 @@ const j = /* @__PURE__ */ f({
|
|
|
14
14
|
routes: {}
|
|
15
15
|
},
|
|
16
16
|
setup(a) {
|
|
17
|
-
const l = a, e =
|
|
17
|
+
const l = a, e = k(), p = A(), r = d("h-[calc(100vh-80px)]");
|
|
18
18
|
return _(
|
|
19
19
|
() => p.fullscreen,
|
|
20
20
|
(c) => {
|
|
21
21
|
r.value = c ? "h-[calc(100vh-40px)]" : "h-[calc(100vh-80px)]";
|
|
22
22
|
}
|
|
23
23
|
), v(() => {
|
|
24
|
-
|
|
25
|
-
}), (c,
|
|
24
|
+
S.closeAll();
|
|
25
|
+
}), (c, b) => {
|
|
26
26
|
const m = h("router-view");
|
|
27
27
|
return t(), o(g, {
|
|
28
28
|
routes: l.routes
|
package/lib/es/Error403/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, createBlock as n, openBlock as p, unref as r, withCtx as e, createVNode as m, createTextVNode as c, toDisplayString as a } from "vue";
|
|
2
|
-
import { r as s } from "../../assets/modules/upload-template-
|
|
2
|
+
import { r as s } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
3
3
|
import "@skyfox2000/microbase";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
5
|
import "vue-m-message";
|
package/lib/es/Error404/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, createBlock as n, openBlock as p, unref as e, withCtx as r, createVNode as m, createTextVNode as a, toDisplayString as c } from "vue";
|
|
2
|
-
import { r as u } from "../../assets/modules/upload-template-
|
|
2
|
+
import { r as u } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
3
3
|
import "@skyfox2000/microbase";
|
|
4
4
|
import "@skyfox2000/fapi";
|
|
5
5
|
import "vue-m-message";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as he, ref as p, computed as R, watch as W, onMounted as Fe, createBlock as J, openBlock as f, unref as r, withCtx as S, renderSlot as X, createElementBlock as g, createCommentVNode as P, createElementVNode as b, createVNode as U, createTextVNode as Y, toDisplayString as _, normalizeClass as Ce, Fragment as ne, renderList as ce } from "vue";
|
|
2
|
-
import { _ as Z } from "../../assets/modules/index-
|
|
2
|
+
import { _ as Z } from "../../assets/modules/index-CW_ZCHWs.js";
|
|
3
3
|
import { Modal as Ue, Upload as ue, Space as _e } from "ant-design-vue";
|
|
4
4
|
import { httpGet as Te, ResStatus as pe } from "@skyfox2000/fapi";
|
|
5
|
-
import { $ as o,
|
|
6
|
-
import { c as De, _ as ee, h as ke, p as Le, i as Ne } from "../../assets/modules/index-M1qERbea.js";
|
|
7
|
-
import { A as Ke, p as Pe, U as de } from "../../assets/modules/file-upload-DTOdV5vM.js";
|
|
8
|
-
import "@skyfox2000/microbase";
|
|
5
|
+
import { $ as o, H as Ee, a8 as Re, ae as Se } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
9
6
|
import m from "vue-m-message";
|
|
7
|
+
import { c as De, _ as ee, h as ke, p as Le, i as Ne } from "../../assets/modules/index-BlQB5KSU.js";
|
|
8
|
+
import { A as Ke, p as Pe, U as de } from "../../assets/modules/file-upload-DcusqXDb.js";
|
|
9
|
+
import "@skyfox2000/microbase";
|
|
10
10
|
import "dayjs";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
12
|
import "async-validator";
|
|
@@ -96,10 +96,10 @@ const Me = (a) => a.includes(",") || a.includes(`
|
|
|
96
96
|
}, Ge = { class: "bg-gray-50 p-2 rounded border flex-grow flex flex-col" }, Ie = {
|
|
97
97
|
key: 0,
|
|
98
98
|
class: "text-gray-500"
|
|
99
|
-
},
|
|
99
|
+
}, He = {
|
|
100
100
|
key: 1,
|
|
101
101
|
class: "flex flex-col"
|
|
102
|
-
},
|
|
102
|
+
}, Qe = { class: "overflow-y-auto" }, We = { class: "text-[13px] text-gray-600" }, Je = { class: "pl-5 mt-1 mb-0" }, Xe = {
|
|
103
103
|
key: 0,
|
|
104
104
|
class: "mt-3"
|
|
105
105
|
}, Ye = { class: "text-[12px] text-gray-600 p-1" }, Ze = { class: "text-[13px] text-gray-600" }, el = { class: "pl-5 mt-1 mb-0" }, ll = { class: "text-[12px] text-gray-600" }, wl = /* @__PURE__ */ he({
|
|
@@ -198,7 +198,7 @@ const Me = (a) => a.includes(",") || a.includes(`
|
|
|
198
198
|
m.warning(o("webui.components.content.excelForm.pleaseSelectFileFirst")), l.isFormSaving.value = !1;
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
|
-
const s = new Ke(t, 1), u =
|
|
201
|
+
const s = new Ke(t, 1), u = H.value || "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", c = new File([N.value], x.value, {
|
|
202
202
|
type: u
|
|
203
203
|
}), d = Pe.join(((n = T.value) == null ? void 0 : n.basePath) ?? "", x.value), v = {
|
|
204
204
|
uid: "1",
|
|
@@ -224,10 +224,10 @@ const Me = (a) => a.includes(",") || a.includes(`
|
|
|
224
224
|
const c = await Le(N.value);
|
|
225
225
|
if (!c) return null;
|
|
226
226
|
const { excelData: d, excelRows: v } = c, y = d.map((K) => {
|
|
227
|
-
var
|
|
227
|
+
var Q;
|
|
228
228
|
const h = {};
|
|
229
229
|
for (const q in K) {
|
|
230
|
-
const G = (
|
|
230
|
+
const G = (Q = e.excelFieldMap) == null ? void 0 : Q[q];
|
|
231
231
|
G && (h[G] = K[q]);
|
|
232
232
|
}
|
|
233
233
|
return h;
|
|
@@ -260,7 +260,7 @@ const Me = (a) => a.includes(",") || a.includes(`
|
|
|
260
260
|
l.isFormSaving.value = !1;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
}, E = p(!1), L = p(!1), N = p(null),
|
|
263
|
+
}, E = p(!1), L = p(!1), N = p(null), H = p(""), se = async (t) => {
|
|
264
264
|
const n = e.gridCtrl;
|
|
265
265
|
if (n) {
|
|
266
266
|
T.value = e.uploadParams;
|
|
@@ -306,8 +306,8 @@ const Me = (a) => a.includes(",") || a.includes(`
|
|
|
306
306
|
if (!d)
|
|
307
307
|
return m.error(v), ue.LIST_IGNORE;
|
|
308
308
|
try {
|
|
309
|
-
if (O(), x.value = t.name,
|
|
310
|
-
const h = await t.arrayBuffer(), q = new TextDecoder("utf-8").decode(h), { csvToExcelView: G } = await import("../../assets/modules/index-
|
|
309
|
+
if (O(), x.value = t.name, H.value = u ? "text/csv" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", u) {
|
|
310
|
+
const h = await t.arrayBuffer(), q = new TextDecoder("utf-8").decode(h), { csvToExcelView: G } = await import("../../assets/modules/index-BlQB5KSU.js").then((be) => be.j), A = await G(q, t.name);
|
|
311
311
|
if (!A.success)
|
|
312
312
|
throw new Error(A.error || o("webui.components.content.excelForm.csvProcessingFailed"));
|
|
313
313
|
const ie = await (await fetch(A.blobUrl)).arrayBuffer();
|
|
@@ -339,7 +339,7 @@ const Me = (a) => a.includes(",") || a.includes(`
|
|
|
339
339
|
w.value = l.visible.value, w.value && e.previewUrl && I();
|
|
340
340
|
});
|
|
341
341
|
const O = () => {
|
|
342
|
-
if (F.value = "", x.value = "", te.value = [], N.value = null,
|
|
342
|
+
if (F.value = "", x.value = "", te.value = [], N.value = null, H.value = "", l.isFormLoading.value = !1, B.value = o("webui.components.content.dialog.validationRules"), M.value = "warning", z.value = o("webui.components.content.dialog.duplicateData"), V.value = "warning", E.value = !1, L.value = !1, l.formData.value) {
|
|
343
343
|
const t = e.fileField ?? "FileInfo", n = e.excelRecordsKey, s = e.excelRowsKey;
|
|
344
344
|
delete l.formData.value[t], n && delete l.formData.value[n], s && delete l.formData.value[s];
|
|
345
345
|
}
|
|
@@ -443,14 +443,14 @@ const Me = (a) => a.includes(",") || a.includes(`
|
|
|
443
443
|
], 2),
|
|
444
444
|
r(j).length > 0 ? (f(), g("div", qe, [
|
|
445
445
|
b("div", Ge, [
|
|
446
|
-
r(j).length === 0 ? (f(), g("div", Ie, _(r(o)("webui.components.content.dialog.noValidationRules")), 1)) : (f(), g("div",
|
|
446
|
+
r(j).length === 0 ? (f(), g("div", Ie, _(r(o)("webui.components.content.dialog.noValidationRules")), 1)) : (f(), g("div", He, [
|
|
447
447
|
U(r(ee), {
|
|
448
448
|
message: B.value,
|
|
449
449
|
type: M.value,
|
|
450
450
|
"show-icon": "",
|
|
451
451
|
class: "mb-2"
|
|
452
452
|
}, null, 8, ["message", "type"]),
|
|
453
|
-
b("div",
|
|
453
|
+
b("div", Qe, [
|
|
454
454
|
(f(!0), g(ne, null, ce(r(j), (s, u) => (f(), g("div", {
|
|
455
455
|
key: u,
|
|
456
456
|
class: "border-b pb-0"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as f, ref as d, watch as _, onMounted as v, resolveComponent as h, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as w, KeepAlive as I, unref as n, resolveDynamicComponent as g } from "vue";
|
|
2
|
-
import { _ as
|
|
3
|
-
import {
|
|
2
|
+
import { _ as k } from "../../assets/modules/baseLayout-BuQjrozB.js";
|
|
3
|
+
import { ak as y, a as A } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
4
4
|
import "@skyfox2000/microbase";
|
|
5
5
|
import "@skyfox2000/fapi";
|
|
6
|
-
import
|
|
6
|
+
import S from "vue-m-message";
|
|
7
7
|
import "async-validator";
|
|
8
8
|
import "dayjs";
|
|
9
9
|
import "ant-design-vue";
|
|
@@ -14,17 +14,17 @@ const j = /* @__PURE__ */ f({
|
|
|
14
14
|
routes: {}
|
|
15
15
|
},
|
|
16
16
|
setup(a) {
|
|
17
|
-
const p = a, e =
|
|
17
|
+
const p = a, e = y(), l = A(), r = d("h-[calc(100vh-81px)]");
|
|
18
18
|
return _(
|
|
19
19
|
() => l.fullscreen,
|
|
20
20
|
(c) => {
|
|
21
21
|
r.value = c ? "h-[calc(100vh-40px)]" : "h-[calc(100vh-81px)]";
|
|
22
22
|
}
|
|
23
23
|
), v(() => {
|
|
24
|
-
|
|
24
|
+
S.closeAll();
|
|
25
25
|
}), (c, B) => {
|
|
26
26
|
const m = h("router-view");
|
|
27
|
-
return t(), o(
|
|
27
|
+
return t(), o(k, {
|
|
28
28
|
routes: p.routes
|
|
29
29
|
}, {
|
|
30
30
|
default: s(() => [
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as T, ref as l, watch as x, onMounted as F, createBlock as C, openBlock as q, unref as u, withCtx as d, createVNode as f, createTextVNode as L, toDisplayString as b } from "vue";
|
|
2
|
-
import { _ as g } from "../../assets/modules/index-
|
|
2
|
+
import { _ as g } from "../../assets/modules/index-CW_ZCHWs.js";
|
|
3
3
|
import { Modal as D, Space as z } from "ant-design-vue";
|
|
4
4
|
import { httpPost as N, ResStatus as O } from "@skyfox2000/fapi";
|
|
5
|
-
import {
|
|
6
|
-
import { U as M } from "../../assets/modules/file-upload-DTOdV5vM.js";
|
|
7
|
-
import "@skyfox2000/microbase";
|
|
5
|
+
import { an as n, $ as w } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
8
6
|
import "vue-m-message";
|
|
7
|
+
import { U as M } from "../../assets/modules/file-upload-DcusqXDb.js";
|
|
8
|
+
import "@skyfox2000/microbase";
|
|
9
9
|
import "async-validator";
|
|
10
10
|
import "dayjs";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
|
-
import { U as $ } from "../../assets/modules/uploadList-
|
|
12
|
+
import { U as $ } from "../../assets/modules/uploadList-ENSsTfpD.js";
|
|
13
13
|
const H = /* @__PURE__ */ T({
|
|
14
14
|
__name: "templateFile",
|
|
15
15
|
props: {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as F, ref as s, watch as y, onMounted as z, createBlock as D, openBlock as _, unref as u, withCtx as p, createVNode as m, mergeProps as L, createTextVNode as w, toDisplayString as C } from "vue";
|
|
2
|
-
import { _ as g } from "../../assets/modules/index-
|
|
2
|
+
import { _ as g } from "../../assets/modules/index-CW_ZCHWs.js";
|
|
3
3
|
import { Modal as k, Space as N } from "ant-design-vue";
|
|
4
4
|
import { ResStatus as T } from "@skyfox2000/fapi";
|
|
5
|
-
import { $ as v,
|
|
6
|
-
import "@skyfox2000/microbase";
|
|
5
|
+
import { $ as v, aa as $ } from "../../assets/modules/upload-template-NU0Bpg4N.js";
|
|
7
6
|
import A from "vue-m-message";
|
|
7
|
+
import "@skyfox2000/microbase";
|
|
8
8
|
import "async-validator";
|
|
9
9
|
import "dayjs";
|
|
10
|
-
import { A as E } from "../../assets/modules/file-upload-
|
|
10
|
+
import { A as E } from "../../assets/modules/file-upload-DcusqXDb.js";
|
|
11
11
|
import "vue-draggable-next";
|
|
12
|
-
import { U as B } from "../../assets/modules/uploadList-
|
|
12
|
+
import { U as B } from "../../assets/modules/uploadList-ENSsTfpD.js";
|
|
13
13
|
const W = /* @__PURE__ */ F({
|
|
14
14
|
__name: "uploadForm",
|
|
15
15
|
props: {
|
package/lib/index.d.ts
CHANGED
|
@@ -14,11 +14,12 @@ export type { ApiUrls, ReqUrls, } from './typings/urls.d';
|
|
|
14
14
|
export type { OptionItemProps, OptionProps, SelectValue, } from './typings/option.d';
|
|
15
15
|
export type { BreadcrumbRoute, } from './typings/menu.d';
|
|
16
16
|
export { OPTIONS } from './const/options';
|
|
17
|
+
export { initStores } from './const/stores';
|
|
17
18
|
export { OptionCommProps } from './typings/option.d';
|
|
18
19
|
export { initDirective } from './directives/index';
|
|
19
20
|
export { isEmpty } from './utils/isEmpty';
|
|
20
21
|
export { queryTree } from './utils/tree';
|
|
21
|
-
export { getToolByKey, getToolGroup, getToolStatus, getToolVisible, onReloadClick, onToolClicked, onFullscreenClick, onColumnVisibleChanged, defaultTools, useToolFactory, } from './utils/tools';
|
|
22
|
+
export { getToolByKey, getToolGroup, getToolStatus, getToolVisible, onReloadClick, onToolClicked, onFullscreenClick, onColumnVisibleChanged, defaultTools, useToolFactory, initTools, } from './utils/tools';
|
|
22
23
|
export { initPageFactory, useEditorFactory, useGridFactory, useTreeFactory, usePageFactory, useOptionFactory, } from './utils/page';
|
|
23
24
|
export { loadOption, unloadOption, getSelectedValues, outFormDataFields, onOptionChanged, getSelectedLabels, } from './utils/options';
|
|
24
25
|
export { downloadBlob, donwloadFromMinio, previewFromMinio, CanPreviewFileExt } from './utils/download';
|