epic-designer-gold 1.0.5 → 1.0.6
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/{attributeView-B2dWB_U2.cjs → attributeView-CEFjPemt.cjs} +1 -1
- package/dist/{attributeView-Cu_tjo9A.js → attributeView-C_rnFDGo.js} +3 -3
- package/dist/{axios-B8aFvCWj.cjs → axios-B5oA4AjJ.cjs} +1 -1
- package/dist/{axios-Bb3STC1u.js → axios-awtfJhsA.js} +1 -1
- package/dist/index-AH-Lj15r.js +107 -0
- package/dist/{index-VblxMq6V.js → index-B0rUZfG_.js} +2 -2
- package/dist/{index-CMbBKMQU.js → index-BEMPXyNN.js} +2 -2
- package/dist/{index-BhcwWM1G.cjs → index-BOUKAGKU.cjs} +1 -1
- package/dist/index-B_BKVTct.cjs +1 -0
- package/dist/{index-Bn8pwpgq.cjs → index-Ba8KVYrQ.cjs} +1 -1
- package/dist/{index-D0kQz_zt.js → index-BfdYrl-Q.js} +1 -1
- package/dist/{index-21c4Pe3i.cjs → index-BnLI5N3M.cjs} +1 -1
- package/dist/index-BpROfyMH.cjs +1 -0
- package/dist/index-BxCrqMkz.cjs +1 -0
- package/dist/{index-DeZ09CHf.cjs → index-CBBK4Aze.cjs} +1 -1
- package/dist/index-CDTcUcwY.cjs +1 -0
- package/dist/{index-CgwN4ucQ.js → index-CFZioB1O.js} +2 -2
- package/dist/{index-BLJT8e0Q.js → index-Ce470l1n.js} +4 -4
- package/dist/{index-CHCOxt3B.js → index-CeVV_SOj.js} +3 -3
- package/dist/{index-DxNdcsD-.js → index-CoCyrWM2.js} +124 -120
- package/dist/{index-CYAKMqdR.cjs → index-Cq5wbnmA.cjs} +1 -1
- package/dist/index-D8olMR4m.cjs +10 -0
- package/dist/index-DENcRmIy.js +47 -0
- package/dist/{index-CqeRfqUw.cjs → index-DK4PrvRF.cjs} +1 -1
- package/dist/{index-Dg7MK40D.js → index-DWxy0GSJ.js} +6 -2
- package/dist/{index-DeFAvWuV.cjs → index-DaJuXp0q.cjs} +1 -1
- package/dist/index-DfRZtELz.js +4 -0
- package/dist/{index-Bybwt7-u.js → index-DpF9E6J8.js} +1 -1
- package/dist/{index-DUMEtCCN.cjs → index-J9twEwWw.cjs} +1 -1
- package/dist/{index-CjIIhZdV.js → index-P13z5c0g.js} +3 -3
- package/dist/{index-CEDIwmNK.js → index-cElDeAm2.js} +2 -2
- package/dist/{index-BULuVnVl.js → index-oMkqg9Zb.js} +194 -186
- package/dist/{index-BV9SE7wG.cjs → index-tR-Y01R8.cjs} +1 -1
- package/dist/{index-Bxi3JLms.cjs → index-vzxiD3pz.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/locale/lang/en-US.d.ts +2 -0
- package/dist/locale/lang/zh-cn.d.ts +2 -0
- package/dist/{outline-DxCKINRN.js → outline-DQ8wgGyH.js} +2 -2
- package/dist/{outline-CK-jNomF.cjs → outline-JJ0IbSzs.cjs} +1 -1
- package/dist/sign-BBoshwS_.cjs +1 -0
- package/dist/{sign-B-FCN_7O.js → sign-Dfqcv4Fg.js} +52 -48
- package/dist/style.css +1 -1
- package/dist/{styleView-CRUqDcCl.cjs → styleView-CZEOSq2l.cjs} +1 -1
- package/dist/{styleView-ClMjCfMk.js → styleView-CajgzMOm.js} +3 -3
- package/dist/tree.vue_vue_type_script_setup_true_lang-B-8wkdQS.js +243 -0
- package/dist/tree.vue_vue_type_script_setup_true_lang-BS6Anq-8.cjs +1 -0
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +4 -4
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +1 -1
- package/dist/{uploadFile-oB2-NP-v.cjs → uploadFile-BHn9oVA8.cjs} +1 -1
- package/dist/{uploadFile-Bc5Rxk0b.js → uploadFile-D_0_6ghp.js} +1 -1
- package/dist/{uploadImage-CGXm3zNQ.js → uploadImage-4U4YGGfK.js} +1 -1
- package/dist/{uploadImage-CF7fobUP.cjs → uploadImage-B3tV49Mm.cjs} +1 -1
- package/dist/{uploadImage-4tgp3t7X.cjs → uploadImage-C-OyUMFn.cjs} +1 -1
- package/dist/{uploadImage-COCC3pxH.js → uploadImage-Z6Y6KN1R.js} +1 -1
- package/package.json +1 -1
- package/dist/index-B553TaXm.js +0 -44
- package/dist/index-CEvDmc0a.js +0 -104
- package/dist/index-CI3dhGXT.cjs +0 -1
- package/dist/index-Cq6eLpKZ.cjs +0 -1
- package/dist/index-CrV5FaWU.cjs +0 -10
- package/dist/index-DR80h8IU.js +0 -4
- package/dist/index-DddTXMY9.cjs +0 -1
- package/dist/index-DzxQG0o7.cjs +0 -1
- package/dist/sign-Dho4kHTC.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js +0 -242
- package/dist/tree.vue_vue_type_script_setup_true_lang-DDDqMedP.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { p as f, E as q, e as
|
|
1
|
+
import { defineComponent as oe, ref as O, reactive as de, onMounted as re, openBlock as m, createElementBlock as p, createVNode as t, unref as a, withCtx as s, createElementVNode as n, toDisplayString as v, Fragment as D, renderList as J, normalizeClass as ue, normalizeStyle as se, createTextVNode as V, createCommentVNode as F } from "vue";
|
|
2
|
+
import { p as f, E as q, e as ne } from "./axios-awtfJhsA.js";
|
|
3
3
|
import { ElMessage as L } from "element-plus";
|
|
4
4
|
import { _ } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { u as
|
|
5
|
+
import { u as ie, a as R } from "./index-DWxy0GSJ.js";
|
|
6
6
|
const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { class: "drawer-content" }, ve = { class: "drawer-content-left" }, fe = ["onClick"], he = { class: "source-item-title" }, ye = ["onClick"], be = { class: "drawer-content-right" }, ge = { class: "content" }, Ve = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "content-empty"
|
|
@@ -18,48 +18,48 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
18
18
|
}, Oe = { class: "form-item" }, Ue = { class: "form-item-title" }, De = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "form-item-content"
|
|
21
|
-
}, Je = { class: "content-right-btn" }, Be = /* @__PURE__ */
|
|
21
|
+
}, Je = { class: "content-right-btn" }, Be = /* @__PURE__ */ oe({
|
|
22
22
|
__name: "index",
|
|
23
23
|
emits: ["update:modelValue", "update:sourceData"],
|
|
24
24
|
setup(qe, { emit: Pe }) {
|
|
25
|
-
const { t:
|
|
25
|
+
const { t: d } = ie(), y = f.getComponent("button"), x = f.getComponent("Drawer"), h = f.getComponent("input"), N = f.getComponent("FormItem"), B = f.getComponent("Form"), A = f.getComponent("RadioGroup"), U = f.getComponent("RadioButton");
|
|
26
26
|
f.getComponent("select"), f.getComponent("switch");
|
|
27
|
-
const P = O(),
|
|
27
|
+
const P = O(), M = {
|
|
28
28
|
GET: "#67c23a",
|
|
29
29
|
POST: "#e6a23c",
|
|
30
30
|
PUT: "#409eff",
|
|
31
31
|
DELETE: "#f56c6c"
|
|
32
|
-
},
|
|
33
|
-
apiName: [{ required: !0, message:
|
|
34
|
-
url: [{ required: !0, message:
|
|
35
|
-
dataKey: [{ required: !0, message:
|
|
36
|
-
dataValue: [{ required: !0, message:
|
|
32
|
+
}, $ = O(0), j = de({
|
|
33
|
+
apiName: [{ required: !0, message: d("pleaseEnterApiName"), trigger: "blur" }],
|
|
34
|
+
url: [{ required: !0, message: d("pleaseEnterRequestUrl"), trigger: "blur" }],
|
|
35
|
+
dataKey: [{ required: !0, message: d("pleaseEnterLabelKey"), trigger: "blur" }],
|
|
36
|
+
dataValue: [{ required: !0, message: d("pleaseEnterValueKey"), trigger: "blur" }]
|
|
37
37
|
}), T = O(!1), b = O([]), e = O(), C = [
|
|
38
38
|
{
|
|
39
39
|
label: "1",
|
|
40
40
|
value: "1"
|
|
41
41
|
}
|
|
42
42
|
];
|
|
43
|
-
function
|
|
43
|
+
function z() {
|
|
44
44
|
T.value = !0;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function I() {
|
|
47
47
|
const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
48
48
|
return o.charAt(Math.floor(Math.random() * o.length));
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function G(o) {
|
|
51
51
|
let l = "";
|
|
52
|
-
for (let
|
|
53
|
-
l +=
|
|
52
|
+
for (let r = 0; r < o; r++)
|
|
53
|
+
l += I();
|
|
54
54
|
return l;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function H() {
|
|
57
57
|
!e.value || e.value.id || !Object.keys(e.value).length ? (e.value = {
|
|
58
58
|
id: "",
|
|
59
59
|
url: "",
|
|
60
60
|
body: {},
|
|
61
61
|
bodyList: [],
|
|
62
|
-
apiName: `${
|
|
62
|
+
apiName: `${d("dataSource")}_${G(5)}`,
|
|
63
63
|
method: "get",
|
|
64
64
|
params: {},
|
|
65
65
|
paramsList: [],
|
|
@@ -70,17 +70,17 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
70
70
|
dataValue: "id"
|
|
71
71
|
}, b.value.push(e.value)) : e.value.id || K();
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Z(o) {
|
|
74
74
|
var l;
|
|
75
|
-
!e.value || e.value.id || !Object.keys(e.value).length ? (b.value = JSON.parse(JSON.stringify(f.getSourceData())), ((l = e.value) == null ? void 0 : l.id) === o ? e.value = {} : (e.value = b.value.find((
|
|
76
|
-
label:
|
|
77
|
-
value: JSON.parse(e.value.params)[
|
|
78
|
-
})), e.value.bodyList = Object.keys(JSON.parse(e.value.body)).map((
|
|
79
|
-
label:
|
|
80
|
-
value: JSON.parse(e.value.body)[
|
|
81
|
-
})), e.value.headerList = Object.keys(JSON.parse(e.value.headers)).map((
|
|
82
|
-
label:
|
|
83
|
-
value: JSON.parse(e.value.headers)[
|
|
75
|
+
!e.value || e.value.id || !Object.keys(e.value).length ? (b.value = JSON.parse(JSON.stringify(f.getSourceData())), ((l = e.value) == null ? void 0 : l.id) === o ? e.value = {} : (e.value = b.value.find((r) => r.id === o), e.value.paramsList = Object.keys(JSON.parse(e.value.params)).map((r) => ({
|
|
76
|
+
label: r,
|
|
77
|
+
value: JSON.parse(e.value.params)[r]
|
|
78
|
+
})), e.value.bodyList = Object.keys(JSON.parse(e.value.body)).map((r) => ({
|
|
79
|
+
label: r,
|
|
80
|
+
value: JSON.parse(e.value.body)[r]
|
|
81
|
+
})), e.value.headerList = Object.keys(JSON.parse(e.value.headers)).map((r) => ({
|
|
82
|
+
label: r,
|
|
83
|
+
value: JSON.parse(e.value.headers)[r]
|
|
84
84
|
})))) : K();
|
|
85
85
|
}
|
|
86
86
|
function Q(o) {
|
|
@@ -103,25 +103,25 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
103
103
|
value: ""
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function ee(o) {
|
|
107
107
|
e.value.headerList.splice(o, 1);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function ae() {
|
|
110
110
|
var o;
|
|
111
111
|
(o = e.value) == null || o.bodyList.push({
|
|
112
112
|
label: "",
|
|
113
113
|
value: ""
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function le(o) {
|
|
117
117
|
e.value.bodyList.splice(o, 1);
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
re(() => {
|
|
120
120
|
b.value = JSON.parse(JSON.stringify(f.getSourceData()));
|
|
121
121
|
}), q.on("updateSource", (o) => {
|
|
122
122
|
b.value = JSON.parse(JSON.stringify(f.getSourceData()));
|
|
123
123
|
});
|
|
124
|
-
async function
|
|
124
|
+
async function te() {
|
|
125
125
|
P.value.validate(async (o) => {
|
|
126
126
|
if (o)
|
|
127
127
|
try {
|
|
@@ -129,47 +129,51 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
129
129
|
e.value.paramsList.forEach((i) => {
|
|
130
130
|
l[i.label] = i.value;
|
|
131
131
|
});
|
|
132
|
-
const
|
|
132
|
+
const r = {};
|
|
133
133
|
e.value.bodyList.forEach((i) => {
|
|
134
|
-
|
|
134
|
+
r[i.label] = i.value;
|
|
135
135
|
});
|
|
136
136
|
const S = {};
|
|
137
137
|
e.value.headerList.forEach((i) => {
|
|
138
138
|
S[i.label] = i.value;
|
|
139
139
|
});
|
|
140
|
-
let g = await
|
|
140
|
+
let g = await ne({
|
|
141
141
|
method: e.value.method,
|
|
142
142
|
// url: formData.value.url,
|
|
143
143
|
// url: "http://localhost:3333/users",
|
|
144
144
|
url: e.value.url,
|
|
145
145
|
params: l,
|
|
146
|
-
data:
|
|
146
|
+
data: r,
|
|
147
147
|
headers: {
|
|
148
148
|
...S,
|
|
149
|
-
Authorization: "Bearer " +
|
|
149
|
+
Authorization: "Bearer " + R.get("Admin-Token"),
|
|
150
|
+
lang: R.get("saas-locale") || "zh-CN",
|
|
151
|
+
//语言
|
|
152
|
+
zone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
153
|
+
//时区
|
|
150
154
|
}
|
|
151
155
|
});
|
|
152
156
|
if (e.value.dataPath) {
|
|
153
|
-
const E = e.value.dataPath.split(".").reduce((k,
|
|
157
|
+
const E = e.value.dataPath.split(".").reduce((k, u) => k[u], g.data);
|
|
154
158
|
E && E.length ? L({
|
|
155
159
|
message: E.map((k) => ({
|
|
156
160
|
label: k[e.value.dataKey],
|
|
157
161
|
value: k[e.value.dataValue]
|
|
158
162
|
}))
|
|
159
|
-
}) : L.info(
|
|
163
|
+
}) : L.info(d("configError"));
|
|
160
164
|
} else
|
|
161
165
|
g.data && g.data.length ? L({
|
|
162
166
|
message: g.data.map((i) => ({
|
|
163
167
|
label: i[e.value.dataKey],
|
|
164
168
|
value: i[e.value.dataValue]
|
|
165
169
|
}))
|
|
166
|
-
}) : L.info(
|
|
170
|
+
}) : L.info(d("configError"));
|
|
167
171
|
} catch {
|
|
168
|
-
L.error(
|
|
172
|
+
L.error(d("requestFailed"));
|
|
169
173
|
} finally {
|
|
170
174
|
}
|
|
171
175
|
else
|
|
172
|
-
L.error(
|
|
176
|
+
L.error(d("fillRequiredFields"));
|
|
173
177
|
});
|
|
174
178
|
}
|
|
175
179
|
async function K() {
|
|
@@ -190,30 +194,30 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
190
194
|
body: JSON.stringify(e.value.body),
|
|
191
195
|
params: JSON.stringify(e.value.params),
|
|
192
196
|
headers: JSON.stringify(e.value.headers)
|
|
193
|
-
}), e.value = {}) : L.warning(
|
|
197
|
+
}), e.value = {}) : L.warning(d("completeFormFirst"));
|
|
194
198
|
});
|
|
195
199
|
}
|
|
196
200
|
return (o, l) => (m(), p("div", ce, [
|
|
197
201
|
t(a(y), {
|
|
198
202
|
class: "btn",
|
|
199
|
-
onClick:
|
|
203
|
+
onClick: z
|
|
200
204
|
}, {
|
|
201
205
|
default: s(() => [
|
|
202
206
|
t(a(_), {
|
|
203
207
|
name: "icon--epic--window-outline",
|
|
204
208
|
class: "mr-4px"
|
|
205
209
|
}),
|
|
206
|
-
n("span", null, v(a(
|
|
207
|
-
n("span", me, v(
|
|
210
|
+
n("span", null, v(a(d)("configuration")), 1),
|
|
211
|
+
n("span", me, v($.value || b.value.length), 1)
|
|
208
212
|
]),
|
|
209
213
|
_: 1
|
|
210
214
|
}),
|
|
211
215
|
t(a(x), {
|
|
212
216
|
size: 960,
|
|
213
217
|
modelValue: T.value,
|
|
214
|
-
"onUpdate:modelValue": l[7] || (l[7] = (
|
|
218
|
+
"onUpdate:modelValue": l[7] || (l[7] = (r) => T.value = r),
|
|
215
219
|
"append-to-body": "",
|
|
216
|
-
title: a(
|
|
220
|
+
title: a(d)("dataSources")
|
|
217
221
|
}, {
|
|
218
222
|
default: s(() => [
|
|
219
223
|
n("div", pe, [
|
|
@@ -221,35 +225,35 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
221
225
|
t(a(y), {
|
|
222
226
|
type: "primary",
|
|
223
227
|
class: "btn",
|
|
224
|
-
onClick:
|
|
228
|
+
onClick: H
|
|
225
229
|
}, {
|
|
226
230
|
default: s(() => [
|
|
227
231
|
t(a(_), {
|
|
228
232
|
name: "icon--epic--add-rounded",
|
|
229
233
|
class: "mr-4px"
|
|
230
234
|
}),
|
|
231
|
-
n("span", null, v(a(
|
|
235
|
+
n("span", null, v(a(d)("addDataSource")), 1)
|
|
232
236
|
]),
|
|
233
237
|
_: 1
|
|
234
238
|
}),
|
|
235
239
|
n("div", null, [
|
|
236
|
-
(m(!0), p(D, null, J(b.value, (
|
|
240
|
+
(m(!0), p(D, null, J(b.value, (r) => {
|
|
237
241
|
var S;
|
|
238
242
|
return m(), p("div", {
|
|
239
|
-
class:
|
|
240
|
-
key:
|
|
241
|
-
onClick: (g) =>
|
|
243
|
+
class: ue(["source-item", { active: r.id === ((S = e.value) == null ? void 0 : S.id) }]),
|
|
244
|
+
key: r.id,
|
|
245
|
+
onClick: (g) => Z(r.id)
|
|
242
246
|
}, [
|
|
243
247
|
n("div", he, [
|
|
244
248
|
n("div", {
|
|
245
|
-
style:
|
|
246
|
-
color:
|
|
249
|
+
style: se({
|
|
250
|
+
color: M[r.method.toLocaleUpperCase()]
|
|
247
251
|
})
|
|
248
|
-
}, v(
|
|
249
|
-
n("div", null, v(
|
|
252
|
+
}, v(r.method.toLocaleUpperCase()), 5),
|
|
253
|
+
n("div", null, v(r.apiName), 1)
|
|
250
254
|
]),
|
|
251
255
|
n("div", {
|
|
252
|
-
onClick: (g) => Q(
|
|
256
|
+
onClick: (g) => Q(r.id),
|
|
253
257
|
class: "source-item-icon"
|
|
254
258
|
}, [
|
|
255
259
|
t(a(_), { name: "icon--epic--delete-outline-rounded" })
|
|
@@ -260,54 +264,54 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
260
264
|
]),
|
|
261
265
|
n("div", be, [
|
|
262
266
|
n("div", ge, [
|
|
263
|
-
!e.value || !Object.keys(e.value).length ? (m(), p("div", Ve, v(a(
|
|
264
|
-
t(a(
|
|
267
|
+
!e.value || !Object.keys(e.value).length ? (m(), p("div", Ve, v(a(d)("pleaseSelectDataSource")), 1)) : (m(), p("div", _e, [
|
|
268
|
+
t(a(B), {
|
|
265
269
|
ref_key: "ruleFormRef",
|
|
266
270
|
ref: P,
|
|
267
271
|
model: e.value,
|
|
268
272
|
"label-position": "top",
|
|
269
|
-
rules:
|
|
273
|
+
rules: j,
|
|
270
274
|
"label-width": 120
|
|
271
275
|
}, {
|
|
272
276
|
default: s(() => {
|
|
273
|
-
var
|
|
277
|
+
var r, S, g, i, E, k;
|
|
274
278
|
return [
|
|
275
279
|
t(a(N), {
|
|
276
280
|
prop: "apiName",
|
|
277
|
-
label: a(
|
|
281
|
+
label: a(d)("apiName")
|
|
278
282
|
}, {
|
|
279
283
|
default: s(() => [
|
|
280
284
|
t(a(h), {
|
|
281
285
|
clearable: "",
|
|
282
286
|
modelValue: e.value.apiName,
|
|
283
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
284
|
-
placeholder: a(
|
|
287
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => e.value.apiName = u),
|
|
288
|
+
placeholder: a(d)("pleaseEnterApiName")
|
|
285
289
|
}, null, 8, ["modelValue", "placeholder"])
|
|
286
290
|
]),
|
|
287
291
|
_: 1
|
|
288
292
|
}, 8, ["label"]),
|
|
289
293
|
t(a(N), {
|
|
290
294
|
prop: "url",
|
|
291
|
-
label: a(
|
|
295
|
+
label: a(d)("requestUrl")
|
|
292
296
|
}, {
|
|
293
297
|
default: s(() => [
|
|
294
298
|
t(a(h), {
|
|
295
299
|
modelValue: e.value.url,
|
|
296
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
300
|
+
"onUpdate:modelValue": l[1] || (l[1] = (u) => e.value.url = u),
|
|
297
301
|
clearable: "",
|
|
298
|
-
placeholder: a(
|
|
302
|
+
placeholder: a(d)("pleaseEnterRequestUrl")
|
|
299
303
|
}, null, 8, ["modelValue", "placeholder"])
|
|
300
304
|
]),
|
|
301
305
|
_: 1
|
|
302
306
|
}, 8, ["label"]),
|
|
303
307
|
t(a(N), {
|
|
304
|
-
label: a(
|
|
308
|
+
label: a(d)("requestMethod"),
|
|
305
309
|
required: ""
|
|
306
310
|
}, {
|
|
307
311
|
default: s(() => [
|
|
308
|
-
t(a(
|
|
312
|
+
t(a(A), {
|
|
309
313
|
modelValue: e.value.method,
|
|
310
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
314
|
+
"onUpdate:modelValue": l[2] || (l[2] = (u) => e.value.method = u)
|
|
311
315
|
}, {
|
|
312
316
|
default: s(() => [
|
|
313
317
|
t(a(U), {
|
|
@@ -356,14 +360,14 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
356
360
|
t(a(N), {
|
|
357
361
|
prop: "dataKey",
|
|
358
362
|
style: { width: "30%" },
|
|
359
|
-
label: a(
|
|
363
|
+
label: a(d)("labelKey")
|
|
360
364
|
}, {
|
|
361
365
|
default: s(() => [
|
|
362
366
|
t(a(h), {
|
|
363
367
|
modelValue: e.value.dataKey,
|
|
364
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
368
|
+
"onUpdate:modelValue": l[3] || (l[3] = (u) => e.value.dataKey = u),
|
|
365
369
|
clearable: "",
|
|
366
|
-
placeholder: a(
|
|
370
|
+
placeholder: a(d)("pleaseEnterLabelKey")
|
|
367
371
|
}, null, 8, ["modelValue", "placeholder"])
|
|
368
372
|
]),
|
|
369
373
|
_: 1
|
|
@@ -371,28 +375,28 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
371
375
|
t(a(N), {
|
|
372
376
|
prop: "dataValue",
|
|
373
377
|
style: { width: "30%" },
|
|
374
|
-
label: a(
|
|
378
|
+
label: a(d)("valueKey")
|
|
375
379
|
}, {
|
|
376
380
|
default: s(() => [
|
|
377
381
|
t(a(h), {
|
|
378
382
|
modelValue: e.value.dataValue,
|
|
379
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
383
|
+
"onUpdate:modelValue": l[4] || (l[4] = (u) => e.value.dataValue = u),
|
|
380
384
|
clearable: "",
|
|
381
|
-
placeholder: a(
|
|
385
|
+
placeholder: a(d)("pleaseEnterValueKey")
|
|
382
386
|
}, null, 8, ["modelValue", "placeholder"])
|
|
383
387
|
]),
|
|
384
388
|
_: 1
|
|
385
389
|
}, 8, ["label"]),
|
|
386
390
|
t(a(N), {
|
|
387
391
|
style: { width: "33%" },
|
|
388
|
-
label: a(
|
|
392
|
+
label: a(d)("dataPath")
|
|
389
393
|
}, {
|
|
390
394
|
default: s(() => [
|
|
391
395
|
t(a(h), {
|
|
392
396
|
modelValue: e.value.dataPath,
|
|
393
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
397
|
+
"onUpdate:modelValue": l[5] || (l[5] = (u) => e.value.dataPath = u),
|
|
394
398
|
clearable: "",
|
|
395
|
-
placeholder: a(
|
|
399
|
+
placeholder: a(d)("nestedPath")
|
|
396
400
|
}, null, 8, ["modelValue", "placeholder"])
|
|
397
401
|
]),
|
|
398
402
|
_: 1
|
|
@@ -400,7 +404,7 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
400
404
|
]),
|
|
401
405
|
n("div", ke, [
|
|
402
406
|
n("div", Le, [
|
|
403
|
-
n("div", null, v(a(
|
|
407
|
+
n("div", null, v(a(d)("requestParams")), 1),
|
|
404
408
|
t(a(y), {
|
|
405
409
|
onClick: W,
|
|
406
410
|
text: "",
|
|
@@ -409,33 +413,33 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
409
413
|
}, {
|
|
410
414
|
default: s(() => [
|
|
411
415
|
t(a(_), { name: "icon--epic--add-rounded" }),
|
|
412
|
-
V(" " + v(a(
|
|
416
|
+
V(" " + v(a(d)("add")), 1)
|
|
413
417
|
]),
|
|
414
418
|
_: 1
|
|
415
419
|
})
|
|
416
420
|
]),
|
|
417
|
-
(
|
|
418
|
-
(m(!0), p(D, null, J(e.value.paramsList, (
|
|
421
|
+
(r = e.value) != null && r.paramsList && ((S = e.value) != null && S.paramsList.length) ? (m(), p("div", Ne, [
|
|
422
|
+
(m(!0), p(D, null, J(e.value.paramsList, (u, w) => (m(), p("div", {
|
|
419
423
|
class: "content-item",
|
|
420
|
-
key:
|
|
424
|
+
key: u.value
|
|
421
425
|
}, [
|
|
422
426
|
t(a(h), {
|
|
423
|
-
modelValue:
|
|
424
|
-
"onUpdate:modelValue": (c) =>
|
|
427
|
+
modelValue: u.label,
|
|
428
|
+
"onUpdate:modelValue": (c) => u.label = c,
|
|
425
429
|
filterable: "",
|
|
426
430
|
"allow-create": "",
|
|
427
431
|
style: { width: "42%" },
|
|
428
432
|
options: C,
|
|
429
|
-
placeholder: a(
|
|
433
|
+
placeholder: a(d)("paramName")
|
|
430
434
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
431
435
|
t(a(h), {
|
|
432
|
-
modelValue:
|
|
433
|
-
"onUpdate:modelValue": (c) =>
|
|
436
|
+
modelValue: u.value,
|
|
437
|
+
"onUpdate:modelValue": (c) => u.value = c,
|
|
434
438
|
filterable: "",
|
|
435
439
|
"allow-create": "",
|
|
436
440
|
style: { width: "42%" },
|
|
437
441
|
options: C,
|
|
438
|
-
placeholder: a(
|
|
442
|
+
placeholder: a(d)("paramValue")
|
|
439
443
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
440
444
|
t(a(y), {
|
|
441
445
|
onClick: (c) => X(w),
|
|
@@ -451,11 +455,11 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
451
455
|
_: 2
|
|
452
456
|
}, 1032, ["onClick"])
|
|
453
457
|
]))), 128))
|
|
454
|
-
])) :
|
|
458
|
+
])) : F("", !0)
|
|
455
459
|
]),
|
|
456
460
|
n("div", Ce, [
|
|
457
461
|
n("div", Ee, [
|
|
458
|
-
n("div", null, v(a(
|
|
462
|
+
n("div", null, v(a(d)("requestHeaders")), 1),
|
|
459
463
|
t(a(y), {
|
|
460
464
|
onClick: Y,
|
|
461
465
|
text: "",
|
|
@@ -464,36 +468,36 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
464
468
|
}, {
|
|
465
469
|
default: s(() => [
|
|
466
470
|
t(a(_), { name: "icon--epic--add-rounded" }),
|
|
467
|
-
V(" " + v(a(
|
|
471
|
+
V(" " + v(a(d)("add")), 1)
|
|
468
472
|
]),
|
|
469
473
|
_: 1
|
|
470
474
|
})
|
|
471
475
|
]),
|
|
472
476
|
(g = e.value) != null && g.headerList && ((i = e.value) != null && i.headerList.length) ? (m(), p("div", we, [
|
|
473
|
-
(m(!0), p(D, null, J(e.value.headerList, (
|
|
477
|
+
(m(!0), p(D, null, J(e.value.headerList, (u, w) => (m(), p("div", {
|
|
474
478
|
class: "content-item",
|
|
475
479
|
key: w
|
|
476
480
|
}, [
|
|
477
481
|
t(a(h), {
|
|
478
|
-
modelValue:
|
|
479
|
-
"onUpdate:modelValue": (c) =>
|
|
482
|
+
modelValue: u.label,
|
|
483
|
+
"onUpdate:modelValue": (c) => u.label = c,
|
|
480
484
|
filterable: "",
|
|
481
485
|
"allow-create": "",
|
|
482
486
|
style: { width: "42%" },
|
|
483
487
|
options: C,
|
|
484
|
-
placeholder: a(
|
|
488
|
+
placeholder: a(d)("paramName")
|
|
485
489
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
486
490
|
t(a(h), {
|
|
487
|
-
modelValue:
|
|
488
|
-
"onUpdate:modelValue": (c) =>
|
|
491
|
+
modelValue: u.value,
|
|
492
|
+
"onUpdate:modelValue": (c) => u.value = c,
|
|
489
493
|
filterable: "",
|
|
490
494
|
"allow-create": "",
|
|
491
495
|
style: { width: "42%" },
|
|
492
496
|
options: C,
|
|
493
|
-
placeholder: a(
|
|
497
|
+
placeholder: a(d)("paramValue")
|
|
494
498
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
495
499
|
t(a(y), {
|
|
496
|
-
onClick: (c) =>
|
|
500
|
+
onClick: (c) => ee(w),
|
|
497
501
|
type: "danger",
|
|
498
502
|
circle: ""
|
|
499
503
|
}, {
|
|
@@ -506,49 +510,49 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
506
510
|
_: 2
|
|
507
511
|
}, 1032, ["onClick"])
|
|
508
512
|
]))), 128))
|
|
509
|
-
])) :
|
|
513
|
+
])) : F("", !0)
|
|
510
514
|
]),
|
|
511
515
|
n("div", Oe, [
|
|
512
516
|
n("div", Ue, [
|
|
513
|
-
n("div", null, v(a(
|
|
517
|
+
n("div", null, v(a(d)("requestBody")), 1),
|
|
514
518
|
t(a(y), {
|
|
515
|
-
onClick:
|
|
519
|
+
onClick: ae,
|
|
516
520
|
text: "",
|
|
517
521
|
type: "primary",
|
|
518
522
|
class: "btn"
|
|
519
523
|
}, {
|
|
520
524
|
default: s(() => [
|
|
521
525
|
t(a(_), { name: "icon--epic--add-rounded" }),
|
|
522
|
-
V(" " + v(a(
|
|
526
|
+
V(" " + v(a(d)("add")), 1)
|
|
523
527
|
]),
|
|
524
528
|
_: 1
|
|
525
529
|
})
|
|
526
530
|
]),
|
|
527
531
|
(E = e.value) != null && E.bodyList && ((k = e.value) != null && k.bodyList.length) ? (m(), p("div", De, [
|
|
528
|
-
(m(!0), p(D, null, J(e.value.bodyList, (
|
|
532
|
+
(m(!0), p(D, null, J(e.value.bodyList, (u, w) => (m(), p("div", {
|
|
529
533
|
class: "content-item",
|
|
530
534
|
key: w
|
|
531
535
|
}, [
|
|
532
536
|
t(a(h), {
|
|
533
|
-
modelValue:
|
|
534
|
-
"onUpdate:modelValue": (c) =>
|
|
537
|
+
modelValue: u.label,
|
|
538
|
+
"onUpdate:modelValue": (c) => u.label = c,
|
|
535
539
|
filterable: "",
|
|
536
540
|
"allow-create": "",
|
|
537
541
|
style: { width: "42%" },
|
|
538
542
|
options: C,
|
|
539
|
-
placeholder: a(
|
|
543
|
+
placeholder: a(d)("paramName")
|
|
540
544
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
541
545
|
t(a(h), {
|
|
542
|
-
modelValue:
|
|
543
|
-
"onUpdate:modelValue": (c) =>
|
|
546
|
+
modelValue: u.value,
|
|
547
|
+
"onUpdate:modelValue": (c) => u.value = c,
|
|
544
548
|
filterable: "",
|
|
545
549
|
"allow-create": "",
|
|
546
550
|
style: { width: "42%" },
|
|
547
551
|
options: C,
|
|
548
|
-
placeholder: a(
|
|
552
|
+
placeholder: a(d)("paramValue")
|
|
549
553
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
550
554
|
t(a(y), {
|
|
551
|
-
onClick: l[6] || (l[6] = (c) =>
|
|
555
|
+
onClick: l[6] || (l[6] = (c) => le(o.i)),
|
|
552
556
|
type: "danger",
|
|
553
557
|
circle: ""
|
|
554
558
|
}, {
|
|
@@ -561,15 +565,15 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
561
565
|
_: 1
|
|
562
566
|
})
|
|
563
567
|
]))), 128))
|
|
564
|
-
])) :
|
|
568
|
+
])) : F("", !0)
|
|
565
569
|
]),
|
|
566
570
|
n("div", Je, [
|
|
567
571
|
t(a(y), {
|
|
568
572
|
type: "info",
|
|
569
|
-
onClick:
|
|
573
|
+
onClick: te
|
|
570
574
|
}, {
|
|
571
575
|
default: s(() => [
|
|
572
|
-
V(v(a(
|
|
576
|
+
V(v(a(d)("requestTest")), 1)
|
|
573
577
|
]),
|
|
574
578
|
_: 1
|
|
575
579
|
}),
|
|
@@ -578,7 +582,7 @@ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { cl
|
|
|
578
582
|
onClick: K
|
|
579
583
|
}, {
|
|
580
584
|
default: s(() => [
|
|
581
|
-
V(v(a(
|
|
585
|
+
V(v(a(d)("save")), 1)
|
|
582
586
|
]),
|
|
583
587
|
_: 1
|
|
584
588
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./axios-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./axios-B5oA4AjJ.cjs"),_=require("./index-D8olMR4m.cjs"),w=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-BpROfyMH.cjs"),B=[{label:"string",value:"string"},{label:"number",value:"number"},{label:"boolean",value:"boolean"},{label:"method",value:"method"},{label:"regexp",value:"regexp"},{label:"integer",value:"integer"},{label:"float",value:"float"},{label:"array",value:"array"},{label:"object",value:"object"},{label:"date",value:"date"},{label:"url",value:"url"},{label:"hex",value:"hex"},{label:"email",value:"email"},{label:"any",value:"any"}],x=[{label:"change",value:"change"},{label:"blur",value:"blur"}],f=["string","number","url","array","email"],E={class:"rule-item-main bg-white m-t-2 p-2 rounded border border-solid border-gray-200 hover:border-primary transition-all relative"},q={key:0,class:"flex m-t-2 first:m-0"},C=["title"],N={class:"epic-attr-input"},P=e.defineComponent({__name:"ERuleItem",props:{rule:{}},emits:["change","delete","update:rule"],setup(v,{emit:g}){const{t:l}=k.useLocale(),d=g,c=v,n=e.computed({get(){return c.rule},set(t){d("update:rule",t)}}),i=e.inject("pageManager",{}),r=e.computed(()=>Object.entries(i.funcs.value).filter(([t,p])=>typeof p=="function").map(([t])=>({label:t,value:t}))),h=[{type:"select",label:l("validationTrigger"),model:"trigger",componentProps:{options:x,placeholder:l("validationTrigger"),multiple:!0,mode:"multiple"}},{type:"switch",label:l("customRule"),model:"isValidator"},{type:"select",label:l("validationFunction"),model:"validator",show(){return!!n.value.isValidator},componentProps:{options:r.value,placeholder:l("validationFunction")}},{type:"select",label:l("type"),model:"type",show(){return!n.value.isValidator},componentProps:{options:B,placeholder:l("type")}},{type:"input",label:l("regexValidation"),model:"pattern",show(){return!n.value.isValidator},componentProps:{placeholder:l("regexValidation")}},{type:"number",label:l("fieldLength"),model:"len",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("fieldLength")}},{type:"number",label:l("minLength"),model:"min",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("minLength")}},{type:"number",label:l("maxLength"),model:"max",show(){return f.includes(n.value.type??"")},componentProps:{min:0,placeholder:l("maxLength")}},{type:"input",label:l("validationMessage"),model:"message",componentProps:{placeholder:l("validationMessage")}}];function a(){const t=n.value;t.isValidator?(delete t.type,delete t.pattern,delete t.len,delete t.min,delete t.max):delete t.validator,d("change",t)}function b(){d("delete")}return(t,p)=>(e.openBlock(),e.createElementBlock("div",E,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,(o,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V},[!o.show||o.show()?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",{class:"epic-attr-label",title:e.unref(l)("validationTrigger")},e.toDisplayString(o.label),9,C),e.createElementVNode("div",N,[e.createVNode(e.unref(_._sfc_main),{modelValue:n.value[o.model],"onUpdate:modelValue":u=>n.value[o.model]=u,componentSchema:{...o,noFormItem:!0},onChange:a},null,8,["modelValue","onUpdate:modelValue","componentSchema"])])])):e.createCommentVNode("",!0)],64))),64)),e.createElementVNode("div",{class:"rule-btn-delete absolute top-0 text-md right-0 transition-all w-24px h-24px cursor-pointer rounded-bl-2 flex justify-center items-center color-white",onClick:b},[e.createVNode(e.unref(w._sfc_main),{name:"icon--epic--delete-outline-rounded"})])]))}}),L={class:"rule-item-main m-t-2 p-2 rounded border border-solid transition-all relative"},T={key:0,class:"flex m-t-2 first:m-0"},F={class:"epic-attr-label"},M={class:"flex-1"},U=e.defineComponent({__name:"index",props:{ruleType:{type:String,default:"string"},modelValue:{type:Array,default:void 0}},emits:["update:modelValue"],setup(v,{emit:g}){const{t:l}=k.useLocale(),d=y.pluginManager.getComponent("button"),c=v,n=g,i=_.useVModel(c,"modelValue",n),r=e.ref({required:!1,message:l("required"),type:c.ruleType,trigger:["change"]}),h=[{type:"switch",label:l("required"),model:"required"},{type:"select",label:l("validationTrigger"),model:"trigger",show(){return!!r.value.required},componentProps:{options:x,placeholder:l("validationTrigger"),multiple:!0,mode:"multiple"}},{type:"select",label:l("type"),model:"type",show(){return!!r.value.required},componentProps:{options:B,placeholder:l("type")}},{type:"input",label:l("validationMessage"),model:"message",show(){return!!r.value.required},componentProps:{placeholder:l("validationMessage")}}],a=e.ref([]);e.watchEffect(()=>{i.value&&(a.value=[],i.value.forEach(o=>{typeof o.required<"u"?r.value=o:a.value.push(o)}))});function b(){a.value.push({message:"",type:c.ruleType,trigger:["change"]}),t()}function t(){if(r.value.required){i.value=y.deepClone([...a.value,r.value]);return}if(a.value.length){i.value=y.deepClone(a.value);return}i.value=void 0}function p(o){a.value.splice(o,1),t()}return(o,V)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,(u,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[!u.show||u.show()?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",F,e.toDisplayString(u.label),1),e.createElementVNode("div",M,[e.createVNode(e.unref(_._sfc_main),{modelValue:r.value[u.model],"onUpdate:modelValue":m=>r.value[u.model]=m,componentSchema:{...u,noFormItem:!0},onChange:t},null,8,["modelValue","onUpdate:modelValue","componentSchema"])])])):e.createCommentVNode("",!0)],64))),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,s)=>(e.openBlock(),e.createBlock(P,{key:s,rule:a.value[s],"onUpdate:rule":m=>a.value[s]=m,onDelete:m=>p(s),onChange:t},null,8,["rule","onUpdate:rule","onDelete"]))),128)),e.createVNode(e.unref(d),{class:"m-t-2",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("addRule")),1)]),_:1})]))}});exports.default=U;
|