epic-designer-gold 1.0.3 → 1.0.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/dist/attributeView-B2dWB_U2.cjs +1 -0
- package/dist/attributeView-Cu_tjo9A.js +106 -0
- package/dist/axios-B8aFvCWj.cjs +6 -0
- package/dist/{js.cookie-oHpRFPCO.js → axios-Bb3STC1u.js} +942 -737
- package/dist/col-BNNn9Yx8.cjs +1 -0
- package/dist/{col-Dy6oYMf5.js → col-u5YiB-UK.js} +8 -8
- package/dist/index-21c4Pe3i.cjs +1 -0
- package/dist/{index-XUQ1VGQg.js → index-B553TaXm.js} +1 -1
- package/dist/index-BLJT8e0Q.js +195 -0
- package/dist/index-BULuVnVl.js +1359 -0
- package/dist/index-BV9SE7wG.cjs +1 -0
- package/dist/index-BhcwWM1G.cjs +1 -0
- package/dist/index-Bn8pwpgq.cjs +1 -0
- package/dist/index-Bxi3JLms.cjs +1 -0
- package/dist/{index-DLMH0OSJ.js → index-Bybwt7-u.js} +1 -1
- package/dist/index-CEDIwmNK.js +72 -0
- package/dist/index-CEvDmc0a.js +104 -0
- package/dist/{index-DJxuHxdI.js → index-CHCOxt3B.js} +24 -24
- package/dist/index-CI3dhGXT.cjs +1 -0
- package/dist/index-CMbBKMQU.js +71 -0
- package/dist/index-CYAKMqdR.cjs +1 -0
- package/dist/{index-BKDRMrcc.js → index-CgwN4ucQ.js} +28 -47
- package/dist/index-CjIIhZdV.js +271 -0
- package/dist/index-Cq6eLpKZ.cjs +1 -0
- package/dist/{index-CYDtBJTI.cjs → index-CqeRfqUw.cjs} +1 -1
- package/dist/index-CrV5FaWU.cjs +10 -0
- package/dist/{index-DNeYX6HK.js → index-D0kQz_zt.js} +1 -1
- package/dist/index-DR80h8IU.js +4 -0
- package/dist/index-DUMEtCCN.cjs +1 -0
- package/dist/index-DddTXMY9.cjs +1 -0
- package/dist/{index-Dyo12Kua.cjs → index-DeFAvWuV.cjs} +1 -1
- package/dist/index-DeZ09CHf.cjs +1 -0
- package/dist/index-Dg7MK40D.js +581 -0
- package/dist/index-DxNdcsD-.js +602 -0
- package/dist/index-DzxQG0o7.cjs +1 -0
- package/dist/{index-DkyxbMHi.js → index-VblxMq6V.js} +24 -24
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -35
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/lang/en-US.d.ts +246 -0
- package/dist/locale/lang/zh-cn.d.ts +246 -0
- package/dist/modal-BLOgN3us.cjs +1 -0
- package/dist/modal-UFu4bD6x.js +57 -0
- package/dist/outline-CK-jNomF.cjs +1 -0
- package/dist/{outline-CNayBNNC.js → outline-DxCKINRN.js} +2 -2
- package/dist/row-BWnbt6dh.cjs +1 -0
- package/dist/{row-qOviQw5w.js → row-DAy14ve9.js} +4 -4
- package/dist/sign-B-FCN_7O.js +219 -0
- package/dist/sign-Dho4kHTC.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/styleView-CRUqDcCl.cjs +1 -0
- package/dist/{styleView-BLVqzqPV.js → styleView-ClMjCfMk.js} +34 -33
- package/dist/{tree.vue_vue_type_script_setup_true_lang-BntCm43E.js → tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js} +1 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-DDDqMedP.cjs +1 -0
- package/dist/ui/antd/date-picker/datePicker.d.ts +2 -2
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +553 -542
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +1 -1
- package/dist/uploadFile-Bc5Rxk0b.js +77 -0
- package/dist/uploadFile-oB2-NP-v.cjs +1 -0
- package/dist/uploadImage-4tgp3t7X.cjs +1 -0
- package/dist/uploadImage-CF7fobUP.cjs +1 -0
- package/dist/{uploadImage-742IA7ei.js → uploadImage-CGXm3zNQ.js} +34 -33
- package/dist/{uploadImage-CnNnAISs.js → uploadImage-COCC3pxH.js} +17 -20
- package/package.json +1 -1
- package/dist/attributeView-B-IswSw7.js +0 -105
- package/dist/attributeView-CQBVIMGW.cjs +0 -1
- package/dist/col-RWuL5Zuz.cjs +0 -1
- package/dist/index-0GtpyUBx.js +0 -64
- package/dist/index-B4ido7VJ.cjs +0 -1
- package/dist/index-BGvqo4s7.js +0 -104
- package/dist/index-BMtRXkSh.cjs +0 -1
- package/dist/index-BSLudrcT.cjs +0 -1
- package/dist/index-BXO8Zj1H.cjs +0 -1
- package/dist/index-B_9x_cPH.js +0 -1633
- package/dist/index-B_TFfRwe.js +0 -194
- package/dist/index-C3_E7xcD.js +0 -270
- package/dist/index-C3a1hfUC.cjs +0 -10
- package/dist/index-CucdgcqX.cjs +0 -1
- package/dist/index-CvEzOhT_.cjs +0 -1
- package/dist/index-DEPx91yu.cjs +0 -1
- package/dist/index-DKVv0PbJ.js +0 -56
- package/dist/index-DSzJgAzW.cjs +0 -1
- package/dist/index-Dz1OM1dD.cjs +0 -1
- package/dist/index-HNPgHrkl.cjs +0 -1
- package/dist/index-JhxJizMR.js +0 -601
- package/dist/index-aBofZ4Mk.js +0 -4
- package/dist/index-sKJ91s0r.cjs +0 -1
- package/dist/js.cookie-BH1G_HRi.cjs +0 -6
- package/dist/modal-BPJM1Muh.js +0 -59
- package/dist/modal-_fid8E1T.cjs +0 -1
- package/dist/outline-6Qt3qlWm.cjs +0 -1
- package/dist/row-Bm8OjIsU.cjs +0 -1
- package/dist/sign--js815Se.cjs +0 -1
- package/dist/sign-CO47QOTw.js +0 -218
- package/dist/styleView-C1zTBeyd.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs +0 -1
- package/dist/uploadFile-CYDDVa_x.js +0 -76
- package/dist/uploadFile-eWBMdZ9d.cjs +0 -1
- package/dist/uploadImage-BQhv5ymq.cjs +0 -1
- package/dist/uploadImage-BXcN2FA_.cjs +0 -1
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import { defineComponent as te, ref as O, reactive as oe, onMounted as ue, 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 de, normalizeStyle as re, createTextVNode as V, createCommentVNode as R } from "vue";
|
|
2
|
+
import { p as f, E as q, e as se } from "./axios-Bb3STC1u.js";
|
|
3
|
+
import { ElMessage as L } from "element-plus";
|
|
4
|
+
import { _ } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
+
import { u as ne, a as ie } from "./index-Dg7MK40D.js";
|
|
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
|
+
key: 0,
|
|
8
|
+
class: "content-empty"
|
|
9
|
+
}, _e = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "content-form"
|
|
12
|
+
}, Se = { class: "form-flex" }, ke = { class: "form-item" }, Le = { class: "form-item-title" }, Ne = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "form-item-content"
|
|
15
|
+
}, Ce = { class: "form-item" }, Ee = { class: "form-item-title" }, we = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "form-item-content"
|
|
18
|
+
}, Oe = { class: "form-item" }, Ue = { class: "form-item-title" }, De = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "form-item-content"
|
|
21
|
+
}, Je = { class: "content-right-btn" }, Be = /* @__PURE__ */ te({
|
|
22
|
+
__name: "index",
|
|
23
|
+
emits: ["update:modelValue", "update:sourceData"],
|
|
24
|
+
setup(qe, { emit: Pe }) {
|
|
25
|
+
const { t: u } = ne(), y = f.getComponent("button"), x = f.getComponent("Drawer"), h = f.getComponent("input"), N = f.getComponent("FormItem"), F = f.getComponent("Form"), B = f.getComponent("RadioGroup"), U = f.getComponent("RadioButton");
|
|
26
|
+
f.getComponent("select"), f.getComponent("switch");
|
|
27
|
+
const P = O(), A = {
|
|
28
|
+
GET: "#67c23a",
|
|
29
|
+
POST: "#e6a23c",
|
|
30
|
+
PUT: "#409eff",
|
|
31
|
+
DELETE: "#f56c6c"
|
|
32
|
+
}, M = O(0), $ = oe({
|
|
33
|
+
apiName: [{ required: !0, message: u("pleaseEnterApiName"), trigger: "blur" }],
|
|
34
|
+
url: [{ required: !0, message: u("pleaseEnterRequestUrl"), trigger: "blur" }],
|
|
35
|
+
dataKey: [{ required: !0, message: u("pleaseEnterLabelKey"), trigger: "blur" }],
|
|
36
|
+
dataValue: [{ required: !0, message: u("pleaseEnterValueKey"), trigger: "blur" }]
|
|
37
|
+
}), T = O(!1), b = O([]), e = O(), C = [
|
|
38
|
+
{
|
|
39
|
+
label: "1",
|
|
40
|
+
value: "1"
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
function j() {
|
|
44
|
+
T.value = !0;
|
|
45
|
+
}
|
|
46
|
+
function G() {
|
|
47
|
+
const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
48
|
+
return o.charAt(Math.floor(Math.random() * o.length));
|
|
49
|
+
}
|
|
50
|
+
function I(o) {
|
|
51
|
+
let l = "";
|
|
52
|
+
for (let d = 0; d < o; d++)
|
|
53
|
+
l += G();
|
|
54
|
+
return l;
|
|
55
|
+
}
|
|
56
|
+
function z() {
|
|
57
|
+
!e.value || e.value.id || !Object.keys(e.value).length ? (e.value = {
|
|
58
|
+
id: "",
|
|
59
|
+
url: "",
|
|
60
|
+
body: {},
|
|
61
|
+
bodyList: [],
|
|
62
|
+
apiName: `${u("dataSource")}_${I(5)}`,
|
|
63
|
+
method: "get",
|
|
64
|
+
params: {},
|
|
65
|
+
paramsList: [],
|
|
66
|
+
dataKey: "name",
|
|
67
|
+
headers: {},
|
|
68
|
+
headerList: [],
|
|
69
|
+
dataPath: "",
|
|
70
|
+
dataValue: "id"
|
|
71
|
+
}, b.value.push(e.value)) : e.value.id || K();
|
|
72
|
+
}
|
|
73
|
+
function H(o) {
|
|
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((d) => d.id === o), e.value.paramsList = Object.keys(JSON.parse(e.value.params)).map((d) => ({
|
|
76
|
+
label: d,
|
|
77
|
+
value: JSON.parse(e.value.params)[d]
|
|
78
|
+
})), e.value.bodyList = Object.keys(JSON.parse(e.value.body)).map((d) => ({
|
|
79
|
+
label: d,
|
|
80
|
+
value: JSON.parse(e.value.body)[d]
|
|
81
|
+
})), e.value.headerList = Object.keys(JSON.parse(e.value.headers)).map((d) => ({
|
|
82
|
+
label: d,
|
|
83
|
+
value: JSON.parse(e.value.headers)[d]
|
|
84
|
+
})))) : K();
|
|
85
|
+
}
|
|
86
|
+
function Q(o) {
|
|
87
|
+
o ? (q.emit("deleteSourceData", o), e.value = {}) : (b.value = b.value.filter((l) => l.id !== o), e.value = {});
|
|
88
|
+
}
|
|
89
|
+
function W() {
|
|
90
|
+
var o;
|
|
91
|
+
(o = e.value) == null || o.paramsList.push({
|
|
92
|
+
label: "",
|
|
93
|
+
value: ""
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function X(o) {
|
|
97
|
+
e.value.paramsList.splice(o, 1);
|
|
98
|
+
}
|
|
99
|
+
function Y() {
|
|
100
|
+
var o;
|
|
101
|
+
(o = e.value) == null || o.headerList.push({
|
|
102
|
+
label: "",
|
|
103
|
+
value: ""
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function Z(o) {
|
|
107
|
+
e.value.headerList.splice(o, 1);
|
|
108
|
+
}
|
|
109
|
+
function ee() {
|
|
110
|
+
var o;
|
|
111
|
+
(o = e.value) == null || o.bodyList.push({
|
|
112
|
+
label: "",
|
|
113
|
+
value: ""
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function ae(o) {
|
|
117
|
+
e.value.bodyList.splice(o, 1);
|
|
118
|
+
}
|
|
119
|
+
ue(() => {
|
|
120
|
+
b.value = JSON.parse(JSON.stringify(f.getSourceData()));
|
|
121
|
+
}), q.on("updateSource", (o) => {
|
|
122
|
+
b.value = JSON.parse(JSON.stringify(f.getSourceData()));
|
|
123
|
+
});
|
|
124
|
+
async function le() {
|
|
125
|
+
P.value.validate(async (o) => {
|
|
126
|
+
if (o)
|
|
127
|
+
try {
|
|
128
|
+
const l = {};
|
|
129
|
+
e.value.paramsList.forEach((i) => {
|
|
130
|
+
l[i.label] = i.value;
|
|
131
|
+
});
|
|
132
|
+
const d = {};
|
|
133
|
+
e.value.bodyList.forEach((i) => {
|
|
134
|
+
d[i.label] = i.value;
|
|
135
|
+
});
|
|
136
|
+
const S = {};
|
|
137
|
+
e.value.headerList.forEach((i) => {
|
|
138
|
+
S[i.label] = i.value;
|
|
139
|
+
});
|
|
140
|
+
let g = await se({
|
|
141
|
+
method: e.value.method,
|
|
142
|
+
// url: formData.value.url,
|
|
143
|
+
// url: "http://localhost:3333/users",
|
|
144
|
+
url: e.value.url,
|
|
145
|
+
params: l,
|
|
146
|
+
data: d,
|
|
147
|
+
headers: {
|
|
148
|
+
...S,
|
|
149
|
+
Authorization: "Bearer " + ie.get("Admin-Token")
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
if (e.value.dataPath) {
|
|
153
|
+
const E = e.value.dataPath.split(".").reduce((k, r) => k[r], g.data);
|
|
154
|
+
E && E.length ? L({
|
|
155
|
+
message: E.map((k) => ({
|
|
156
|
+
label: k[e.value.dataKey],
|
|
157
|
+
value: k[e.value.dataValue]
|
|
158
|
+
}))
|
|
159
|
+
}) : L.info(u("configError"));
|
|
160
|
+
} else
|
|
161
|
+
g.data && g.data.length ? L({
|
|
162
|
+
message: g.data.map((i) => ({
|
|
163
|
+
label: i[e.value.dataKey],
|
|
164
|
+
value: i[e.value.dataValue]
|
|
165
|
+
}))
|
|
166
|
+
}) : L.info(u("configError"));
|
|
167
|
+
} catch {
|
|
168
|
+
L.error(u("requestFailed"));
|
|
169
|
+
} finally {
|
|
170
|
+
}
|
|
171
|
+
else
|
|
172
|
+
L.error(u("fillRequiredFields"));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async function K() {
|
|
176
|
+
e.value.body = e.value.bodyList.reduce((o, l) => (o[l.label] = l.value, o), {}), e.value.params = e.value.paramsList.reduce(
|
|
177
|
+
(o, l) => (o[l.label] = l.value, o),
|
|
178
|
+
{}
|
|
179
|
+
), e.value.headers = e.value.headerList.reduce(
|
|
180
|
+
(o, l) => (o[l.label] = l.value, o),
|
|
181
|
+
{}
|
|
182
|
+
), P.value.validate((o) => {
|
|
183
|
+
o ? e.value.id ? (q.emit("updateSourceData", {
|
|
184
|
+
...e.value,
|
|
185
|
+
body: JSON.stringify(e.value.body),
|
|
186
|
+
params: JSON.stringify(e.value.params),
|
|
187
|
+
headers: JSON.stringify(e.value.headers)
|
|
188
|
+
}), e.value = {}) : (q.emit("saveSourceData", {
|
|
189
|
+
...e.value,
|
|
190
|
+
body: JSON.stringify(e.value.body),
|
|
191
|
+
params: JSON.stringify(e.value.params),
|
|
192
|
+
headers: JSON.stringify(e.value.headers)
|
|
193
|
+
}), e.value = {}) : L.warning(u("completeFormFirst"));
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return (o, l) => (m(), p("div", ce, [
|
|
197
|
+
t(a(y), {
|
|
198
|
+
class: "btn",
|
|
199
|
+
onClick: j
|
|
200
|
+
}, {
|
|
201
|
+
default: s(() => [
|
|
202
|
+
t(a(_), {
|
|
203
|
+
name: "icon--epic--window-outline",
|
|
204
|
+
class: "mr-4px"
|
|
205
|
+
}),
|
|
206
|
+
n("span", null, v(a(u)("configuration")), 1),
|
|
207
|
+
n("span", me, v(M.value || b.value.length), 1)
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}),
|
|
211
|
+
t(a(x), {
|
|
212
|
+
size: 960,
|
|
213
|
+
modelValue: T.value,
|
|
214
|
+
"onUpdate:modelValue": l[7] || (l[7] = (d) => T.value = d),
|
|
215
|
+
"append-to-body": "",
|
|
216
|
+
title: a(u)("dataSources")
|
|
217
|
+
}, {
|
|
218
|
+
default: s(() => [
|
|
219
|
+
n("div", pe, [
|
|
220
|
+
n("div", ve, [
|
|
221
|
+
t(a(y), {
|
|
222
|
+
type: "primary",
|
|
223
|
+
class: "btn",
|
|
224
|
+
onClick: z
|
|
225
|
+
}, {
|
|
226
|
+
default: s(() => [
|
|
227
|
+
t(a(_), {
|
|
228
|
+
name: "icon--epic--add-rounded",
|
|
229
|
+
class: "mr-4px"
|
|
230
|
+
}),
|
|
231
|
+
n("span", null, v(a(u)("addDataSource")), 1)
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
}),
|
|
235
|
+
n("div", null, [
|
|
236
|
+
(m(!0), p(D, null, J(b.value, (d) => {
|
|
237
|
+
var S;
|
|
238
|
+
return m(), p("div", {
|
|
239
|
+
class: de(["source-item", { active: d.id === ((S = e.value) == null ? void 0 : S.id) }]),
|
|
240
|
+
key: d.id,
|
|
241
|
+
onClick: (g) => H(d.id)
|
|
242
|
+
}, [
|
|
243
|
+
n("div", he, [
|
|
244
|
+
n("div", {
|
|
245
|
+
style: re({
|
|
246
|
+
color: A[d.method.toLocaleUpperCase()]
|
|
247
|
+
})
|
|
248
|
+
}, v(d.method.toLocaleUpperCase()), 5),
|
|
249
|
+
n("div", null, v(d.apiName), 1)
|
|
250
|
+
]),
|
|
251
|
+
n("div", {
|
|
252
|
+
onClick: (g) => Q(d.id),
|
|
253
|
+
class: "source-item-icon"
|
|
254
|
+
}, [
|
|
255
|
+
t(a(_), { name: "icon--epic--delete-outline-rounded" })
|
|
256
|
+
], 8, ye)
|
|
257
|
+
], 10, fe);
|
|
258
|
+
}), 128))
|
|
259
|
+
])
|
|
260
|
+
]),
|
|
261
|
+
n("div", be, [
|
|
262
|
+
n("div", ge, [
|
|
263
|
+
!e.value || !Object.keys(e.value).length ? (m(), p("div", Ve, v(a(u)("pleaseSelectDataSource")), 1)) : (m(), p("div", _e, [
|
|
264
|
+
t(a(F), {
|
|
265
|
+
ref_key: "ruleFormRef",
|
|
266
|
+
ref: P,
|
|
267
|
+
model: e.value,
|
|
268
|
+
"label-position": "top",
|
|
269
|
+
rules: $,
|
|
270
|
+
"label-width": 120
|
|
271
|
+
}, {
|
|
272
|
+
default: s(() => {
|
|
273
|
+
var d, S, g, i, E, k;
|
|
274
|
+
return [
|
|
275
|
+
t(a(N), {
|
|
276
|
+
prop: "apiName",
|
|
277
|
+
label: a(u)("apiName")
|
|
278
|
+
}, {
|
|
279
|
+
default: s(() => [
|
|
280
|
+
t(a(h), {
|
|
281
|
+
clearable: "",
|
|
282
|
+
modelValue: e.value.apiName,
|
|
283
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => e.value.apiName = r),
|
|
284
|
+
placeholder: a(u)("pleaseEnterApiName")
|
|
285
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
286
|
+
]),
|
|
287
|
+
_: 1
|
|
288
|
+
}, 8, ["label"]),
|
|
289
|
+
t(a(N), {
|
|
290
|
+
prop: "url",
|
|
291
|
+
label: a(u)("requestUrl")
|
|
292
|
+
}, {
|
|
293
|
+
default: s(() => [
|
|
294
|
+
t(a(h), {
|
|
295
|
+
modelValue: e.value.url,
|
|
296
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => e.value.url = r),
|
|
297
|
+
clearable: "",
|
|
298
|
+
placeholder: a(u)("pleaseEnterRequestUrl")
|
|
299
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
300
|
+
]),
|
|
301
|
+
_: 1
|
|
302
|
+
}, 8, ["label"]),
|
|
303
|
+
t(a(N), {
|
|
304
|
+
label: a(u)("requestMethod"),
|
|
305
|
+
required: ""
|
|
306
|
+
}, {
|
|
307
|
+
default: s(() => [
|
|
308
|
+
t(a(B), {
|
|
309
|
+
modelValue: e.value.method,
|
|
310
|
+
"onUpdate:modelValue": l[2] || (l[2] = (r) => e.value.method = r)
|
|
311
|
+
}, {
|
|
312
|
+
default: s(() => [
|
|
313
|
+
t(a(U), {
|
|
314
|
+
label: "GET",
|
|
315
|
+
value: "get"
|
|
316
|
+
}, {
|
|
317
|
+
default: s(() => l[8] || (l[8] = [
|
|
318
|
+
V("GET")
|
|
319
|
+
])),
|
|
320
|
+
_: 1
|
|
321
|
+
}),
|
|
322
|
+
t(a(U), {
|
|
323
|
+
label: "POST",
|
|
324
|
+
value: "post"
|
|
325
|
+
}, {
|
|
326
|
+
default: s(() => l[9] || (l[9] = [
|
|
327
|
+
V("POST")
|
|
328
|
+
])),
|
|
329
|
+
_: 1
|
|
330
|
+
}),
|
|
331
|
+
t(a(U), {
|
|
332
|
+
label: "PUT",
|
|
333
|
+
value: "put"
|
|
334
|
+
}, {
|
|
335
|
+
default: s(() => l[10] || (l[10] = [
|
|
336
|
+
V("PUT")
|
|
337
|
+
])),
|
|
338
|
+
_: 1
|
|
339
|
+
}),
|
|
340
|
+
t(a(U), {
|
|
341
|
+
label: "DELETE",
|
|
342
|
+
value: "delete"
|
|
343
|
+
}, {
|
|
344
|
+
default: s(() => l[11] || (l[11] = [
|
|
345
|
+
V("DELETE")
|
|
346
|
+
])),
|
|
347
|
+
_: 1
|
|
348
|
+
})
|
|
349
|
+
]),
|
|
350
|
+
_: 1
|
|
351
|
+
}, 8, ["modelValue"])
|
|
352
|
+
]),
|
|
353
|
+
_: 1
|
|
354
|
+
}, 8, ["label"]),
|
|
355
|
+
n("div", Se, [
|
|
356
|
+
t(a(N), {
|
|
357
|
+
prop: "dataKey",
|
|
358
|
+
style: { width: "30%" },
|
|
359
|
+
label: a(u)("labelKey")
|
|
360
|
+
}, {
|
|
361
|
+
default: s(() => [
|
|
362
|
+
t(a(h), {
|
|
363
|
+
modelValue: e.value.dataKey,
|
|
364
|
+
"onUpdate:modelValue": l[3] || (l[3] = (r) => e.value.dataKey = r),
|
|
365
|
+
clearable: "",
|
|
366
|
+
placeholder: a(u)("pleaseEnterLabelKey")
|
|
367
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
368
|
+
]),
|
|
369
|
+
_: 1
|
|
370
|
+
}, 8, ["label"]),
|
|
371
|
+
t(a(N), {
|
|
372
|
+
prop: "dataValue",
|
|
373
|
+
style: { width: "30%" },
|
|
374
|
+
label: a(u)("valueKey")
|
|
375
|
+
}, {
|
|
376
|
+
default: s(() => [
|
|
377
|
+
t(a(h), {
|
|
378
|
+
modelValue: e.value.dataValue,
|
|
379
|
+
"onUpdate:modelValue": l[4] || (l[4] = (r) => e.value.dataValue = r),
|
|
380
|
+
clearable: "",
|
|
381
|
+
placeholder: a(u)("pleaseEnterValueKey")
|
|
382
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
383
|
+
]),
|
|
384
|
+
_: 1
|
|
385
|
+
}, 8, ["label"]),
|
|
386
|
+
t(a(N), {
|
|
387
|
+
style: { width: "33%" },
|
|
388
|
+
label: a(u)("dataPath")
|
|
389
|
+
}, {
|
|
390
|
+
default: s(() => [
|
|
391
|
+
t(a(h), {
|
|
392
|
+
modelValue: e.value.dataPath,
|
|
393
|
+
"onUpdate:modelValue": l[5] || (l[5] = (r) => e.value.dataPath = r),
|
|
394
|
+
clearable: "",
|
|
395
|
+
placeholder: a(u)("nestedPath")
|
|
396
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
397
|
+
]),
|
|
398
|
+
_: 1
|
|
399
|
+
}, 8, ["label"])
|
|
400
|
+
]),
|
|
401
|
+
n("div", ke, [
|
|
402
|
+
n("div", Le, [
|
|
403
|
+
n("div", null, v(a(u)("requestParams")), 1),
|
|
404
|
+
t(a(y), {
|
|
405
|
+
onClick: W,
|
|
406
|
+
text: "",
|
|
407
|
+
type: "primary",
|
|
408
|
+
class: "btn"
|
|
409
|
+
}, {
|
|
410
|
+
default: s(() => [
|
|
411
|
+
t(a(_), { name: "icon--epic--add-rounded" }),
|
|
412
|
+
V(" " + v(a(u)("add")), 1)
|
|
413
|
+
]),
|
|
414
|
+
_: 1
|
|
415
|
+
})
|
|
416
|
+
]),
|
|
417
|
+
(d = e.value) != null && d.paramsList && ((S = e.value) != null && S.paramsList.length) ? (m(), p("div", Ne, [
|
|
418
|
+
(m(!0), p(D, null, J(e.value.paramsList, (r, w) => (m(), p("div", {
|
|
419
|
+
class: "content-item",
|
|
420
|
+
key: r.value
|
|
421
|
+
}, [
|
|
422
|
+
t(a(h), {
|
|
423
|
+
modelValue: r.label,
|
|
424
|
+
"onUpdate:modelValue": (c) => r.label = c,
|
|
425
|
+
filterable: "",
|
|
426
|
+
"allow-create": "",
|
|
427
|
+
style: { width: "42%" },
|
|
428
|
+
options: C,
|
|
429
|
+
placeholder: a(u)("paramName")
|
|
430
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
431
|
+
t(a(h), {
|
|
432
|
+
modelValue: r.value,
|
|
433
|
+
"onUpdate:modelValue": (c) => r.value = c,
|
|
434
|
+
filterable: "",
|
|
435
|
+
"allow-create": "",
|
|
436
|
+
style: { width: "42%" },
|
|
437
|
+
options: C,
|
|
438
|
+
placeholder: a(u)("paramValue")
|
|
439
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
440
|
+
t(a(y), {
|
|
441
|
+
onClick: (c) => X(w),
|
|
442
|
+
type: "danger",
|
|
443
|
+
circle: ""
|
|
444
|
+
}, {
|
|
445
|
+
default: s(() => [
|
|
446
|
+
t(a(_), {
|
|
447
|
+
style: { color: "#fff" },
|
|
448
|
+
name: "icon--epic--delete-outline-rounded"
|
|
449
|
+
})
|
|
450
|
+
]),
|
|
451
|
+
_: 2
|
|
452
|
+
}, 1032, ["onClick"])
|
|
453
|
+
]))), 128))
|
|
454
|
+
])) : R("", !0)
|
|
455
|
+
]),
|
|
456
|
+
n("div", Ce, [
|
|
457
|
+
n("div", Ee, [
|
|
458
|
+
n("div", null, v(a(u)("requestHeaders")), 1),
|
|
459
|
+
t(a(y), {
|
|
460
|
+
onClick: Y,
|
|
461
|
+
text: "",
|
|
462
|
+
type: "primary",
|
|
463
|
+
class: "btn"
|
|
464
|
+
}, {
|
|
465
|
+
default: s(() => [
|
|
466
|
+
t(a(_), { name: "icon--epic--add-rounded" }),
|
|
467
|
+
V(" " + v(a(u)("add")), 1)
|
|
468
|
+
]),
|
|
469
|
+
_: 1
|
|
470
|
+
})
|
|
471
|
+
]),
|
|
472
|
+
(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, (r, w) => (m(), p("div", {
|
|
474
|
+
class: "content-item",
|
|
475
|
+
key: w
|
|
476
|
+
}, [
|
|
477
|
+
t(a(h), {
|
|
478
|
+
modelValue: r.label,
|
|
479
|
+
"onUpdate:modelValue": (c) => r.label = c,
|
|
480
|
+
filterable: "",
|
|
481
|
+
"allow-create": "",
|
|
482
|
+
style: { width: "42%" },
|
|
483
|
+
options: C,
|
|
484
|
+
placeholder: a(u)("paramName")
|
|
485
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
486
|
+
t(a(h), {
|
|
487
|
+
modelValue: r.value,
|
|
488
|
+
"onUpdate:modelValue": (c) => r.value = c,
|
|
489
|
+
filterable: "",
|
|
490
|
+
"allow-create": "",
|
|
491
|
+
style: { width: "42%" },
|
|
492
|
+
options: C,
|
|
493
|
+
placeholder: a(u)("paramValue")
|
|
494
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
495
|
+
t(a(y), {
|
|
496
|
+
onClick: (c) => Z(w),
|
|
497
|
+
type: "danger",
|
|
498
|
+
circle: ""
|
|
499
|
+
}, {
|
|
500
|
+
default: s(() => [
|
|
501
|
+
t(a(_), {
|
|
502
|
+
style: { color: "#fff" },
|
|
503
|
+
name: "icon--epic--delete-outline-rounded"
|
|
504
|
+
})
|
|
505
|
+
]),
|
|
506
|
+
_: 2
|
|
507
|
+
}, 1032, ["onClick"])
|
|
508
|
+
]))), 128))
|
|
509
|
+
])) : R("", !0)
|
|
510
|
+
]),
|
|
511
|
+
n("div", Oe, [
|
|
512
|
+
n("div", Ue, [
|
|
513
|
+
n("div", null, v(a(u)("requestBody")), 1),
|
|
514
|
+
t(a(y), {
|
|
515
|
+
onClick: ee,
|
|
516
|
+
text: "",
|
|
517
|
+
type: "primary",
|
|
518
|
+
class: "btn"
|
|
519
|
+
}, {
|
|
520
|
+
default: s(() => [
|
|
521
|
+
t(a(_), { name: "icon--epic--add-rounded" }),
|
|
522
|
+
V(" " + v(a(u)("add")), 1)
|
|
523
|
+
]),
|
|
524
|
+
_: 1
|
|
525
|
+
})
|
|
526
|
+
]),
|
|
527
|
+
(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, (r, w) => (m(), p("div", {
|
|
529
|
+
class: "content-item",
|
|
530
|
+
key: w
|
|
531
|
+
}, [
|
|
532
|
+
t(a(h), {
|
|
533
|
+
modelValue: r.label,
|
|
534
|
+
"onUpdate:modelValue": (c) => r.label = c,
|
|
535
|
+
filterable: "",
|
|
536
|
+
"allow-create": "",
|
|
537
|
+
style: { width: "42%" },
|
|
538
|
+
options: C,
|
|
539
|
+
placeholder: a(u)("paramName")
|
|
540
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
541
|
+
t(a(h), {
|
|
542
|
+
modelValue: r.value,
|
|
543
|
+
"onUpdate:modelValue": (c) => r.value = c,
|
|
544
|
+
filterable: "",
|
|
545
|
+
"allow-create": "",
|
|
546
|
+
style: { width: "42%" },
|
|
547
|
+
options: C,
|
|
548
|
+
placeholder: a(u)("paramValue")
|
|
549
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
550
|
+
t(a(y), {
|
|
551
|
+
onClick: l[6] || (l[6] = (c) => ae(o.i)),
|
|
552
|
+
type: "danger",
|
|
553
|
+
circle: ""
|
|
554
|
+
}, {
|
|
555
|
+
default: s(() => [
|
|
556
|
+
t(a(_), {
|
|
557
|
+
style: { color: "#fff" },
|
|
558
|
+
name: "icon--epic--delete-outline-rounded"
|
|
559
|
+
})
|
|
560
|
+
]),
|
|
561
|
+
_: 1
|
|
562
|
+
})
|
|
563
|
+
]))), 128))
|
|
564
|
+
])) : R("", !0)
|
|
565
|
+
]),
|
|
566
|
+
n("div", Je, [
|
|
567
|
+
t(a(y), {
|
|
568
|
+
type: "info",
|
|
569
|
+
onClick: le
|
|
570
|
+
}, {
|
|
571
|
+
default: s(() => [
|
|
572
|
+
V(v(a(u)("requestTest")), 1)
|
|
573
|
+
]),
|
|
574
|
+
_: 1
|
|
575
|
+
}),
|
|
576
|
+
t(a(y), {
|
|
577
|
+
type: "primary",
|
|
578
|
+
onClick: K
|
|
579
|
+
}, {
|
|
580
|
+
default: s(() => [
|
|
581
|
+
V(v(a(u)("save")), 1)
|
|
582
|
+
]),
|
|
583
|
+
_: 1
|
|
584
|
+
})
|
|
585
|
+
])
|
|
586
|
+
];
|
|
587
|
+
}),
|
|
588
|
+
_: 1
|
|
589
|
+
}, 8, ["model", "rules"])
|
|
590
|
+
]))
|
|
591
|
+
])
|
|
592
|
+
])
|
|
593
|
+
])
|
|
594
|
+
]),
|
|
595
|
+
_: 1
|
|
596
|
+
}, 8, ["modelValue", "title"])
|
|
597
|
+
]));
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
export {
|
|
601
|
+
Be as default
|
|
602
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./axios-B8aFvCWj.cjs"),h=require("element-plus"),f=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),S=require("./index-Cq6eLpKZ.cjs"),I={class:"e-data-source"},z={class:"icon-numbers"},H={class:"drawer-content"},Q={class:"drawer-content-left"},W=["onClick"],X={class:"source-item-title"},Y=["onClick"],Z={class:"drawer-content-right"},ee={class:"content"},ae={key:0,class:"content-empty"},te={key:1,class:"content-form"},le={class:"form-flex"},re={class:"form-item"},oe={class:"form-item-title"},ne={key:0,class:"form-item-content"},ue={class:"form-item"},de={class:"form-item-title"},se={key:0,class:"form-item-content"},ie={class:"form-item"},ce={class:"form-item-title"},me={key:0,class:"form-item-content"},pe={class:"content-right-btn"},fe=e.defineComponent({__name:"index",emits:["update:modelValue","update:sourceData"],setup(ve,{emit:Ve}){const{t:r}=S.useLocale(),c=u.pluginManager.getComponent("button"),w=u.pluginManager.getComponent("Drawer"),i=u.pluginManager.getComponent("input"),g=u.pluginManager.getComponent("FormItem"),x=u.pluginManager.getComponent("Form"),L=u.pluginManager.getComponent("RadioGroup"),_=u.pluginManager.getComponent("RadioButton");u.pluginManager.getComponent("select"),u.pluginManager.getComponent("switch");const E=e.ref(),B={GET:"#67c23a",POST:"#e6a23c",PUT:"#409eff",DELETE:"#f56c6c"},D=e.ref(0),O=e.reactive({apiName:[{required:!0,message:r("pleaseEnterApiName"),trigger:"blur"}],url:[{required:!0,message:r("pleaseEnterRequestUrl"),trigger:"blur"}],dataKey:[{required:!0,message:r("pleaseEnterLabelKey"),trigger:"blur"}],dataValue:[{required:!0,message:r("pleaseEnterValueKey"),trigger:"blur"}]}),k=e.ref(!1),m=e.ref([]),a=e.ref(),y=[{label:"1",value:"1"}];function U(){k.value=!0}function M(){const l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return l.charAt(Math.floor(Math.random()*l.length))}function T(l){let t="";for(let o=0;o<l;o++)t+=M();return t}function q(){!a.value||a.value.id||!Object.keys(a.value).length?(a.value={id:"",url:"",body:{},bodyList:[],apiName:`${r("dataSource")}_${T(5)}`,method:"get",params:{},paramsList:[],dataKey:"name",headers:{},headerList:[],dataPath:"",dataValue:"id"},m.value.push(a.value)):a.value.id||C()}function J(l){var t;!a.value||a.value.id||!Object.keys(a.value).length?(m.value=JSON.parse(JSON.stringify(u.pluginManager.getSourceData())),((t=a.value)==null?void 0:t.id)===l?a.value={}:(a.value=m.value.find(o=>o.id===l),a.value.paramsList=Object.keys(JSON.parse(a.value.params)).map(o=>({label:o,value:JSON.parse(a.value.params)[o]})),a.value.bodyList=Object.keys(JSON.parse(a.value.body)).map(o=>({label:o,value:JSON.parse(a.value.body)[o]})),a.value.headerList=Object.keys(JSON.parse(a.value.headers)).map(o=>({label:o,value:JSON.parse(a.value.headers)[o]})))):C()}function P(l){l?(u.EventBus.emit("deleteSourceData",l),a.value={}):(m.value=m.value.filter(t=>t.id!==l),a.value={})}function F(){var l;(l=a.value)==null||l.paramsList.push({label:"",value:""})}function K(l){a.value.paramsList.splice(l,1)}function R(){var l;(l=a.value)==null||l.headerList.push({label:"",value:""})}function j(l){a.value.headerList.splice(l,1)}function A(){var l;(l=a.value)==null||l.bodyList.push({label:"",value:""})}function $(l){a.value.bodyList.splice(l,1)}e.onMounted(()=>{m.value=JSON.parse(JSON.stringify(u.pluginManager.getSourceData()))}),u.EventBus.on("updateSource",l=>{m.value=JSON.parse(JSON.stringify(u.pluginManager.getSourceData()))});async function G(){E.value.validate(async l=>{if(l)try{const t={};a.value.paramsList.forEach(d=>{t[d.label]=d.value});const o={};a.value.bodyList.forEach(d=>{o[d.label]=d.value});const v={};a.value.headerList.forEach(d=>{v[d.label]=d.value});let p=await u.axios({method:a.value.method,url:a.value.url,params:t,data:o,headers:{...v,Authorization:"Bearer "+S.api.get("Admin-Token")}});if(a.value.dataPath){const N=a.value.dataPath.split(".").reduce((V,n)=>V[n],p.data);N&&N.length?h.ElMessage({message:N.map(V=>({label:V[a.value.dataKey],value:V[a.value.dataValue]}))}):h.ElMessage.info(r("configError"))}else p.data&&p.data.length?h.ElMessage({message:p.data.map(d=>({label:d[a.value.dataKey],value:d[a.value.dataValue]}))}):h.ElMessage.info(r("configError"))}catch{h.ElMessage.error(r("requestFailed"))}finally{}else h.ElMessage.error(r("fillRequiredFields"))})}async function C(){a.value.body=a.value.bodyList.reduce((l,t)=>(l[t.label]=t.value,l),{}),a.value.params=a.value.paramsList.reduce((l,t)=>(l[t.label]=t.value,l),{}),a.value.headers=a.value.headerList.reduce((l,t)=>(l[t.label]=t.value,l),{}),E.value.validate(l=>{l?a.value.id?(u.EventBus.emit("updateSourceData",{...a.value,body:JSON.stringify(a.value.body),params:JSON.stringify(a.value.params),headers:JSON.stringify(a.value.headers)}),a.value={}):(u.EventBus.emit("saveSourceData",{...a.value,body:JSON.stringify(a.value.body),params:JSON.stringify(a.value.params),headers:JSON.stringify(a.value.headers)}),a.value={}):h.ElMessage.warning(r("completeFormFirst"))})}return(l,t)=>(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(e.unref(c),{class:"btn",onClick:U},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{name:"icon--epic--window-outline",class:"mr-4px"}),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("configuration")),1),e.createElementVNode("span",z,e.toDisplayString(D.value||m.value.length),1)]),_:1}),e.createVNode(e.unref(w),{size:960,modelValue:k.value,"onUpdate:modelValue":t[7]||(t[7]=o=>k.value=o),"append-to-body":"",title:e.unref(r)("dataSources")},{default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createElementVNode("div",Q,[e.createVNode(e.unref(c),{type:"primary",class:"btn",onClick:q},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{name:"icon--epic--add-rounded",class:"mr-4px"}),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("addDataSource")),1)]),_:1}),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>{var v;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["source-item",{active:o.id===((v=a.value)==null?void 0:v.id)}]),key:o.id,onClick:p=>J(o.id)},[e.createElementVNode("div",X,[e.createElementVNode("div",{style:e.normalizeStyle({color:B[o.method.toLocaleUpperCase()]})},e.toDisplayString(o.method.toLocaleUpperCase()),5),e.createElementVNode("div",null,e.toDisplayString(o.apiName),1)]),e.createElementVNode("div",{onClick:p=>P(o.id),class:"source-item-icon"},[e.createVNode(e.unref(f._sfc_main),{name:"icon--epic--delete-outline-rounded"})],8,Y)],10,W)}),128))])]),e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[!a.value||!Object.keys(a.value).length?(e.openBlock(),e.createElementBlock("div",ae,e.toDisplayString(e.unref(r)("pleaseSelectDataSource")),1)):(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(x),{ref_key:"ruleFormRef",ref:E,model:a.value,"label-position":"top",rules:O,"label-width":120},{default:e.withCtx(()=>{var o,v,p,d,N,V;return[e.createVNode(e.unref(g),{prop:"apiName",label:e.unref(r)("apiName")},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{clearable:"",modelValue:a.value.apiName,"onUpdate:modelValue":t[0]||(t[0]=n=>a.value.apiName=n),placeholder:e.unref(r)("pleaseEnterApiName")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(e.unref(g),{prop:"url",label:e.unref(r)("requestUrl")},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{modelValue:a.value.url,"onUpdate:modelValue":t[1]||(t[1]=n=>a.value.url=n),clearable:"",placeholder:e.unref(r)("pleaseEnterRequestUrl")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(e.unref(g),{label:e.unref(r)("requestMethod"),required:""},{default:e.withCtx(()=>[e.createVNode(e.unref(L),{modelValue:a.value.method,"onUpdate:modelValue":t[2]||(t[2]=n=>a.value.method=n)},{default:e.withCtx(()=>[e.createVNode(e.unref(_),{label:"GET",value:"get"},{default:e.withCtx(()=>t[8]||(t[8]=[e.createTextVNode("GET")])),_:1}),e.createVNode(e.unref(_),{label:"POST",value:"post"},{default:e.withCtx(()=>t[9]||(t[9]=[e.createTextVNode("POST")])),_:1}),e.createVNode(e.unref(_),{label:"PUT",value:"put"},{default:e.withCtx(()=>t[10]||(t[10]=[e.createTextVNode("PUT")])),_:1}),e.createVNode(e.unref(_),{label:"DELETE",value:"delete"},{default:e.withCtx(()=>t[11]||(t[11]=[e.createTextVNode("DELETE")])),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createElementVNode("div",le,[e.createVNode(e.unref(g),{prop:"dataKey",style:{width:"30%"},label:e.unref(r)("labelKey")},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{modelValue:a.value.dataKey,"onUpdate:modelValue":t[3]||(t[3]=n=>a.value.dataKey=n),clearable:"",placeholder:e.unref(r)("pleaseEnterLabelKey")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(e.unref(g),{prop:"dataValue",style:{width:"30%"},label:e.unref(r)("valueKey")},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{modelValue:a.value.dataValue,"onUpdate:modelValue":t[4]||(t[4]=n=>a.value.dataValue=n),clearable:"",placeholder:e.unref(r)("pleaseEnterValueKey")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(e.unref(g),{style:{width:"33%"},label:e.unref(r)("dataPath")},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{modelValue:a.value.dataPath,"onUpdate:modelValue":t[5]||(t[5]=n=>a.value.dataPath=n),clearable:"",placeholder:e.unref(r)("nestedPath")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),e.createElementVNode("div",re,[e.createElementVNode("div",oe,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("requestParams")),1),e.createVNode(e.unref(c),{onClick:F,text:"",type:"primary",class:"btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{name:"icon--epic--add-rounded"}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("add")),1)]),_:1})]),(o=a.value)!=null&&o.paramsList&&((v=a.value)!=null&&v.paramsList.length)?(e.openBlock(),e.createElementBlock("div",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.paramsList,(n,b)=>(e.openBlock(),e.createElementBlock("div",{class:"content-item",key:n.value},[e.createVNode(e.unref(i),{modelValue:n.label,"onUpdate:modelValue":s=>n.label=s,filterable:"","allow-create":"",style:{width:"42%"},options:y,placeholder:e.unref(r)("paramName")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e.createVNode(e.unref(i),{modelValue:n.value,"onUpdate:modelValue":s=>n.value=s,filterable:"","allow-create":"",style:{width:"42%"},options:y,placeholder:e.unref(r)("paramValue")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e.createVNode(e.unref(c),{onClick:s=>K(b),type:"danger",circle:""},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{style:{color:"#fff"},name:"icon--epic--delete-outline-rounded"})]),_:2},1032,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ue,[e.createElementVNode("div",de,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("requestHeaders")),1),e.createVNode(e.unref(c),{onClick:R,text:"",type:"primary",class:"btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{name:"icon--epic--add-rounded"}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("add")),1)]),_:1})]),(p=a.value)!=null&&p.headerList&&((d=a.value)!=null&&d.headerList.length)?(e.openBlock(),e.createElementBlock("div",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.headerList,(n,b)=>(e.openBlock(),e.createElementBlock("div",{class:"content-item",key:b},[e.createVNode(e.unref(i),{modelValue:n.label,"onUpdate:modelValue":s=>n.label=s,filterable:"","allow-create":"",style:{width:"42%"},options:y,placeholder:e.unref(r)("paramName")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e.createVNode(e.unref(i),{modelValue:n.value,"onUpdate:modelValue":s=>n.value=s,filterable:"","allow-create":"",style:{width:"42%"},options:y,placeholder:e.unref(r)("paramValue")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e.createVNode(e.unref(c),{onClick:s=>j(b),type:"danger",circle:""},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{style:{color:"#fff"},name:"icon--epic--delete-outline-rounded"})]),_:2},1032,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ie,[e.createElementVNode("div",ce,[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)("requestBody")),1),e.createVNode(e.unref(c),{onClick:A,text:"",type:"primary",class:"btn"},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{name:"icon--epic--add-rounded"}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("add")),1)]),_:1})]),(N=a.value)!=null&&N.bodyList&&((V=a.value)!=null&&V.bodyList.length)?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.bodyList,(n,b)=>(e.openBlock(),e.createElementBlock("div",{class:"content-item",key:b},[e.createVNode(e.unref(i),{modelValue:n.label,"onUpdate:modelValue":s=>n.label=s,filterable:"","allow-create":"",style:{width:"42%"},options:y,placeholder:e.unref(r)("paramName")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e.createVNode(e.unref(i),{modelValue:n.value,"onUpdate:modelValue":s=>n.value=s,filterable:"","allow-create":"",style:{width:"42%"},options:y,placeholder:e.unref(r)("paramValue")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e.createVNode(e.unref(c),{onClick:t[6]||(t[6]=s=>$(l.i)),type:"danger",circle:""},{default:e.withCtx(()=>[e.createVNode(e.unref(f._sfc_main),{style:{color:"#fff"},name:"icon--epic--delete-outline-rounded"})]),_:1})]))),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",pe,[e.createVNode(e.unref(c),{type:"info",onClick:G},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("requestTest")),1)]),_:1}),e.createVNode(e.unref(c),{type:"primary",onClick:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("save")),1)]),_:1})])]}),_:1},8,["model","rules"])]))])])])]),_:1},8,["modelValue","title"])]))}});exports.default=fe;
|