@agentprismform/render-vue 1.3.0 → 1.3.1
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/index.cjs +1 -1
- package/dist/index.mjs +665 -649
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/src/components/PrismForm.vue +35 -1
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as U, ref as
|
|
2
|
-
import { FormCore as
|
|
3
|
-
import { resolveLabelPosition as
|
|
4
|
-
import { createFetchHostHandlers as
|
|
5
|
-
import { FORM_UI_HOST_HANDLERS_KEY as ue, normalizeModernLocale as
|
|
6
|
-
import { completeTask as
|
|
7
|
-
import { setTaskHandlers as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as U, ref as P, watch as ee, computed as b, openBlock as s, createElementBlock as i, createCommentVNode as x, createElementVNode as l, normalizeClass as q, toDisplayString as $, createVNode as se, Transition as ie, withCtx as le, withModifiers as ne, Fragment as z, renderList as J, createBlock as te, Teleport as Pe, normalizeStyle as re, createTextVNode as Q, withDirectives as Ee, vModelText as Fe, useCssVars as Re, nextTick as De, resolveDynamicComponent as ce, inject as ae, onBeforeUnmount as Ne, unref as oe, provide as W, renderSlot as be, shallowRef as Le, reactive as _e, onUnmounted as Ce, mergeProps as je, getCurrentInstance as Be } from "vue";
|
|
2
|
+
import { FormCore as ye } from "@agentprismform/core";
|
|
3
|
+
import { resolveLabelPosition as Ke, createFormRenderState as $e } from "@agentprismform/render";
|
|
4
|
+
import { createFetchHostHandlers as Cn } from "@agentprismform/render";
|
|
5
|
+
import { FORM_UI_HOST_HANDLERS_KEY as ue, normalizeModernLocale as qe, resolveModernThemeVars as Ue, getModernShellComponents as He, MODERN_SHELL_SKIN_KEY as Ye, MODERN_THEME_OVERRIDE_KEY as ze, MODERN_COLLAPSIBLE_KEY as Ge, MODERN_KEYBOARD_POLICY_KEY as We, MODERN_READONLY_KEY as Je, MODERN_TELEMETRY_KEY as Xe, MODERN_LOCALE_KEY as Qe, MODERN_CUSTOM_CONTROLS_KEY as Ze, computeFormProgress as et } from "@agentprismform/render-ui";
|
|
6
|
+
import { completeTask as Z, getTaskHandlers as tt, classifyTask as lt, resolveTaskByKey as Te } from "@agentprismform/render-task";
|
|
7
|
+
import { setTaskHandlers as Tn } from "@agentprismform/render-task";
|
|
8
|
+
const at = { class: "ctrl-input-wrapper" }, nt = ["value", "placeholder", "disabled", "maxlength"], ot = ["type", "value", "placeholder", "disabled", "maxlength"], st = /* @__PURE__ */ U({
|
|
9
9
|
__name: "InputControl",
|
|
10
10
|
props: {
|
|
11
11
|
item: {},
|
|
@@ -15,8 +15,8 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
15
15
|
emits: ["change"],
|
|
16
16
|
setup(t, { emit: n }) {
|
|
17
17
|
var g;
|
|
18
|
-
const e = t, r = n, f =
|
|
19
|
-
|
|
18
|
+
const e = t, r = n, f = P(((g = e.field) == null ? void 0 : g.value) || "");
|
|
19
|
+
ee(() => {
|
|
20
20
|
var a;
|
|
21
21
|
return (a = e.field) == null ? void 0 : a.value;
|
|
22
22
|
}, (a) => {
|
|
@@ -33,8 +33,8 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
33
33
|
f.value = c, r("change", { value: c, eventType: "inputBlur" });
|
|
34
34
|
}
|
|
35
35
|
return (a, o) => {
|
|
36
|
-
var c, y,
|
|
37
|
-
return s(), i("div",
|
|
36
|
+
var c, y, O, d, T;
|
|
37
|
+
return s(), i("div", at, [
|
|
38
38
|
p.value ? (s(), i("textarea", {
|
|
39
39
|
key: 0,
|
|
40
40
|
class: "ctrl-input ctrl-textarea",
|
|
@@ -45,17 +45,17 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
45
45
|
rows: "3",
|
|
46
46
|
onInput: m,
|
|
47
47
|
onBlur: h
|
|
48
|
-
}, null, 40,
|
|
48
|
+
}, null, 40, nt)) : (s(), i("input", {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "ctrl-input",
|
|
51
51
|
type: t.item.type === "number" ? "number" : t.item.type === "phone" ? "tel" : "text",
|
|
52
52
|
value: f.value,
|
|
53
53
|
placeholder: t.item.placeholder || "请输入",
|
|
54
|
-
disabled: (
|
|
55
|
-
maxlength: (
|
|
54
|
+
disabled: (O = t.field) == null ? void 0 : O.disabled,
|
|
55
|
+
maxlength: (d = t.item.props) == null ? void 0 : d.maxlength,
|
|
56
56
|
onInput: m,
|
|
57
57
|
onBlur: h
|
|
58
|
-
}, null, 40,
|
|
58
|
+
}, null, 40, ot)),
|
|
59
59
|
(T = t.item.props) != null && T.guideText ? (s(), i("span", {
|
|
60
60
|
key: 2,
|
|
61
61
|
class: "ctrl-guide",
|
|
@@ -64,15 +64,15 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
64
64
|
]);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
}),
|
|
67
|
+
}), H = (t, n) => {
|
|
68
68
|
const e = t.__vccOpts || t;
|
|
69
69
|
for (const [r, f] of n)
|
|
70
70
|
e[r] = f;
|
|
71
71
|
return e;
|
|
72
|
-
},
|
|
72
|
+
}, it = /* @__PURE__ */ H(st, [["__scopeId", "data-v-c8af62aa"]]), rt = { class: "ctrl-select" }, ct = { class: "panel-header" }, ut = { class: "panel-title" }, dt = {
|
|
73
73
|
class: "panel-body",
|
|
74
74
|
role: "listbox"
|
|
75
|
-
},
|
|
75
|
+
}, vt = ["aria-selected", "onClick"], ft = { class: "option-text" }, mt = /* @__PURE__ */ U({
|
|
76
76
|
__name: "SelectControl",
|
|
77
77
|
props: {
|
|
78
78
|
item: {},
|
|
@@ -81,9 +81,9 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
81
81
|
},
|
|
82
82
|
emits: ["change"],
|
|
83
83
|
setup(t, { emit: n }) {
|
|
84
|
-
const e = t, r = n, f =
|
|
85
|
-
var
|
|
86
|
-
const c = ((
|
|
84
|
+
const e = t, r = n, f = P(!1), p = b(() => {
|
|
85
|
+
var O, d;
|
|
86
|
+
const c = ((O = e.item) == null ? void 0 : O.initOptions) || [], y = (d = e.field) == null ? void 0 : d.value;
|
|
87
87
|
return y ? c.map((T) => {
|
|
88
88
|
var A;
|
|
89
89
|
return {
|
|
@@ -92,9 +92,9 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
92
92
|
};
|
|
93
93
|
}) : c;
|
|
94
94
|
}), m = b(() => {
|
|
95
|
-
var y,
|
|
95
|
+
var y, O;
|
|
96
96
|
const c = (y = e.field) == null ? void 0 : y.value;
|
|
97
|
-
return c ? typeof c == "object" && c.name ? c.name : (
|
|
97
|
+
return c ? typeof c == "object" && c.name ? c.name : (O = e.field) != null && O.showValue ? e.field.showValue : String(c) : "";
|
|
98
98
|
}), h = b(() => {
|
|
99
99
|
var c;
|
|
100
100
|
return ((c = e.item.props) == null ? void 0 : c.dialogTitle) || "请选择";
|
|
@@ -107,17 +107,17 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
107
107
|
f.value = !1;
|
|
108
108
|
}
|
|
109
109
|
function o(c) {
|
|
110
|
-
var
|
|
111
|
-
((
|
|
110
|
+
var O;
|
|
111
|
+
((O = e.item.props) == null ? void 0 : O.isSingle) !== !1 && (r("change", { value: { code: c.code, name: c.name }, eventType: "pickChange" }), f.value = !1);
|
|
112
112
|
}
|
|
113
113
|
return (c, y) => {
|
|
114
|
-
var
|
|
115
|
-
return s(), i("div",
|
|
114
|
+
var O;
|
|
115
|
+
return s(), i("div", rt, [
|
|
116
116
|
x(" 触发器 "),
|
|
117
117
|
l(
|
|
118
118
|
"div",
|
|
119
119
|
{
|
|
120
|
-
class:
|
|
120
|
+
class: q(["select-trigger", { disabled: (O = t.field) == null ? void 0 : O.disabled, placeholder: !m.value }]),
|
|
121
121
|
onClick: g
|
|
122
122
|
},
|
|
123
123
|
[
|
|
@@ -134,7 +134,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
134
134
|
),
|
|
135
135
|
x(" 遮罩 + 底部弹窗 "),
|
|
136
136
|
se(ie, { name: "panel" }, {
|
|
137
|
-
default:
|
|
137
|
+
default: le(() => [
|
|
138
138
|
f.value ? (s(), i("div", {
|
|
139
139
|
key: 0,
|
|
140
140
|
class: "select-overlay",
|
|
@@ -144,14 +144,14 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
144
144
|
class: "select-panel",
|
|
145
145
|
role: "dialog",
|
|
146
146
|
"aria-label": "选择选项",
|
|
147
|
-
onClick: y[0] || (y[0] =
|
|
147
|
+
onClick: y[0] || (y[0] = ne(() => {
|
|
148
148
|
}, ["stop"]))
|
|
149
149
|
}, [
|
|
150
150
|
x(" 头部 "),
|
|
151
|
-
l("div",
|
|
151
|
+
l("div", ct, [
|
|
152
152
|
l(
|
|
153
153
|
"span",
|
|
154
|
-
|
|
154
|
+
ut,
|
|
155
155
|
$(h.value),
|
|
156
156
|
1
|
|
157
157
|
/* TEXT */
|
|
@@ -163,34 +163,34 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
163
163
|
}, "×")
|
|
164
164
|
]),
|
|
165
165
|
x(" 选项列表 "),
|
|
166
|
-
l("div",
|
|
166
|
+
l("div", dt, [
|
|
167
167
|
(s(!0), i(
|
|
168
|
-
|
|
168
|
+
z,
|
|
169
169
|
null,
|
|
170
|
-
|
|
171
|
-
key:
|
|
172
|
-
class:
|
|
170
|
+
J(p.value, (d) => (s(), i("div", {
|
|
171
|
+
key: d.code,
|
|
172
|
+
class: q(["option-card", { "option-selected": d._selected }]),
|
|
173
173
|
role: "option",
|
|
174
|
-
"aria-selected":
|
|
175
|
-
onClick: (T) => o(
|
|
174
|
+
"aria-selected": d._selected,
|
|
175
|
+
onClick: (T) => o(d)
|
|
176
176
|
}, [
|
|
177
177
|
l(
|
|
178
178
|
"span",
|
|
179
|
-
|
|
180
|
-
$(
|
|
179
|
+
ft,
|
|
180
|
+
$(d.name),
|
|
181
181
|
1
|
|
182
182
|
/* TEXT */
|
|
183
183
|
),
|
|
184
184
|
l(
|
|
185
185
|
"span",
|
|
186
186
|
{
|
|
187
|
-
class:
|
|
187
|
+
class: q(["option-btn", { "option-btn-selected": d._selected }])
|
|
188
188
|
},
|
|
189
|
-
$(
|
|
189
|
+
$(d._selected ? "✓ 已选" : "选择"),
|
|
190
190
|
3
|
|
191
191
|
/* TEXT, CLASS */
|
|
192
192
|
)
|
|
193
|
-
], 10,
|
|
193
|
+
], 10, vt))),
|
|
194
194
|
128
|
|
195
195
|
/* KEYED_FRAGMENT */
|
|
196
196
|
))
|
|
@@ -212,19 +212,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
212
212
|
]);
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
}),
|
|
215
|
+
}), pt = /* @__PURE__ */ H(mt, [["__scopeId", "data-v-352c2c2f"]]), ht = { class: "ctrl-cascader" }, gt = ["aria-label"], yt = { class: "panel-header" }, kt = { class: "panel-title" }, bt = {
|
|
216
216
|
key: 0,
|
|
217
217
|
class: "panel-path"
|
|
218
|
-
},
|
|
218
|
+
}, _t = {
|
|
219
219
|
class: "panel-body",
|
|
220
220
|
role: "listbox"
|
|
221
|
-
},
|
|
221
|
+
}, Ct = ["onClick"], $t = { class: "option-text" }, Tt = {
|
|
222
222
|
key: 0,
|
|
223
223
|
class: "option-arrow"
|
|
224
|
-
},
|
|
224
|
+
}, wt = {
|
|
225
225
|
key: 0,
|
|
226
226
|
class: "option-empty"
|
|
227
|
-
},
|
|
227
|
+
}, St = /* @__PURE__ */ U({
|
|
228
228
|
__name: "CascaderControl",
|
|
229
229
|
props: {
|
|
230
230
|
item: {},
|
|
@@ -233,59 +233,59 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
233
233
|
},
|
|
234
234
|
emits: ["change"],
|
|
235
235
|
setup(t, { emit: n }) {
|
|
236
|
-
const e = t, r = n, f =
|
|
237
|
-
var
|
|
238
|
-
return ((
|
|
236
|
+
const e = t, r = n, f = P(!1), p = P([]), m = b(() => {
|
|
237
|
+
var d;
|
|
238
|
+
return ((d = e.item) == null ? void 0 : d.initOptions) || [];
|
|
239
239
|
}), h = b(() => {
|
|
240
|
-
var
|
|
241
|
-
return p.value.length === 0 ? m.value : ((
|
|
240
|
+
var d;
|
|
241
|
+
return p.value.length === 0 ? m.value : ((d = p.value[p.value.length - 1]) == null ? void 0 : d.child) || [];
|
|
242
242
|
}), g = b(() => {
|
|
243
243
|
var T, A;
|
|
244
|
-
const
|
|
245
|
-
if (!
|
|
246
|
-
if (typeof
|
|
247
|
-
if (Array.isArray(
|
|
248
|
-
if (
|
|
249
|
-
if (
|
|
244
|
+
const d = (T = e.field) == null ? void 0 : T.value;
|
|
245
|
+
if (!d) return "";
|
|
246
|
+
if (typeof d == "object" && d !== null) {
|
|
247
|
+
if (Array.isArray(d.pathNames)) return d.pathNames.join(" / ");
|
|
248
|
+
if (d.name) return String(d.name);
|
|
249
|
+
if (d.showValue) return String(d.showValue);
|
|
250
250
|
}
|
|
251
|
-
return (A = e.field) != null && A.showValue ? String(e.field.showValue) : String(
|
|
251
|
+
return (A = e.field) != null && A.showValue ? String(e.field.showValue) : String(d);
|
|
252
252
|
}), a = b(() => {
|
|
253
|
-
var
|
|
254
|
-
return ((
|
|
253
|
+
var d;
|
|
254
|
+
return ((d = e.item.props) == null ? void 0 : d.dialogTitle) || e.item.label || "请选择";
|
|
255
255
|
});
|
|
256
256
|
function o() {
|
|
257
|
-
var
|
|
258
|
-
(
|
|
257
|
+
var d;
|
|
258
|
+
(d = e.field) != null && d.disabled || (p.value = [], f.value = !0);
|
|
259
259
|
}
|
|
260
260
|
function c() {
|
|
261
261
|
f.value = !1;
|
|
262
262
|
}
|
|
263
|
-
function y(
|
|
264
|
-
const T = [...p.value,
|
|
265
|
-
if (
|
|
263
|
+
function y(d) {
|
|
264
|
+
const T = [...p.value, d];
|
|
265
|
+
if (d.child && d.child.length > 0) {
|
|
266
266
|
p.value = T;
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
269
|
r("change", {
|
|
270
270
|
value: {
|
|
271
|
-
code:
|
|
272
|
-
name:
|
|
271
|
+
code: d.code,
|
|
272
|
+
name: d.name,
|
|
273
273
|
pathCodes: T.map((A) => A.code),
|
|
274
274
|
pathNames: T.map((A) => A.name)
|
|
275
275
|
},
|
|
276
276
|
eventType: "pickChange"
|
|
277
277
|
}), f.value = !1;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function O() {
|
|
280
280
|
p.value = p.value.slice(0, -1);
|
|
281
281
|
}
|
|
282
|
-
return (
|
|
282
|
+
return (d, T) => {
|
|
283
283
|
var A;
|
|
284
|
-
return s(), i("div",
|
|
284
|
+
return s(), i("div", ht, [
|
|
285
285
|
l(
|
|
286
286
|
"div",
|
|
287
287
|
{
|
|
288
|
-
class:
|
|
288
|
+
class: q(["cascader-trigger", { disabled: (A = t.field) == null ? void 0 : A.disabled, placeholder: !g.value }]),
|
|
289
289
|
onClick: o
|
|
290
290
|
},
|
|
291
291
|
[
|
|
@@ -301,7 +301,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
301
301
|
/* CLASS */
|
|
302
302
|
),
|
|
303
303
|
se(ie, { name: "panel" }, {
|
|
304
|
-
default:
|
|
304
|
+
default: le(() => [
|
|
305
305
|
f.value ? (s(), i("div", {
|
|
306
306
|
key: 0,
|
|
307
307
|
class: "cascader-overlay",
|
|
@@ -311,20 +311,20 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
311
311
|
class: "cascader-panel",
|
|
312
312
|
role: "dialog",
|
|
313
313
|
"aria-label": a.value,
|
|
314
|
-
onClick: T[0] || (T[0] =
|
|
314
|
+
onClick: T[0] || (T[0] = ne(() => {
|
|
315
315
|
}, ["stop"]))
|
|
316
316
|
}, [
|
|
317
|
-
l("div",
|
|
317
|
+
l("div", yt, [
|
|
318
318
|
p.value.length ? (s(), i("button", {
|
|
319
319
|
key: 0,
|
|
320
320
|
type: "button",
|
|
321
321
|
class: "panel-back",
|
|
322
322
|
"aria-label": "返回上一级",
|
|
323
|
-
onClick:
|
|
323
|
+
onClick: O
|
|
324
324
|
}, " ‹ ")) : x("v-if", !0),
|
|
325
325
|
l(
|
|
326
326
|
"span",
|
|
327
|
-
|
|
327
|
+
kt,
|
|
328
328
|
$(a.value),
|
|
329
329
|
1
|
|
330
330
|
/* TEXT */
|
|
@@ -338,17 +338,17 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
338
338
|
]),
|
|
339
339
|
p.value.length ? (s(), i(
|
|
340
340
|
"div",
|
|
341
|
-
|
|
341
|
+
bt,
|
|
342
342
|
$(p.value.map((L) => L.name).join(" / ")),
|
|
343
343
|
1
|
|
344
344
|
/* TEXT */
|
|
345
345
|
)) : x("v-if", !0),
|
|
346
|
-
l("div",
|
|
346
|
+
l("div", _t, [
|
|
347
347
|
(s(!0), i(
|
|
348
|
-
|
|
348
|
+
z,
|
|
349
349
|
null,
|
|
350
|
-
|
|
351
|
-
var
|
|
350
|
+
J(h.value, (L) => {
|
|
351
|
+
var R;
|
|
352
352
|
return s(), i("div", {
|
|
353
353
|
key: L.code,
|
|
354
354
|
class: "option-card",
|
|
@@ -357,18 +357,18 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
357
357
|
}, [
|
|
358
358
|
l(
|
|
359
359
|
"span",
|
|
360
|
-
|
|
360
|
+
$t,
|
|
361
361
|
$(L.name),
|
|
362
362
|
1
|
|
363
363
|
/* TEXT */
|
|
364
364
|
),
|
|
365
|
-
(
|
|
366
|
-
], 8,
|
|
365
|
+
(R = L.child) != null && R.length ? (s(), i("span", Tt, "›")) : x("v-if", !0)
|
|
366
|
+
], 8, Ct);
|
|
367
367
|
}),
|
|
368
368
|
128
|
|
369
369
|
/* KEYED_FRAGMENT */
|
|
370
370
|
)),
|
|
371
|
-
h.value.length ? x("v-if", !0) : (s(), i("div",
|
|
371
|
+
h.value.length ? x("v-if", !0) : (s(), i("div", wt, "暂无选项"))
|
|
372
372
|
]),
|
|
373
373
|
T[1] || (T[1] = l(
|
|
374
374
|
"div",
|
|
@@ -377,7 +377,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
377
377
|
-1
|
|
378
378
|
/* CACHED */
|
|
379
379
|
))
|
|
380
|
-
], 8,
|
|
380
|
+
], 8, gt)
|
|
381
381
|
])) : x("v-if", !0)
|
|
382
382
|
]),
|
|
383
383
|
_: 1
|
|
@@ -386,16 +386,16 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
386
386
|
]);
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
|
-
}),
|
|
389
|
+
}), xt = /* @__PURE__ */ H(St, [["__scopeId", "data-v-a66f7439"]]), At = { class: "ctrl-search" }, It = ["value", "placeholder", "disabled"], Mt = {
|
|
390
390
|
key: 0,
|
|
391
391
|
class: "search-icon loading"
|
|
392
|
-
},
|
|
392
|
+
}, Ot = ["onClick"], Vt = { class: "result-name" }, Pt = {
|
|
393
393
|
key: 0,
|
|
394
394
|
class: "result-code"
|
|
395
|
-
},
|
|
395
|
+
}, Et = {
|
|
396
396
|
key: 0,
|
|
397
397
|
class: "search-hint"
|
|
398
|
-
},
|
|
398
|
+
}, Ft = /* @__PURE__ */ U({
|
|
399
399
|
__name: "SearchControl",
|
|
400
400
|
props: {
|
|
401
401
|
item: {},
|
|
@@ -404,11 +404,11 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
404
404
|
},
|
|
405
405
|
emits: ["change"],
|
|
406
406
|
setup(t, { emit: n }) {
|
|
407
|
-
const e = t, r = n, f =
|
|
407
|
+
const e = t, r = n, f = P(""), p = P([]), m = P(!1), h = P(!1), g = P(!1), a = b(() => {
|
|
408
408
|
var u;
|
|
409
409
|
return ((u = e.item.props) == null ? void 0 : u.searchApi) || "";
|
|
410
|
-
}), o =
|
|
411
|
-
|
|
410
|
+
}), o = P(null), c = P({});
|
|
411
|
+
ee(() => {
|
|
412
412
|
var u;
|
|
413
413
|
return (u = e.field) == null ? void 0 : u.value;
|
|
414
414
|
}, (u) => {
|
|
@@ -428,10 +428,10 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
428
428
|
width: `${u.width}px`
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
let
|
|
432
|
-
function
|
|
431
|
+
let O = null;
|
|
432
|
+
function d(u) {
|
|
433
433
|
const k = u.target;
|
|
434
|
-
f.value = k.value, g.value = !0,
|
|
434
|
+
f.value = k.value, g.value = !0, O && clearTimeout(O), O = setTimeout(() => {
|
|
435
435
|
f.value.trim() ? T(f.value.trim()) : (p.value = [], m.value = !1);
|
|
436
436
|
}, 200);
|
|
437
437
|
}
|
|
@@ -454,12 +454,12 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
454
454
|
function L() {
|
|
455
455
|
p.value.length > 0 && f.value && (y(), m.value = !0);
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function R() {
|
|
458
458
|
m.value = !1, p.value = [], g.value && r("change", { value: f.value.trim(), eventType: "inputBlur" }), g.value = !1;
|
|
459
459
|
}
|
|
460
460
|
return (u, k) => {
|
|
461
461
|
var V;
|
|
462
|
-
return s(), i("div",
|
|
462
|
+
return s(), i("div", At, [
|
|
463
463
|
l(
|
|
464
464
|
"div",
|
|
465
465
|
{
|
|
@@ -474,17 +474,17 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
474
474
|
value: f.value,
|
|
475
475
|
placeholder: t.item.placeholder || "请输入关键词搜索",
|
|
476
476
|
disabled: (V = t.field) == null ? void 0 : V.disabled,
|
|
477
|
-
onInput:
|
|
477
|
+
onInput: d,
|
|
478
478
|
onFocus: L,
|
|
479
|
-
onBlur:
|
|
480
|
-
}, null, 40,
|
|
481
|
-
h.value ? (s(), i("span",
|
|
479
|
+
onBlur: R
|
|
480
|
+
}, null, 40, It),
|
|
481
|
+
h.value ? (s(), i("span", Mt, "⏳")) : x("v-if", !0)
|
|
482
482
|
],
|
|
483
483
|
512
|
|
484
484
|
/* NEED_PATCH */
|
|
485
485
|
),
|
|
486
486
|
x(" 下拉结果列表 — Teleport 到 body,fixed 定位避免被父容器裁剪 "),
|
|
487
|
-
(s(),
|
|
487
|
+
(s(), te(Pe, { to: "body" }, [
|
|
488
488
|
m.value && p.value.length > 0 ? (s(), i(
|
|
489
489
|
"div",
|
|
490
490
|
{
|
|
@@ -494,30 +494,30 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
494
494
|
},
|
|
495
495
|
[
|
|
496
496
|
(s(!0), i(
|
|
497
|
-
|
|
497
|
+
z,
|
|
498
498
|
null,
|
|
499
|
-
|
|
500
|
-
key:
|
|
499
|
+
J(p.value, (v) => (s(), i("div", {
|
|
500
|
+
key: v.code,
|
|
501
501
|
class: "search-result-item",
|
|
502
|
-
onMousedown: k[0] || (k[0] =
|
|
502
|
+
onMousedown: k[0] || (k[0] = ne(() => {
|
|
503
503
|
}, ["prevent"])),
|
|
504
|
-
onClick: (_) => A(
|
|
504
|
+
onClick: (_) => A(v)
|
|
505
505
|
}, [
|
|
506
506
|
l(
|
|
507
507
|
"span",
|
|
508
|
-
|
|
509
|
-
$(
|
|
508
|
+
Vt,
|
|
509
|
+
$(v.name),
|
|
510
510
|
1
|
|
511
511
|
/* TEXT */
|
|
512
512
|
),
|
|
513
|
-
|
|
513
|
+
v.code ? (s(), i(
|
|
514
514
|
"span",
|
|
515
|
-
|
|
516
|
-
$(
|
|
515
|
+
Pt,
|
|
516
|
+
$(v.code),
|
|
517
517
|
1
|
|
518
518
|
/* TEXT */
|
|
519
519
|
)) : x("v-if", !0)
|
|
520
|
-
], 40,
|
|
520
|
+
], 40, Ot))),
|
|
521
521
|
128
|
|
522
522
|
/* KEYED_FRAGMENT */
|
|
523
523
|
))
|
|
@@ -526,20 +526,20 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
526
526
|
/* STYLE */
|
|
527
527
|
)) : x("v-if", !0)
|
|
528
528
|
])),
|
|
529
|
-
a.value ? x("v-if", !0) : (s(), i("div",
|
|
529
|
+
a.value ? x("v-if", !0) : (s(), i("div", Et, " ⚠ 未配置 searchApi "))
|
|
530
530
|
]);
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
|
-
}),
|
|
533
|
+
}), Rt = /* @__PURE__ */ H(Ft, [["__scopeId", "data-v-1e915735"]]), Dt = { class: "ctrl-address" }, Nt = { class: "addr-hd" }, Lt = { class: "addr-crumbs" }, jt = ["onClick"], Bt = { class: "addr-body" }, Kt = {
|
|
534
534
|
key: 0,
|
|
535
535
|
class: "addr-loading"
|
|
536
|
-
},
|
|
536
|
+
}, qt = ["onClick"], Ut = {
|
|
537
537
|
key: 0,
|
|
538
538
|
class: "addr-check"
|
|
539
|
-
},
|
|
539
|
+
}, Ht = {
|
|
540
540
|
key: 1,
|
|
541
541
|
class: "addr-empty"
|
|
542
|
-
},
|
|
542
|
+
}, Yt = /* @__PURE__ */ U({
|
|
543
543
|
__name: "AddressControl",
|
|
544
544
|
props: {
|
|
545
545
|
item: {},
|
|
@@ -550,43 +550,43 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
550
550
|
emits: ["change"],
|
|
551
551
|
setup(t, { emit: n }) {
|
|
552
552
|
const e = t, r = n, f = b(() => {
|
|
553
|
-
var
|
|
554
|
-
return ((_ = (
|
|
553
|
+
var v, _;
|
|
554
|
+
return ((_ = (v = e.item) == null ? void 0 : v.props) == null ? void 0 : _.linkageUrl) || "service/geo_code";
|
|
555
555
|
}), p = b(() => {
|
|
556
|
-
var
|
|
557
|
-
return ((_ = (
|
|
558
|
-
}), m =
|
|
556
|
+
var v, _;
|
|
557
|
+
return ((_ = (v = e.item) == null ? void 0 : v.props) == null ? void 0 : _.mapLevel) || 3;
|
|
558
|
+
}), m = P(!1), h = P(0), g = P(!1), a = P(!1), o = P([]), c = P([{ adcode: "", name: "请选择" }]), y = /* @__PURE__ */ new Map(), O = b(() => {
|
|
559
559
|
var _, I, w;
|
|
560
|
-
const
|
|
561
|
-
if (Array.isArray(
|
|
560
|
+
const v = (_ = e.field) == null ? void 0 : _.value;
|
|
561
|
+
if (Array.isArray(v) && v.length) return v.map((M) => M.name).join("");
|
|
562
562
|
if ((I = e.field) != null && I.showValue) return e.field.showValue;
|
|
563
|
-
if (
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
563
|
+
if (v && typeof v == "object") {
|
|
564
|
+
const M = [v.province, v.city, v.country].filter(Boolean);
|
|
565
|
+
if (M.length) return M.join("");
|
|
566
566
|
}
|
|
567
|
-
return (w = e.field) != null && w.province ? [e.field.province, e.field.city, e.field.country].filter(Boolean).join("") : typeof
|
|
568
|
-
}),
|
|
567
|
+
return (w = e.field) != null && w.province ? [e.field.province, e.field.city, e.field.country].filter(Boolean).join("") : typeof v == "string" && v ? v : "";
|
|
568
|
+
}), d = b(() => c.value.slice(0, p.value));
|
|
569
569
|
function T() {
|
|
570
|
-
var
|
|
571
|
-
return e.onFetchLinkage ? e.onFetchLinkage : (
|
|
570
|
+
var v;
|
|
571
|
+
return e.onFetchLinkage ? e.onFetchLinkage : (v = e.formCore) != null && v._linkageFetcher ? e.formCore._linkageFetcher : async () => ({ data: [] });
|
|
572
572
|
}
|
|
573
|
-
async function A(
|
|
574
|
-
var
|
|
573
|
+
async function A(v) {
|
|
574
|
+
var M, S, C;
|
|
575
575
|
g.value = !0;
|
|
576
576
|
const _ = T(), I = c.value.filter((j) => j.adcode), w = {
|
|
577
|
-
province_code: ((
|
|
577
|
+
province_code: ((M = I[0]) == null ? void 0 : M.adcode) || "",
|
|
578
578
|
city_code: ((S = I[1]) == null ? void 0 : S.adcode) || "",
|
|
579
579
|
district_code: ((C = I[2]) == null ? void 0 : C.adcode) || ""
|
|
580
580
|
};
|
|
581
581
|
try {
|
|
582
582
|
const j = await _(w, f.value);
|
|
583
583
|
if (j.data === null) {
|
|
584
|
-
c.value = c.value.filter((
|
|
584
|
+
c.value = c.value.filter((K) => K.adcode), a.value = !0, g.value = !1, V();
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
587
|
o.value = j.data || [];
|
|
588
|
-
const
|
|
589
|
-
o.value.length > 0 && y.set(
|
|
588
|
+
const G = v || w.district_code || w.city_code || w.province_code || "root";
|
|
589
|
+
o.value.length > 0 && y.set(G, o.value);
|
|
590
590
|
} catch {
|
|
591
591
|
} finally {
|
|
592
592
|
g.value = !1;
|
|
@@ -596,19 +596,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
596
596
|
var I, w;
|
|
597
597
|
if ((I = e.field) != null && I.disabled) return;
|
|
598
598
|
h.value = 0;
|
|
599
|
-
const
|
|
600
|
-
Array.isArray(
|
|
599
|
+
const v = (w = e.field) == null ? void 0 : w.value;
|
|
600
|
+
Array.isArray(v) && v.length && v[0].code ? (c.value = v.map((M) => ({ adcode: M.code, name: M.name })), a.value = c.value.length >= 2) : (c.value = [{ adcode: "", name: "请选择" }], a.value = !1), m.value = !0;
|
|
601
601
|
const _ = y.get("root");
|
|
602
602
|
_ ? o.value = _ : A("root");
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function R() {
|
|
605
605
|
m.value = !1;
|
|
606
606
|
}
|
|
607
|
-
function u(
|
|
608
|
-
if (g.value || !
|
|
607
|
+
function u(v) {
|
|
608
|
+
if (g.value || !v.adcode) return;
|
|
609
609
|
const _ = { 71e4: 1, 81e4: 2, 82e4: 2 }, I = [...c.value];
|
|
610
|
-
|
|
611
|
-
const w = _[
|
|
610
|
+
v.brother = o.value, I[h.value] = v;
|
|
611
|
+
const w = _[v.adcode];
|
|
612
612
|
if (w !== void 0) {
|
|
613
613
|
I.splice(w, I.length - w), c.value = I.filter((C) => C.adcode), a.value = !0, V();
|
|
614
614
|
return;
|
|
@@ -617,49 +617,49 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
617
617
|
a.value = !0, V();
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
|
-
const S = y.get(
|
|
621
|
-
S ? o.value = S : A(
|
|
620
|
+
const S = y.get(v.adcode);
|
|
621
|
+
S ? o.value = S : A(v.adcode);
|
|
622
622
|
}
|
|
623
|
-
function k(
|
|
623
|
+
function k(v) {
|
|
624
624
|
var w;
|
|
625
|
-
h.value =
|
|
626
|
-
const _ = c.value.slice(0,
|
|
627
|
-
_[
|
|
628
|
-
const I = c.value[
|
|
625
|
+
h.value = v, a.value = !1;
|
|
626
|
+
const _ = c.value.slice(0, v + 1);
|
|
627
|
+
_[v].adcode || (_[v] = { adcode: "", name: "请选择" }), c.value = _;
|
|
628
|
+
const I = c.value[v];
|
|
629
629
|
if (I.adcode && I.brother)
|
|
630
630
|
o.value = I.brother;
|
|
631
631
|
else {
|
|
632
|
-
const
|
|
633
|
-
S ? o.value = S : A(
|
|
632
|
+
const M = v > 0 ? (w = c.value[v - 1]) == null ? void 0 : w.adcode : "root", S = y.get(M);
|
|
633
|
+
S ? o.value = S : A(M);
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
function V() {
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
639
|
-
const _ =
|
|
640
|
-
_.forEach((w,
|
|
641
|
-
I.showValue += w.name,
|
|
637
|
+
const v = c.value.filter((w) => w.adcode);
|
|
638
|
+
if (v.length === 0) return;
|
|
639
|
+
const _ = v.map((w) => ({ code: w.adcode, name: w.name })), I = { showValue: "" };
|
|
640
|
+
_.forEach((w, M) => {
|
|
641
|
+
I.showValue += w.name, M === 0 && (I.province_code = w.code, I.province = w.name), M === 1 && (I.city_code = w.code, I.city = w.name), M === 2 && (I.country_code = w.code, I.country = w.name);
|
|
642
642
|
}), r("change", { value: _, eventType: "pickChange", ...I }), m.value = !1;
|
|
643
643
|
}
|
|
644
|
-
return
|
|
645
|
-
var
|
|
646
|
-
return (
|
|
647
|
-
}, (
|
|
648
|
-
!m.value && Array.isArray(
|
|
649
|
-
}), (
|
|
644
|
+
return ee(() => {
|
|
645
|
+
var v;
|
|
646
|
+
return (v = e.field) == null ? void 0 : v.value;
|
|
647
|
+
}, (v) => {
|
|
648
|
+
!m.value && Array.isArray(v) && v.length && (c.value = v.map((_) => ({ adcode: _.code, name: _.name })));
|
|
649
|
+
}), (v, _) => {
|
|
650
650
|
var I;
|
|
651
|
-
return s(), i("div",
|
|
651
|
+
return s(), i("div", Dt, [
|
|
652
652
|
l(
|
|
653
653
|
"div",
|
|
654
654
|
{
|
|
655
|
-
class:
|
|
655
|
+
class: q(["address-trigger", { disabled: (I = t.field) == null ? void 0 : I.disabled, placeholder: !O.value }]),
|
|
656
656
|
onClick: L
|
|
657
657
|
},
|
|
658
658
|
[
|
|
659
659
|
l(
|
|
660
660
|
"span",
|
|
661
661
|
null,
|
|
662
|
-
$(
|
|
662
|
+
$(O.value || t.item.placeholder || "请选择省市区"),
|
|
663
663
|
1
|
|
664
664
|
/* TEXT */
|
|
665
665
|
)
|
|
@@ -668,24 +668,24 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
668
668
|
/* CLASS */
|
|
669
669
|
),
|
|
670
670
|
se(ie, { name: "addr-fade" }, {
|
|
671
|
-
default:
|
|
671
|
+
default: le(() => [
|
|
672
672
|
m.value ? (s(), i("div", {
|
|
673
673
|
key: 0,
|
|
674
674
|
class: "addr-mask",
|
|
675
|
-
onClick:
|
|
675
|
+
onClick: R
|
|
676
676
|
}, [
|
|
677
677
|
se(ie, { name: "addr-slide" }, {
|
|
678
|
-
default:
|
|
678
|
+
default: le(() => [
|
|
679
679
|
m.value ? (s(), i("div", {
|
|
680
680
|
key: 0,
|
|
681
681
|
class: "addr-panel",
|
|
682
|
-
onClick: _[1] || (_[1] =
|
|
682
|
+
onClick: _[1] || (_[1] = ne(() => {
|
|
683
683
|
}, ["stop"]))
|
|
684
684
|
}, [
|
|
685
|
-
l("div",
|
|
685
|
+
l("div", Nt, [
|
|
686
686
|
l("span", {
|
|
687
687
|
class: "addr-hd-cancel",
|
|
688
|
-
onClick:
|
|
688
|
+
onClick: R
|
|
689
689
|
}, "取消"),
|
|
690
690
|
_[2] || (_[2] = l(
|
|
691
691
|
"span",
|
|
@@ -697,7 +697,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
697
697
|
l(
|
|
698
698
|
"span",
|
|
699
699
|
{
|
|
700
|
-
class:
|
|
700
|
+
class: q(["addr-hd-ok", { on: a.value }]),
|
|
701
701
|
onClick: _[0] || (_[0] = (w) => a.value ? V() : null)
|
|
702
702
|
},
|
|
703
703
|
"确定",
|
|
@@ -705,32 +705,32 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
705
705
|
/* CLASS */
|
|
706
706
|
)
|
|
707
707
|
]),
|
|
708
|
-
l("div",
|
|
708
|
+
l("div", Lt, [
|
|
709
709
|
(s(!0), i(
|
|
710
|
-
|
|
710
|
+
z,
|
|
711
711
|
null,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
{ key:
|
|
712
|
+
J(d.value, (w, M) => (s(), i(
|
|
713
|
+
z,
|
|
714
|
+
{ key: M },
|
|
715
715
|
[
|
|
716
716
|
l(
|
|
717
717
|
"span",
|
|
718
718
|
{
|
|
719
|
-
class:
|
|
719
|
+
class: q(["addr-dot", { cur: M === h.value, done: !!w.adcode && M < h.value }])
|
|
720
720
|
},
|
|
721
721
|
null,
|
|
722
722
|
2
|
|
723
723
|
/* CLASS */
|
|
724
724
|
),
|
|
725
725
|
l("span", {
|
|
726
|
-
class:
|
|
727
|
-
onClick: (S) => w.adcode ? k(
|
|
728
|
-
}, $(w.adcode ? w.name : "请选择"), 11,
|
|
729
|
-
|
|
726
|
+
class: q(["addr-label", { cur: M === h.value, done: !!w.adcode }]),
|
|
727
|
+
onClick: (S) => w.adcode ? k(M) : null
|
|
728
|
+
}, $(w.adcode ? w.name : "请选择"), 11, jt),
|
|
729
|
+
M < d.value.length - 1 ? (s(), i(
|
|
730
730
|
"span",
|
|
731
731
|
{
|
|
732
732
|
key: 0,
|
|
733
|
-
class:
|
|
733
|
+
class: q(["addr-line", { done: !!w.adcode && M < h.value }])
|
|
734
734
|
},
|
|
735
735
|
null,
|
|
736
736
|
2
|
|
@@ -744,8 +744,8 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
744
744
|
/* KEYED_FRAGMENT */
|
|
745
745
|
))
|
|
746
746
|
]),
|
|
747
|
-
l("div",
|
|
748
|
-
g.value ? (s(), i("div",
|
|
747
|
+
l("div", Bt, [
|
|
748
|
+
g.value ? (s(), i("div", Kt, [..._[3] || (_[3] = [
|
|
749
749
|
l(
|
|
750
750
|
"span",
|
|
751
751
|
{ class: "addr-spinner" },
|
|
@@ -753,20 +753,20 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
753
753
|
-1
|
|
754
754
|
/* CACHED */
|
|
755
755
|
),
|
|
756
|
-
|
|
756
|
+
Q(
|
|
757
757
|
"加载中...",
|
|
758
758
|
-1
|
|
759
759
|
/* CACHED */
|
|
760
760
|
)
|
|
761
761
|
])])) : x("v-if", !0),
|
|
762
762
|
(s(!0), i(
|
|
763
|
-
|
|
763
|
+
z,
|
|
764
764
|
null,
|
|
765
|
-
|
|
766
|
-
var
|
|
765
|
+
J(o.value, (w) => {
|
|
766
|
+
var M, S;
|
|
767
767
|
return s(), i("div", {
|
|
768
768
|
key: w.adcode,
|
|
769
|
-
class:
|
|
769
|
+
class: q(["addr-item", { sel: ((M = c.value[h.value]) == null ? void 0 : M.adcode) === w.adcode }]),
|
|
770
770
|
onClick: (C) => u(w)
|
|
771
771
|
}, [
|
|
772
772
|
l(
|
|
@@ -776,13 +776,13 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
776
776
|
1
|
|
777
777
|
/* TEXT */
|
|
778
778
|
),
|
|
779
|
-
((S = c.value[h.value]) == null ? void 0 : S.adcode) === w.adcode ? (s(), i("span",
|
|
780
|
-
], 10,
|
|
779
|
+
((S = c.value[h.value]) == null ? void 0 : S.adcode) === w.adcode ? (s(), i("span", Ut, "✓")) : x("v-if", !0)
|
|
780
|
+
], 10, qt);
|
|
781
781
|
}),
|
|
782
782
|
128
|
|
783
783
|
/* KEYED_FRAGMENT */
|
|
784
784
|
)),
|
|
785
|
-
!g.value && o.value.length === 0 ? (s(), i("div",
|
|
785
|
+
!g.value && o.value.length === 0 ? (s(), i("div", Ht, "暂无数据")) : x("v-if", !0)
|
|
786
786
|
]),
|
|
787
787
|
_[4] || (_[4] = l(
|
|
788
788
|
"div",
|
|
@@ -804,10 +804,10 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
804
804
|
]);
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
}),
|
|
807
|
+
}), zt = /* @__PURE__ */ H(Yt, [["__scopeId", "data-v-e9b83ac3"]]), Gt = { class: "ctrl-agreement" }, Wt = {
|
|
808
808
|
key: 0,
|
|
809
809
|
class: "check-mark"
|
|
810
|
-
},
|
|
810
|
+
}, Jt = { class: "agreement-text" }, Xt = /* @__PURE__ */ U({
|
|
811
811
|
__name: "AgreementControl",
|
|
812
812
|
props: {
|
|
813
813
|
item: {},
|
|
@@ -840,25 +840,25 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
840
840
|
}
|
|
841
841
|
return (a, o) => {
|
|
842
842
|
var c;
|
|
843
|
-
return s(), i("div",
|
|
843
|
+
return s(), i("div", Gt, [
|
|
844
844
|
l("label", {
|
|
845
845
|
class: "agreement-row",
|
|
846
|
-
onClick:
|
|
846
|
+
onClick: ne(g, ["prevent"])
|
|
847
847
|
}, [
|
|
848
848
|
l(
|
|
849
849
|
"span",
|
|
850
850
|
{
|
|
851
|
-
class:
|
|
851
|
+
class: q(["checkbox", { checked: m.value, disabled: (c = t.field) == null ? void 0 : c.disabled }])
|
|
852
852
|
},
|
|
853
853
|
[
|
|
854
|
-
m.value ? (s(), i("span",
|
|
854
|
+
m.value ? (s(), i("span", Wt, "✓")) : x("v-if", !0)
|
|
855
855
|
],
|
|
856
856
|
2
|
|
857
857
|
/* CLASS */
|
|
858
858
|
),
|
|
859
859
|
l(
|
|
860
860
|
"span",
|
|
861
|
-
|
|
861
|
+
Jt,
|
|
862
862
|
$(h.value),
|
|
863
863
|
1
|
|
864
864
|
/* TEXT */
|
|
@@ -867,7 +867,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
867
867
|
]);
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
|
-
}),
|
|
870
|
+
}), Qt = /* @__PURE__ */ H(Xt, [["__scopeId", "data-v-16bbffa8"]]), Zt = { class: "task-label" }, el = { class: "modal-card" }, tl = { class: "modal-header" }, ll = { class: "modal-body" }, al = ["onUpdate:modelValue", "placeholder"], nl = /* @__PURE__ */ U({
|
|
871
871
|
__name: "SubFormTask",
|
|
872
872
|
props: {
|
|
873
873
|
item: {},
|
|
@@ -875,7 +875,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
875
875
|
formCore: {}
|
|
876
876
|
},
|
|
877
877
|
setup(t) {
|
|
878
|
-
const n = t, e =
|
|
878
|
+
const n = t, e = P(!1), r = P({}), f = b(() => {
|
|
879
879
|
var y;
|
|
880
880
|
const o = (y = n.item.props) == null ? void 0 : y.taskType, c = {
|
|
881
881
|
contact_info: [
|
|
@@ -904,7 +904,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
904
904
|
}), e.value = !0;
|
|
905
905
|
}
|
|
906
906
|
function m() {
|
|
907
|
-
e.value = !1,
|
|
907
|
+
e.value = !1, Z(n.formCore, n.item.key, {
|
|
908
908
|
...r.value,
|
|
909
909
|
_completed: !0,
|
|
910
910
|
_completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -928,7 +928,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
928
928
|
l(
|
|
929
929
|
"div",
|
|
930
930
|
{
|
|
931
|
-
class:
|
|
931
|
+
class: q(["task-trigger", { completed: a.value }])
|
|
932
932
|
},
|
|
933
933
|
[
|
|
934
934
|
c[0] || (c[0] = l(
|
|
@@ -940,7 +940,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
940
940
|
)),
|
|
941
941
|
l(
|
|
942
942
|
"span",
|
|
943
|
-
|
|
943
|
+
Zt,
|
|
944
944
|
$(a.value ? "✅ 已完成" : t.item.placeholder || "点击填写子表单"),
|
|
945
945
|
1
|
|
946
946
|
/* TEXT */
|
|
@@ -962,8 +962,8 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
962
962
|
class: "modal-overlay",
|
|
963
963
|
onClick: g
|
|
964
964
|
}, [
|
|
965
|
-
l("div",
|
|
966
|
-
l("div",
|
|
965
|
+
l("div", el, [
|
|
966
|
+
l("div", tl, [
|
|
967
967
|
l(
|
|
968
968
|
"span",
|
|
969
969
|
null,
|
|
@@ -976,11 +976,11 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
976
976
|
onClick: h
|
|
977
977
|
}, "✕")
|
|
978
978
|
]),
|
|
979
|
-
l("div",
|
|
979
|
+
l("div", ll, [
|
|
980
980
|
(s(!0), i(
|
|
981
|
-
|
|
981
|
+
z,
|
|
982
982
|
null,
|
|
983
|
-
|
|
983
|
+
J(f.value, (y) => (s(), i("div", {
|
|
984
984
|
key: y.key,
|
|
985
985
|
class: "modal-field"
|
|
986
986
|
}, [
|
|
@@ -991,12 +991,12 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
991
991
|
1
|
|
992
992
|
/* TEXT */
|
|
993
993
|
),
|
|
994
|
-
|
|
995
|
-
"onUpdate:modelValue": (
|
|
994
|
+
Ee(l("input", {
|
|
995
|
+
"onUpdate:modelValue": (O) => r.value[y.key] = O,
|
|
996
996
|
placeholder: y.placeholder,
|
|
997
997
|
class: "modal-input"
|
|
998
|
-
}, null, 8,
|
|
999
|
-
[
|
|
998
|
+
}, null, 8, al), [
|
|
999
|
+
[Fe, r.value[y.key]]
|
|
1000
1000
|
])
|
|
1001
1001
|
]))),
|
|
1002
1002
|
128
|
|
@@ -1017,7 +1017,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1017
1017
|
])) : x("v-if", !0)
|
|
1018
1018
|
]));
|
|
1019
1019
|
}
|
|
1020
|
-
}),
|
|
1020
|
+
}), ke = /* @__PURE__ */ H(nl, [["__scopeId", "data-v-f15e7819"]]), ol = { class: "task-label" }, sl = { class: "confirm-card" }, il = { class: "confirm-url" }, rl = /* @__PURE__ */ U({
|
|
1021
1021
|
__name: "H5JumpTask",
|
|
1022
1022
|
props: {
|
|
1023
1023
|
item: {},
|
|
@@ -1025,7 +1025,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1025
1025
|
formCore: {}
|
|
1026
1026
|
},
|
|
1027
1027
|
setup(t) {
|
|
1028
|
-
const n = t, e =
|
|
1028
|
+
const n = t, e = P(!1), r = b(() => {
|
|
1029
1029
|
var a, o;
|
|
1030
1030
|
return ((a = n.item.props) == null ? void 0 : a.h5link) || ((o = n.item.props) == null ? void 0 : o.taxLink) || "https://example.com/task";
|
|
1031
1031
|
});
|
|
@@ -1034,7 +1034,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1034
1034
|
}
|
|
1035
1035
|
function p() {
|
|
1036
1036
|
e.value = !1, setTimeout(() => {
|
|
1037
|
-
|
|
1037
|
+
Z(n.formCore, n.item.key, {
|
|
1038
1038
|
url: r.value,
|
|
1039
1039
|
_completed: !0,
|
|
1040
1040
|
_completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1060,7 +1060,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1060
1060
|
l(
|
|
1061
1061
|
"div",
|
|
1062
1062
|
{
|
|
1063
|
-
class:
|
|
1063
|
+
class: q(["task-trigger", { completed: g.value }])
|
|
1064
1064
|
},
|
|
1065
1065
|
[
|
|
1066
1066
|
o[1] || (o[1] = l(
|
|
@@ -1072,7 +1072,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1072
1072
|
)),
|
|
1073
1073
|
l(
|
|
1074
1074
|
"span",
|
|
1075
|
-
|
|
1075
|
+
ol,
|
|
1076
1076
|
$(g.value ? "✅ 已完成" : t.item.placeholder || "点击跳转 H5 页面"),
|
|
1077
1077
|
1
|
|
1078
1078
|
/* TEXT */
|
|
@@ -1101,7 +1101,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1101
1101
|
class: "modal-overlay",
|
|
1102
1102
|
onClick: o[0] || (o[0] = (c) => h(c, m))
|
|
1103
1103
|
}, [
|
|
1104
|
-
l("div",
|
|
1104
|
+
l("div", sl, [
|
|
1105
1105
|
o[4] || (o[4] = l(
|
|
1106
1106
|
"div",
|
|
1107
1107
|
{ class: "confirm-icon" },
|
|
@@ -1118,7 +1118,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1118
1118
|
)),
|
|
1119
1119
|
l(
|
|
1120
1120
|
"div",
|
|
1121
|
-
|
|
1121
|
+
il,
|
|
1122
1122
|
$(r.value),
|
|
1123
1123
|
1
|
|
1124
1124
|
/* TEXT */
|
|
@@ -1144,10 +1144,10 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1144
1144
|
])) : x("v-if", !0)
|
|
1145
1145
|
]));
|
|
1146
1146
|
}
|
|
1147
|
-
}),
|
|
1147
|
+
}), cl = /* @__PURE__ */ H(rl, [["__scopeId", "data-v-2f7717cb"]]), ul = { class: "task-icon" }, dl = { class: "task-label" }, vl = { class: "sig-card" }, fl = { class: "sig-header" }, ml = { class: "sig-body" }, pl = {
|
|
1148
1148
|
key: 0,
|
|
1149
1149
|
class: "sig-placeholder"
|
|
1150
|
-
},
|
|
1150
|
+
}, hl = { class: "sig-footer" }, gl = ["disabled"], yl = { class: "map-card" }, kl = { class: "map-header" }, bl = { class: "native-card" }, _l = { class: "native-icon" }, Cl = { class: "native-title" }, $l = { class: "native-desc" }, Tl = { class: "native-actions" }, wl = /* @__PURE__ */ U({
|
|
1151
1151
|
__name: "NativeTask",
|
|
1152
1152
|
props: {
|
|
1153
1153
|
item: {},
|
|
@@ -1155,26 +1155,26 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1155
1155
|
formCore: {}
|
|
1156
1156
|
},
|
|
1157
1157
|
setup(t) {
|
|
1158
|
-
|
|
1159
|
-
v9ce02c4c:
|
|
1158
|
+
Re((S) => ({
|
|
1159
|
+
v9ce02c4c: M.value
|
|
1160
1160
|
}));
|
|
1161
1161
|
const n = t, e = b(() => {
|
|
1162
1162
|
var S;
|
|
1163
1163
|
return ((S = n.item.props) == null ? void 0 : S.taskType) || "";
|
|
1164
|
-
}), r =
|
|
1164
|
+
}), r = P(!1), f = P(null), p = P(!1), m = P(null), h = P(!1);
|
|
1165
1165
|
function g() {
|
|
1166
|
-
r.value = !0, h.value = !1,
|
|
1166
|
+
r.value = !0, h.value = !1, De(() => {
|
|
1167
1167
|
const S = f.value;
|
|
1168
1168
|
if (!S) return;
|
|
1169
1169
|
const C = window.devicePixelRatio || 1, j = S.getBoundingClientRect();
|
|
1170
1170
|
S.width = j.width * C, S.height = j.height * C;
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1171
|
+
const G = S.getContext("2d");
|
|
1172
|
+
G.scale(C, C), G.strokeStyle = "#333", G.lineWidth = 3, G.lineCap = "round", G.lineJoin = "round", m.value = G;
|
|
1173
1173
|
});
|
|
1174
1174
|
}
|
|
1175
1175
|
function a(S) {
|
|
1176
|
-
const j = f.value.getBoundingClientRect(),
|
|
1177
|
-
return { x:
|
|
1176
|
+
const j = f.value.getBoundingClientRect(), G = "touches" in S ? S.touches[0].clientX : S.clientX, K = "touches" in S ? S.touches[0].clientY : S.clientY;
|
|
1177
|
+
return { x: G - j.left, y: K - j.top };
|
|
1178
1178
|
}
|
|
1179
1179
|
function o(S) {
|
|
1180
1180
|
S.preventDefault(), p.value = !0, h.value = !0;
|
|
@@ -1189,13 +1189,13 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1189
1189
|
function y() {
|
|
1190
1190
|
p.value = !1;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function O() {
|
|
1193
1193
|
const S = f.value;
|
|
1194
1194
|
m.value.clearRect(0, 0, S.width, S.height), h.value = !1;
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function d() {
|
|
1197
1197
|
const S = f.value.toDataURL("image/png");
|
|
1198
|
-
r.value = !1,
|
|
1198
|
+
r.value = !1, Z(n.formCore, n.item.key, {
|
|
1199
1199
|
signatureDataUrl: S,
|
|
1200
1200
|
_completed: !0,
|
|
1201
1201
|
_completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1204,12 +1204,12 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1204
1204
|
function T() {
|
|
1205
1205
|
r.value = !1;
|
|
1206
1206
|
}
|
|
1207
|
-
const A =
|
|
1207
|
+
const A = P(!1);
|
|
1208
1208
|
function L() {
|
|
1209
1209
|
A.value = !0;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
A.value = !1,
|
|
1211
|
+
function R() {
|
|
1212
|
+
A.value = !1, Z(n.formCore, n.item.key, {
|
|
1213
1213
|
lng: 116.404 + Math.random() * 0.1,
|
|
1214
1214
|
lat: 39.915 + Math.random() * 0.1,
|
|
1215
1215
|
address: `模拟选点地址 ${Date.now()}`,
|
|
@@ -1217,18 +1217,18 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1217
1217
|
_completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1218
1218
|
});
|
|
1219
1219
|
}
|
|
1220
|
-
const u =
|
|
1220
|
+
const u = P(!1);
|
|
1221
1221
|
function k() {
|
|
1222
1222
|
u.value = !0;
|
|
1223
1223
|
}
|
|
1224
1224
|
function V() {
|
|
1225
|
-
u.value = !1,
|
|
1225
|
+
u.value = !1, Z(n.formCore, n.item.key, {
|
|
1226
1226
|
_completed: !0,
|
|
1227
1227
|
_completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1228
1228
|
_mock: `已完成原生任务: ${e.value}`
|
|
1229
1229
|
});
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function v(S, C) {
|
|
1232
1232
|
S.stopPropagation(), S.target === S.currentTarget && C();
|
|
1233
1233
|
}
|
|
1234
1234
|
function _() {
|
|
@@ -1238,7 +1238,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1238
1238
|
var C;
|
|
1239
1239
|
const S = (C = n.field) == null ? void 0 : C.value;
|
|
1240
1240
|
return S && typeof S == "object" && S._completed;
|
|
1241
|
-
}), w = b(() => e.value === "signature" ? "✍️" : e.value === "map" ? "📍" : "📱"),
|
|
1241
|
+
}), w = b(() => e.value === "signature" ? "✍️" : e.value === "map" ? "📍" : "📱"), M = b(() => e.value === "signature" ? "#eb2f96" : e.value === "map" ? "#2f54eb" : "#fa8c16");
|
|
1242
1242
|
return (S, C) => (s(), i("div", {
|
|
1243
1243
|
class: "task-native",
|
|
1244
1244
|
onClick: _
|
|
@@ -1246,19 +1246,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1246
1246
|
l(
|
|
1247
1247
|
"div",
|
|
1248
1248
|
{
|
|
1249
|
-
class:
|
|
1249
|
+
class: q(["task-trigger", { completed: I.value }])
|
|
1250
1250
|
},
|
|
1251
1251
|
[
|
|
1252
1252
|
l(
|
|
1253
1253
|
"span",
|
|
1254
|
-
|
|
1254
|
+
ul,
|
|
1255
1255
|
$(w.value),
|
|
1256
1256
|
1
|
|
1257
1257
|
/* TEXT */
|
|
1258
1258
|
),
|
|
1259
1259
|
l(
|
|
1260
1260
|
"span",
|
|
1261
|
-
|
|
1261
|
+
dl,
|
|
1262
1262
|
$(I.value ? "✅ 已完成" : t.item.placeholder || `点击完成${t.item.label}`),
|
|
1263
1263
|
1
|
|
1264
1264
|
/* TEXT */
|
|
@@ -1278,10 +1278,10 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1278
1278
|
r.value ? (s(), i("div", {
|
|
1279
1279
|
key: 0,
|
|
1280
1280
|
class: "modal-overlay",
|
|
1281
|
-
onClick: C[0] || (C[0] = (j) =>
|
|
1281
|
+
onClick: C[0] || (C[0] = (j) => v(j, T))
|
|
1282
1282
|
}, [
|
|
1283
|
-
l("div",
|
|
1284
|
-
l("div",
|
|
1283
|
+
l("div", vl, [
|
|
1284
|
+
l("div", fl, [
|
|
1285
1285
|
l(
|
|
1286
1286
|
"span",
|
|
1287
1287
|
null,
|
|
@@ -1294,7 +1294,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1294
1294
|
onClick: T
|
|
1295
1295
|
}, "✕")
|
|
1296
1296
|
]),
|
|
1297
|
-
l("div",
|
|
1297
|
+
l("div", ml, [
|
|
1298
1298
|
l(
|
|
1299
1299
|
"canvas",
|
|
1300
1300
|
{
|
|
@@ -1313,18 +1313,18 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1313
1313
|
544
|
|
1314
1314
|
/* NEED_HYDRATION, NEED_PATCH */
|
|
1315
1315
|
),
|
|
1316
|
-
h.value ? x("v-if", !0) : (s(), i("div",
|
|
1316
|
+
h.value ? x("v-if", !0) : (s(), i("div", pl, "在此处签名"))
|
|
1317
1317
|
]),
|
|
1318
|
-
l("div",
|
|
1318
|
+
l("div", hl, [
|
|
1319
1319
|
l("button", {
|
|
1320
1320
|
class: "btn-clear",
|
|
1321
|
-
onClick:
|
|
1321
|
+
onClick: O
|
|
1322
1322
|
}, "清除"),
|
|
1323
1323
|
l("button", {
|
|
1324
1324
|
class: "btn-confirm-sig",
|
|
1325
|
-
onClick:
|
|
1325
|
+
onClick: d,
|
|
1326
1326
|
disabled: !h.value
|
|
1327
|
-
}, "确认签名", 8,
|
|
1327
|
+
}, "确认签名", 8, gl)
|
|
1328
1328
|
])
|
|
1329
1329
|
])
|
|
1330
1330
|
])) : x("v-if", !0),
|
|
@@ -1332,10 +1332,10 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1332
1332
|
A.value ? (s(), i("div", {
|
|
1333
1333
|
key: 1,
|
|
1334
1334
|
class: "modal-overlay",
|
|
1335
|
-
onClick: C[1] || (C[1] = (j) =>
|
|
1335
|
+
onClick: C[1] || (C[1] = (j) => v(j, R))
|
|
1336
1336
|
}, [
|
|
1337
|
-
l("div",
|
|
1338
|
-
l("div",
|
|
1337
|
+
l("div", yl, [
|
|
1338
|
+
l("div", kl, [
|
|
1339
1339
|
l(
|
|
1340
1340
|
"span",
|
|
1341
1341
|
null,
|
|
@@ -1345,7 +1345,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1345
1345
|
),
|
|
1346
1346
|
l("button", {
|
|
1347
1347
|
class: "modal-close",
|
|
1348
|
-
onClick:
|
|
1348
|
+
onClick: R
|
|
1349
1349
|
}, "✕")
|
|
1350
1350
|
]),
|
|
1351
1351
|
C[5] || (C[5] = l(
|
|
@@ -1362,7 +1362,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1362
1362
|
l("div", { class: "map-footer" }, [
|
|
1363
1363
|
l("button", {
|
|
1364
1364
|
class: "btn-confirm-sig",
|
|
1365
|
-
onClick:
|
|
1365
|
+
onClick: R
|
|
1366
1366
|
}, "在此位置选点")
|
|
1367
1367
|
])
|
|
1368
1368
|
])
|
|
@@ -1371,19 +1371,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1371
1371
|
u.value ? (s(), i("div", {
|
|
1372
1372
|
key: 2,
|
|
1373
1373
|
class: "modal-overlay",
|
|
1374
|
-
onClick: C[3] || (C[3] = (j) =>
|
|
1374
|
+
onClick: C[3] || (C[3] = (j) => v(j, () => u.value = !1))
|
|
1375
1375
|
}, [
|
|
1376
|
-
l("div",
|
|
1376
|
+
l("div", bl, [
|
|
1377
1377
|
l(
|
|
1378
1378
|
"div",
|
|
1379
|
-
|
|
1379
|
+
_l,
|
|
1380
1380
|
$(w.value),
|
|
1381
1381
|
1
|
|
1382
1382
|
/* TEXT */
|
|
1383
1383
|
),
|
|
1384
1384
|
l(
|
|
1385
1385
|
"div",
|
|
1386
|
-
|
|
1386
|
+
Cl,
|
|
1387
1387
|
$(t.item.label || "原生页面任务"),
|
|
1388
1388
|
1
|
|
1389
1389
|
/* TEXT */
|
|
@@ -1397,12 +1397,12 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1397
1397
|
)),
|
|
1398
1398
|
l(
|
|
1399
1399
|
"div",
|
|
1400
|
-
|
|
1400
|
+
$l,
|
|
1401
1401
|
"taskType: " + $(e.value),
|
|
1402
1402
|
1
|
|
1403
1403
|
/* TEXT */
|
|
1404
1404
|
),
|
|
1405
|
-
l("div",
|
|
1405
|
+
l("div", Tl, [
|
|
1406
1406
|
l("button", {
|
|
1407
1407
|
class: "btn-cancel",
|
|
1408
1408
|
onClick: C[2] || (C[2] = (j) => u.value = !1)
|
|
@@ -1416,13 +1416,13 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1416
1416
|
])) : x("v-if", !0)
|
|
1417
1417
|
]));
|
|
1418
1418
|
}
|
|
1419
|
-
}),
|
|
1419
|
+
}), fe = /* @__PURE__ */ H(wl, [["__scopeId", "data-v-d1a3f489"]]), Sl = { class: "task-icon" }, xl = { class: "task-label" }, Al = {
|
|
1420
1420
|
key: 0,
|
|
1421
1421
|
class: "spinner"
|
|
1422
|
-
},
|
|
1422
|
+
}, Il = {
|
|
1423
1423
|
key: 1,
|
|
1424
1424
|
class: "task-arrow"
|
|
1425
|
-
},
|
|
1425
|
+
}, Ml = /* @__PURE__ */ U({
|
|
1426
1426
|
__name: "ApiTask",
|
|
1427
1427
|
props: {
|
|
1428
1428
|
item: {},
|
|
@@ -1430,23 +1430,23 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1430
1430
|
formCore: {}
|
|
1431
1431
|
},
|
|
1432
1432
|
setup(t) {
|
|
1433
|
-
const n = t, e =
|
|
1433
|
+
const n = t, e = P(!1), r = P(""), f = b(() => {
|
|
1434
1434
|
var g;
|
|
1435
1435
|
return ((g = n.item.props) == null ? void 0 : g.taskType) || "";
|
|
1436
|
-
}), p = b(() =>
|
|
1436
|
+
}), p = b(() => tt()[f.value]);
|
|
1437
1437
|
async function m() {
|
|
1438
1438
|
if (!e.value) {
|
|
1439
1439
|
e.value = !0, r.value = "";
|
|
1440
1440
|
try {
|
|
1441
1441
|
if (p.value) {
|
|
1442
1442
|
const g = await p.value(n.formCore, n.item.key);
|
|
1443
|
-
e.value = !1,
|
|
1443
|
+
e.value = !1, Z(n.formCore, n.item.key, {
|
|
1444
1444
|
...g,
|
|
1445
1445
|
_completed: !0,
|
|
1446
1446
|
_completedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1447
1447
|
});
|
|
1448
1448
|
} else
|
|
1449
|
-
await new Promise((g) => setTimeout(g, 800)), e.value = !1,
|
|
1449
|
+
await new Promise((g) => setTimeout(g, 800)), e.value = !1, Z(n.formCore, n.item.key, {
|
|
1450
1450
|
code: "00",
|
|
1451
1451
|
data: { id: `mock_${Date.now()}`, name: `模拟${n.item.label}结果` },
|
|
1452
1452
|
_completed: !0,
|
|
@@ -1471,30 +1471,30 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1471
1471
|
l(
|
|
1472
1472
|
"div",
|
|
1473
1473
|
{
|
|
1474
|
-
class:
|
|
1474
|
+
class: q(["task-trigger", { completed: h.value, loading: e.value, error: !!r.value }])
|
|
1475
1475
|
},
|
|
1476
1476
|
[
|
|
1477
1477
|
l(
|
|
1478
1478
|
"span",
|
|
1479
|
-
|
|
1479
|
+
Sl,
|
|
1480
1480
|
$(e.value ? "⏳" : r.value ? "⚠️" : "🔌"),
|
|
1481
1481
|
1
|
|
1482
1482
|
/* TEXT */
|
|
1483
1483
|
),
|
|
1484
|
-
l("span",
|
|
1484
|
+
l("span", xl, [
|
|
1485
1485
|
e.value ? (s(), i(
|
|
1486
|
-
|
|
1486
|
+
z,
|
|
1487
1487
|
{ key: 0 },
|
|
1488
1488
|
[
|
|
1489
|
-
|
|
1489
|
+
Q("请求中...")
|
|
1490
1490
|
],
|
|
1491
1491
|
64
|
|
1492
1492
|
/* STABLE_FRAGMENT */
|
|
1493
1493
|
)) : r.value ? (s(), i(
|
|
1494
|
-
|
|
1494
|
+
z,
|
|
1495
1495
|
{ key: 1 },
|
|
1496
1496
|
[
|
|
1497
|
-
|
|
1497
|
+
Q(
|
|
1498
1498
|
$(r.value),
|
|
1499
1499
|
1
|
|
1500
1500
|
/* TEXT */
|
|
@@ -1503,18 +1503,18 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1503
1503
|
64
|
|
1504
1504
|
/* STABLE_FRAGMENT */
|
|
1505
1505
|
)) : h.value ? (s(), i(
|
|
1506
|
-
|
|
1506
|
+
z,
|
|
1507
1507
|
{ key: 2 },
|
|
1508
1508
|
[
|
|
1509
|
-
|
|
1509
|
+
Q("✅ 已完成")
|
|
1510
1510
|
],
|
|
1511
1511
|
64
|
|
1512
1512
|
/* STABLE_FRAGMENT */
|
|
1513
1513
|
)) : (s(), i(
|
|
1514
|
-
|
|
1514
|
+
z,
|
|
1515
1515
|
{ key: 3 },
|
|
1516
1516
|
[
|
|
1517
|
-
|
|
1517
|
+
Q(
|
|
1518
1518
|
$(t.item.placeholder || `点击获取${t.item.label}`),
|
|
1519
1519
|
1
|
|
1520
1520
|
/* TEXT */
|
|
@@ -1524,17 +1524,17 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1524
1524
|
/* STABLE_FRAGMENT */
|
|
1525
1525
|
))
|
|
1526
1526
|
]),
|
|
1527
|
-
e.value ? (s(), i("span",
|
|
1527
|
+
e.value ? (s(), i("span", Al)) : (s(), i("span", Il, "▸"))
|
|
1528
1528
|
],
|
|
1529
1529
|
2
|
|
1530
1530
|
/* CLASS */
|
|
1531
1531
|
)
|
|
1532
1532
|
]));
|
|
1533
1533
|
}
|
|
1534
|
-
}),
|
|
1534
|
+
}), Ol = /* @__PURE__ */ H(Ml, [["__scopeId", "data-v-33fee019"]]), Vl = { class: "task-icon" }, Pl = { class: "task-label" }, El = {
|
|
1535
1535
|
key: 0,
|
|
1536
1536
|
class: "progress-bar"
|
|
1537
|
-
},
|
|
1537
|
+
}, Fl = /* @__PURE__ */ U({
|
|
1538
1538
|
__name: "CustomerTask",
|
|
1539
1539
|
props: {
|
|
1540
1540
|
item: {},
|
|
@@ -1542,7 +1542,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1542
1542
|
formCore: {}
|
|
1543
1543
|
},
|
|
1544
1544
|
setup(t) {
|
|
1545
|
-
const n = t, e =
|
|
1545
|
+
const n = t, e = P(!1), r = P(0), f = b(() => {
|
|
1546
1546
|
var g;
|
|
1547
1547
|
return ((g = n.item.props) == null ? void 0 : g.taskType) || "";
|
|
1548
1548
|
});
|
|
@@ -1550,7 +1550,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1550
1550
|
if (e.value) return;
|
|
1551
1551
|
e.value = !0, r.value = 0;
|
|
1552
1552
|
const g = setInterval(() => {
|
|
1553
|
-
r.value += 20, r.value >= 100 && (clearInterval(g), e.value = !1,
|
|
1553
|
+
r.value += 20, r.value >= 100 && (clearInterval(g), e.value = !1, Z(n.formCore, n.item.key, {
|
|
1554
1554
|
score: Math.floor(Math.random() * 30) + 70,
|
|
1555
1555
|
passed: !0,
|
|
1556
1556
|
_completed: !0,
|
|
@@ -1570,19 +1570,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1570
1570
|
l(
|
|
1571
1571
|
"div",
|
|
1572
1572
|
{
|
|
1573
|
-
class:
|
|
1573
|
+
class: q(["task-trigger", { completed: m.value, loading: e.value }])
|
|
1574
1574
|
},
|
|
1575
1575
|
[
|
|
1576
1576
|
l(
|
|
1577
1577
|
"span",
|
|
1578
|
-
|
|
1578
|
+
Vl,
|
|
1579
1579
|
$(h.value),
|
|
1580
1580
|
1
|
|
1581
1581
|
/* TEXT */
|
|
1582
1582
|
),
|
|
1583
1583
|
l(
|
|
1584
1584
|
"span",
|
|
1585
|
-
|
|
1585
|
+
Pl,
|
|
1586
1586
|
$(e.value ? "检测中..." : m.value ? "✅ 已完成" : t.item.placeholder || `点击启动${t.item.label}`),
|
|
1587
1587
|
1
|
|
1588
1588
|
/* TEXT */
|
|
@@ -1599,7 +1599,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1599
1599
|
/* CLASS */
|
|
1600
1600
|
),
|
|
1601
1601
|
x(" Progress overlay "),
|
|
1602
|
-
e.value ? (s(), i("div",
|
|
1602
|
+
e.value ? (s(), i("div", El, [
|
|
1603
1603
|
l(
|
|
1604
1604
|
"div",
|
|
1605
1605
|
{
|
|
@@ -1613,7 +1613,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1613
1613
|
])) : x("v-if", !0)
|
|
1614
1614
|
]));
|
|
1615
1615
|
}
|
|
1616
|
-
}),
|
|
1616
|
+
}), Rl = /* @__PURE__ */ H(Fl, [["__scopeId", "data-v-bb43982b"]]), Dl = { class: "task-label" }, Nl = { class: "inline-card" }, Ll = { class: "inline-link" }, jl = /* @__PURE__ */ U({
|
|
1617
1617
|
__name: "InlineTask",
|
|
1618
1618
|
props: {
|
|
1619
1619
|
item: {},
|
|
@@ -1621,7 +1621,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1621
1621
|
formCore: {}
|
|
1622
1622
|
},
|
|
1623
1623
|
setup(t) {
|
|
1624
|
-
const n = t, e =
|
|
1624
|
+
const n = t, e = P(!1), r = b(() => {
|
|
1625
1625
|
var a;
|
|
1626
1626
|
return ((a = n.item.props) == null ? void 0 : a.taxLink) || `https://tax.example.com/copy?id=${Date.now()}`;
|
|
1627
1627
|
});
|
|
@@ -1631,7 +1631,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1631
1631
|
function p() {
|
|
1632
1632
|
var a;
|
|
1633
1633
|
e.value = !1, (a = navigator.clipboard) == null || a.writeText(r.value).catch(() => {
|
|
1634
|
-
}),
|
|
1634
|
+
}), Z(n.formCore, n.item.key, {
|
|
1635
1635
|
copied: !0,
|
|
1636
1636
|
url: r.value,
|
|
1637
1637
|
_completed: !0,
|
|
@@ -1656,7 +1656,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1656
1656
|
l(
|
|
1657
1657
|
"div",
|
|
1658
1658
|
{
|
|
1659
|
-
class:
|
|
1659
|
+
class: q(["task-trigger", { completed: g.value }])
|
|
1660
1660
|
},
|
|
1661
1661
|
[
|
|
1662
1662
|
o[1] || (o[1] = l(
|
|
@@ -1668,7 +1668,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1668
1668
|
)),
|
|
1669
1669
|
l(
|
|
1670
1670
|
"span",
|
|
1671
|
-
|
|
1671
|
+
Dl,
|
|
1672
1672
|
$(g.value ? "✅ 已复制" : t.item.placeholder || "复制链接"),
|
|
1673
1673
|
1
|
|
1674
1674
|
/* TEXT */
|
|
@@ -1690,7 +1690,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1690
1690
|
class: "modal-overlay",
|
|
1691
1691
|
onClick: o[0] || (o[0] = (c) => h(c, m))
|
|
1692
1692
|
}, [
|
|
1693
|
-
l("div",
|
|
1693
|
+
l("div", Nl, [
|
|
1694
1694
|
o[3] || (o[3] = l(
|
|
1695
1695
|
"div",
|
|
1696
1696
|
{ class: "inline-icon" },
|
|
@@ -1707,7 +1707,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1707
1707
|
)),
|
|
1708
1708
|
l(
|
|
1709
1709
|
"div",
|
|
1710
|
-
|
|
1710
|
+
Ll,
|
|
1711
1711
|
$(r.value),
|
|
1712
1712
|
1
|
|
1713
1713
|
/* TEXT */
|
|
@@ -1733,7 +1733,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1733
1733
|
])) : x("v-if", !0)
|
|
1734
1734
|
]));
|
|
1735
1735
|
}
|
|
1736
|
-
}),
|
|
1736
|
+
}), Bl = /* @__PURE__ */ H(jl, [["__scopeId", "data-v-612f91c9"]]), Kl = /* @__PURE__ */ U({
|
|
1737
1737
|
__name: "TaskControl",
|
|
1738
1738
|
props: {
|
|
1739
1739
|
item: {},
|
|
@@ -1742,31 +1742,31 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1742
1742
|
},
|
|
1743
1743
|
setup(t) {
|
|
1744
1744
|
const n = t, e = b(() => {
|
|
1745
|
-
const r =
|
|
1745
|
+
const r = lt(n.item.props);
|
|
1746
1746
|
return {
|
|
1747
|
-
subForm:
|
|
1748
|
-
h5:
|
|
1749
|
-
signature:
|
|
1750
|
-
map:
|
|
1751
|
-
native:
|
|
1752
|
-
api:
|
|
1753
|
-
customer:
|
|
1754
|
-
inline:
|
|
1755
|
-
}[r] ||
|
|
1747
|
+
subForm: ke,
|
|
1748
|
+
h5: cl,
|
|
1749
|
+
signature: fe,
|
|
1750
|
+
map: fe,
|
|
1751
|
+
native: fe,
|
|
1752
|
+
api: Ol,
|
|
1753
|
+
customer: Rl,
|
|
1754
|
+
inline: Bl
|
|
1755
|
+
}[r] || ke;
|
|
1756
1756
|
});
|
|
1757
|
-
return (r, f) => (s(),
|
|
1757
|
+
return (r, f) => (s(), te(ce(e.value), {
|
|
1758
1758
|
item: t.item,
|
|
1759
1759
|
field: t.field,
|
|
1760
1760
|
formCore: t.formCore
|
|
1761
1761
|
}, null, 8, ["item", "field", "formCore"]));
|
|
1762
1762
|
}
|
|
1763
|
-
}),
|
|
1763
|
+
}), ql = { class: "list-row-head" }, Ul = ["disabled", "onClick"], Hl = ["value", "disabled", "onChange"], Yl = { value: "" }, zl = ["value"], Gl = ["type", "value", "placeholder", "disabled", "onBlur"], Wl = {
|
|
1764
1764
|
key: 2,
|
|
1765
1765
|
class: "list-error"
|
|
1766
|
-
},
|
|
1766
|
+
}, Jl = {
|
|
1767
1767
|
key: 0,
|
|
1768
1768
|
class: "list-summary-error"
|
|
1769
|
-
},
|
|
1769
|
+
}, Xl = ["disabled"], Ql = { class: "list-hint" }, Zl = /* @__PURE__ */ U({
|
|
1770
1770
|
__name: "ListControl",
|
|
1771
1771
|
props: {
|
|
1772
1772
|
item: {},
|
|
@@ -1802,17 +1802,17 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1802
1802
|
function y(u) {
|
|
1803
1803
|
return u && typeof u == "object" ? u.code || "" : u == null ? "" : String(u);
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1805
|
+
function O(u, k, V) {
|
|
1806
|
+
const v = f.value.map((_) => ({ ..._ }));
|
|
1807
|
+
v[u] = { ...v[u] ?? {}, [k.key]: V }, r("change", { value: v, eventType: "inputBlur" });
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1809
|
+
function d(u, k, V) {
|
|
1810
|
+
const v = V.target;
|
|
1811
|
+
O(u, k, v.value.trim());
|
|
1812
1812
|
}
|
|
1813
1813
|
function T(u, k, V) {
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1814
|
+
const v = V.target, _ = (k.initOptions ?? []).find((I) => I.code === v.value);
|
|
1815
|
+
O(u, k, _ ? { code: _.code, name: _.name } : "");
|
|
1816
1816
|
}
|
|
1817
1817
|
function A() {
|
|
1818
1818
|
var u;
|
|
@@ -1821,31 +1821,31 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1821
1821
|
function L(u) {
|
|
1822
1822
|
var k;
|
|
1823
1823
|
!a.value || (k = e.field) != null && k.disabled || r("change", {
|
|
1824
|
-
value: f.value.filter((V,
|
|
1824
|
+
value: f.value.filter((V, v) => v !== u),
|
|
1825
1825
|
eventType: "inputChange"
|
|
1826
1826
|
});
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function R(u, k) {
|
|
1829
1829
|
return o.value[`${e.item.key}[${u}].${k}`];
|
|
1830
1830
|
}
|
|
1831
1831
|
return (u, k) => {
|
|
1832
|
-
var V,
|
|
1832
|
+
var V, v, _;
|
|
1833
1833
|
return s(), i(
|
|
1834
1834
|
"div",
|
|
1835
1835
|
{
|
|
1836
|
-
class:
|
|
1836
|
+
class: q(["ctrl-list", { disabled: (V = t.field) == null ? void 0 : V.disabled }])
|
|
1837
1837
|
},
|
|
1838
1838
|
[
|
|
1839
1839
|
(s(!0), i(
|
|
1840
|
-
|
|
1840
|
+
z,
|
|
1841
1841
|
null,
|
|
1842
|
-
|
|
1843
|
-
var
|
|
1842
|
+
J(f.value, (I, w) => {
|
|
1843
|
+
var M, S;
|
|
1844
1844
|
return s(), i("article", {
|
|
1845
1845
|
key: w,
|
|
1846
1846
|
class: "list-row"
|
|
1847
1847
|
}, [
|
|
1848
|
-
l("div",
|
|
1848
|
+
l("div", ql, [
|
|
1849
1849
|
l(
|
|
1850
1850
|
"strong",
|
|
1851
1851
|
null,
|
|
@@ -1853,19 +1853,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1853
1853
|
1
|
|
1854
1854
|
/* TEXT */
|
|
1855
1855
|
),
|
|
1856
|
-
((
|
|
1856
|
+
((M = t.item.listMeta) == null ? void 0 : M.removable) !== !1 ? (s(), i("button", {
|
|
1857
1857
|
key: 0,
|
|
1858
1858
|
type: "button",
|
|
1859
1859
|
class: "remove-button",
|
|
1860
1860
|
disabled: !a.value || ((S = t.field) == null ? void 0 : S.disabled),
|
|
1861
1861
|
onClick: (C) => L(w)
|
|
1862
|
-
}, " 删除 ", 8,
|
|
1862
|
+
}, " 删除 ", 8, Ul)) : x("v-if", !0)
|
|
1863
1863
|
]),
|
|
1864
1864
|
(s(!0), i(
|
|
1865
|
-
|
|
1865
|
+
z,
|
|
1866
1866
|
null,
|
|
1867
|
-
|
|
1868
|
-
var j,
|
|
1867
|
+
J(p.value, (C) => {
|
|
1868
|
+
var j, G;
|
|
1869
1869
|
return s(), i("label", {
|
|
1870
1870
|
key: C.key,
|
|
1871
1871
|
class: "list-field"
|
|
@@ -1873,7 +1873,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1873
1873
|
l(
|
|
1874
1874
|
"span",
|
|
1875
1875
|
{
|
|
1876
|
-
class:
|
|
1876
|
+
class: q(["list-field-label", { required: C.required }])
|
|
1877
1877
|
},
|
|
1878
1878
|
$(C.label || C.key),
|
|
1879
1879
|
3
|
|
@@ -1884,38 +1884,38 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1884
1884
|
class: "list-input",
|
|
1885
1885
|
value: y(c(w, C)),
|
|
1886
1886
|
disabled: ((j = t.field) == null ? void 0 : j.disabled) || C.disabled,
|
|
1887
|
-
onChange: (
|
|
1887
|
+
onChange: (K) => T(w, C, K)
|
|
1888
1888
|
}, [
|
|
1889
1889
|
l(
|
|
1890
1890
|
"option",
|
|
1891
|
-
|
|
1891
|
+
Yl,
|
|
1892
1892
|
$(C.placeholder || "请选择"),
|
|
1893
1893
|
1
|
|
1894
1894
|
/* TEXT */
|
|
1895
1895
|
),
|
|
1896
1896
|
(s(!0), i(
|
|
1897
|
-
|
|
1897
|
+
z,
|
|
1898
1898
|
null,
|
|
1899
|
-
|
|
1900
|
-
key:
|
|
1901
|
-
value:
|
|
1902
|
-
}, $(
|
|
1899
|
+
J(C.initOptions || [], (K) => (s(), i("option", {
|
|
1900
|
+
key: K.code,
|
|
1901
|
+
value: K.code
|
|
1902
|
+
}, $(K.name), 9, zl))),
|
|
1903
1903
|
128
|
|
1904
1904
|
/* KEYED_FRAGMENT */
|
|
1905
1905
|
))
|
|
1906
|
-
], 40,
|
|
1906
|
+
], 40, Hl)) : (s(), i("input", {
|
|
1907
1907
|
key: 1,
|
|
1908
1908
|
class: "list-input",
|
|
1909
1909
|
type: C.type === "number" ? "number" : C.type === "phone" ? "tel" : "text",
|
|
1910
1910
|
value: c(w, C),
|
|
1911
1911
|
placeholder: C.placeholder || "请输入",
|
|
1912
|
-
disabled: ((
|
|
1913
|
-
onBlur: (
|
|
1914
|
-
}, null, 40,
|
|
1915
|
-
|
|
1912
|
+
disabled: ((G = t.field) == null ? void 0 : G.disabled) || C.disabled,
|
|
1913
|
+
onBlur: (K) => d(w, C, K)
|
|
1914
|
+
}, null, 40, Gl)),
|
|
1915
|
+
R(w, C.key) ? (s(), i(
|
|
1916
1916
|
"span",
|
|
1917
|
-
|
|
1918
|
-
$(
|
|
1917
|
+
Wl,
|
|
1918
|
+
$(R(w, C.key)),
|
|
1919
1919
|
1
|
|
1920
1920
|
/* TEXT */
|
|
1921
1921
|
)) : x("v-if", !0)
|
|
@@ -1929,16 +1929,16 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1929
1929
|
128
|
|
1930
1930
|
/* KEYED_FRAGMENT */
|
|
1931
1931
|
)),
|
|
1932
|
-
Object.keys(o.value).length ? (s(), i("p",
|
|
1932
|
+
Object.keys(o.value).length ? (s(), i("p", Jl, " 请修改重复或冲突的联系人手机号。 ")) : x("v-if", !0),
|
|
1933
1933
|
l("button", {
|
|
1934
1934
|
type: "button",
|
|
1935
1935
|
class: "add-button",
|
|
1936
|
-
disabled: !g.value || ((
|
|
1936
|
+
disabled: !g.value || ((v = t.field) == null ? void 0 : v.disabled),
|
|
1937
1937
|
onClick: A
|
|
1938
|
-
}, $(((_ = t.item.listMeta) == null ? void 0 : _.addButtonText) || "+ 添加联系人"), 9,
|
|
1938
|
+
}, $(((_ = t.item.listMeta) == null ? void 0 : _.addButtonText) || "+ 添加联系人"), 9, Xl),
|
|
1939
1939
|
l(
|
|
1940
1940
|
"p",
|
|
1941
|
-
|
|
1941
|
+
Ql,
|
|
1942
1942
|
$(m.value) + "–" + $(h.value ?? "∞") + " 项,当前 " + $(f.value.length) + " 项",
|
|
1943
1943
|
1
|
|
1944
1944
|
/* TEXT */
|
|
@@ -1949,7 +1949,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1949
1949
|
);
|
|
1950
1950
|
};
|
|
1951
1951
|
}
|
|
1952
|
-
}),
|
|
1952
|
+
}), ea = /* @__PURE__ */ H(Zl, [["__scopeId", "data-v-e320f716"]]), ta = { class: "ctrl-date" }, la = ["value", "disabled", "aria-label"], aa = ["value", "disabled", "aria-label"], na = ["value", "disabled", "aria-label"], oa = /* @__PURE__ */ U({
|
|
1953
1953
|
__name: "DateControl",
|
|
1954
1954
|
props: {
|
|
1955
1955
|
item: {},
|
|
@@ -1958,9 +1958,9 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1958
1958
|
},
|
|
1959
1959
|
emits: ["change"],
|
|
1960
1960
|
setup(t, { emit: n }) {
|
|
1961
|
-
var y,
|
|
1962
|
-
const e = t, r = n, f = b(() => e.item.type === "dateRange"), p =
|
|
1963
|
-
|
|
1961
|
+
var y, O, d;
|
|
1962
|
+
const e = t, r = n, f = b(() => e.item.type === "dateRange"), p = P(g((y = e.field) == null ? void 0 : y.value)), m = P(a((O = e.field) == null ? void 0 : O.value)[0]), h = P(a((d = e.field) == null ? void 0 : d.value)[1]);
|
|
1963
|
+
ee(
|
|
1964
1964
|
() => {
|
|
1965
1965
|
var T;
|
|
1966
1966
|
return (T = e.field) == null ? void 0 : T.value;
|
|
@@ -1993,10 +1993,10 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
1993
1993
|
r("change", { value: T || A ? [T, A] : "", eventType: "pickChange" });
|
|
1994
1994
|
}
|
|
1995
1995
|
return (T, A) => {
|
|
1996
|
-
var L,
|
|
1997
|
-
return s(), i("div",
|
|
1996
|
+
var L, R, u;
|
|
1997
|
+
return s(), i("div", ta, [
|
|
1998
1998
|
f.value ? (s(), i(
|
|
1999
|
-
|
|
1999
|
+
z,
|
|
2000
2000
|
{ key: 0 },
|
|
2001
2001
|
[
|
|
2002
2002
|
l("input", {
|
|
@@ -2008,7 +2008,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2008
2008
|
onChange: A[0] || (A[0] = (k) => {
|
|
2009
2009
|
m.value = k.target.value, c();
|
|
2010
2010
|
})
|
|
2011
|
-
}, null, 40,
|
|
2011
|
+
}, null, 40, la),
|
|
2012
2012
|
A[2] || (A[2] = l(
|
|
2013
2013
|
"span",
|
|
2014
2014
|
{ class: "ctrl-date-sep" },
|
|
@@ -2020,12 +2020,12 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2020
2020
|
class: "ctrl-date-input",
|
|
2021
2021
|
type: "date",
|
|
2022
2022
|
value: h.value,
|
|
2023
|
-
disabled: (
|
|
2023
|
+
disabled: (R = t.field) == null ? void 0 : R.disabled,
|
|
2024
2024
|
"aria-label": (t.item.label || "日期") + "结束",
|
|
2025
2025
|
onChange: A[1] || (A[1] = (k) => {
|
|
2026
2026
|
h.value = k.target.value, c();
|
|
2027
2027
|
})
|
|
2028
|
-
}, null, 40,
|
|
2028
|
+
}, null, 40, aa)
|
|
2029
2029
|
],
|
|
2030
2030
|
64
|
|
2031
2031
|
/* STABLE_FRAGMENT */
|
|
@@ -2037,14 +2037,14 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2037
2037
|
disabled: (u = t.field) == null ? void 0 : u.disabled,
|
|
2038
2038
|
"aria-label": t.item.label || "日期",
|
|
2039
2039
|
onChange: o
|
|
2040
|
-
}, null, 40,
|
|
2040
|
+
}, null, 40, na))
|
|
2041
2041
|
]);
|
|
2042
2042
|
};
|
|
2043
2043
|
}
|
|
2044
|
-
}),
|
|
2044
|
+
}), sa = /* @__PURE__ */ H(oa, [["__scopeId", "data-v-fdf889db"]]), ia = { class: "ctrl-verify-wrap" }, ra = { class: "ctrl-verify" }, ca = ["value", "placeholder", "disabled", "maxlength"], ua = ["disabled"], da = {
|
|
2045
2045
|
key: 0,
|
|
2046
2046
|
class: "ctrl-verify-error"
|
|
2047
|
-
},
|
|
2047
|
+
}, va = /* @__PURE__ */ U({
|
|
2048
2048
|
__name: "VerifyCodeControl",
|
|
2049
2049
|
props: {
|
|
2050
2050
|
item: {},
|
|
@@ -2054,9 +2054,9 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2054
2054
|
emits: ["change"],
|
|
2055
2055
|
setup(t, { emit: n }) {
|
|
2056
2056
|
var u;
|
|
2057
|
-
const e = t, r = n, f =
|
|
2057
|
+
const e = t, r = n, f = ae(ue, null), p = P(String(((u = e.field) == null ? void 0 : u.value) || "")), m = P(0), h = P(!1), g = P("");
|
|
2058
2058
|
let a = null;
|
|
2059
|
-
|
|
2059
|
+
ee(
|
|
2060
2060
|
() => {
|
|
2061
2061
|
var k;
|
|
2062
2062
|
return (k = e.field) == null ? void 0 : k.value;
|
|
@@ -2073,8 +2073,8 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2073
2073
|
var k, V;
|
|
2074
2074
|
return ((k = e.item.props) == null ? void 0 : k.verifyText) || ((V = e.item.props) == null ? void 0 : V.reVerifyText) || "获取验证码";
|
|
2075
2075
|
}
|
|
2076
|
-
), y = b(() => m.value > 0),
|
|
2077
|
-
function
|
|
2076
|
+
), y = b(() => m.value > 0), O = b(() => m.value > 0 ? `${m.value}s` : h.value ? "发送中" : c.value);
|
|
2077
|
+
function d(k) {
|
|
2078
2078
|
p.value = k.target.value;
|
|
2079
2079
|
}
|
|
2080
2080
|
function T() {
|
|
@@ -2089,49 +2089,49 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2089
2089
|
m.value -= 1, m.value <= 0 && A();
|
|
2090
2090
|
}, 1e3);
|
|
2091
2091
|
}
|
|
2092
|
-
async function
|
|
2093
|
-
var k, V,
|
|
2092
|
+
async function R() {
|
|
2093
|
+
var k, V, v, _, I, w;
|
|
2094
2094
|
if (!(y.value || h.value || (k = e.field) != null && k.disabled)) {
|
|
2095
2095
|
g.value = "", h.value = !0;
|
|
2096
2096
|
try {
|
|
2097
|
-
const
|
|
2098
|
-
if (
|
|
2099
|
-
const S = ((V = e.item.props) == null ? void 0 : V.mobileKey) || ((
|
|
2100
|
-
await
|
|
2097
|
+
const M = oe(f);
|
|
2098
|
+
if (M != null && M.sendVerifyCode) {
|
|
2099
|
+
const S = ((V = e.item.props) == null ? void 0 : V.mobileKey) || ((v = e.item.props) == null ? void 0 : v.bindMobileKey), C = S && ((w = (I = (_ = e.formCore) == null ? void 0 : _.fields) == null ? void 0 : I[S]) == null ? void 0 : w.value) != null ? String(e.formCore.fields[S].value) : void 0;
|
|
2100
|
+
await M.sendVerifyCode({ item: e.item, mobile: C });
|
|
2101
2101
|
}
|
|
2102
2102
|
L();
|
|
2103
|
-
} catch (
|
|
2104
|
-
g.value = (
|
|
2103
|
+
} catch (M) {
|
|
2104
|
+
g.value = (M == null ? void 0 : M.message) || "发送失败";
|
|
2105
2105
|
} finally {
|
|
2106
2106
|
h.value = !1;
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
|
-
return
|
|
2111
|
-
var
|
|
2112
|
-
return s(), i("div",
|
|
2113
|
-
l("div",
|
|
2110
|
+
return Ne(A), (k, V) => {
|
|
2111
|
+
var v, _, I;
|
|
2112
|
+
return s(), i("div", ia, [
|
|
2113
|
+
l("div", ra, [
|
|
2114
2114
|
l("input", {
|
|
2115
2115
|
class: "ctrl-verify-input",
|
|
2116
2116
|
type: "text",
|
|
2117
2117
|
inputmode: "numeric",
|
|
2118
2118
|
value: p.value,
|
|
2119
2119
|
placeholder: t.item.placeholder || "请输入验证码",
|
|
2120
|
-
disabled: (
|
|
2120
|
+
disabled: (v = t.field) == null ? void 0 : v.disabled,
|
|
2121
2121
|
maxlength: ((_ = t.item.props) == null ? void 0 : _.maxlength) || 6,
|
|
2122
|
-
onInput:
|
|
2122
|
+
onInput: d,
|
|
2123
2123
|
onBlur: T
|
|
2124
|
-
}, null, 40,
|
|
2124
|
+
}, null, 40, ca),
|
|
2125
2125
|
l("button", {
|
|
2126
2126
|
type: "button",
|
|
2127
2127
|
class: "ctrl-verify-btn",
|
|
2128
2128
|
disabled: ((I = t.field) == null ? void 0 : I.disabled) || y.value || h.value,
|
|
2129
|
-
onClick:
|
|
2130
|
-
}, $(
|
|
2129
|
+
onClick: R
|
|
2130
|
+
}, $(O.value), 9, ua)
|
|
2131
2131
|
]),
|
|
2132
2132
|
g.value ? (s(), i(
|
|
2133
2133
|
"div",
|
|
2134
|
-
|
|
2134
|
+
da,
|
|
2135
2135
|
$(g.value),
|
|
2136
2136
|
1
|
|
2137
2137
|
/* TEXT */
|
|
@@ -2139,13 +2139,13 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2139
2139
|
]);
|
|
2140
2140
|
};
|
|
2141
2141
|
}
|
|
2142
|
-
}),
|
|
2142
|
+
}), fa = /* @__PURE__ */ H(va, [["__scopeId", "data-v-53229668"]]), ma = { class: "ctrl-upload-wrap" }, pa = { class: "ctrl-upload" }, ha = ["src"], ga = ["onClick"], ya = {
|
|
2143
2143
|
key: 0,
|
|
2144
2144
|
class: "ctrl-upload-add"
|
|
2145
|
-
},
|
|
2145
|
+
}, ka = { class: "ctrl-upload-hint" }, ba = ["multiple"], _a = {
|
|
2146
2146
|
key: 0,
|
|
2147
2147
|
class: "ctrl-upload-error"
|
|
2148
|
-
},
|
|
2148
|
+
}, Ca = /* @__PURE__ */ U({
|
|
2149
2149
|
__name: "ImageUploadControl",
|
|
2150
2150
|
props: {
|
|
2151
2151
|
item: {},
|
|
@@ -2154,52 +2154,52 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2154
2154
|
},
|
|
2155
2155
|
emits: ["change"],
|
|
2156
2156
|
setup(t, { emit: n }) {
|
|
2157
|
-
var
|
|
2158
|
-
const e = t, r = n, f =
|
|
2159
|
-
|
|
2157
|
+
var O;
|
|
2158
|
+
const e = t, r = n, f = ae(ue, null), p = P(o((O = e.field) == null ? void 0 : O.value)), m = P(!1), h = P("");
|
|
2159
|
+
ee(
|
|
2160
2160
|
() => {
|
|
2161
|
-
var
|
|
2162
|
-
return (
|
|
2161
|
+
var d;
|
|
2162
|
+
return (d = e.field) == null ? void 0 : d.value;
|
|
2163
2163
|
},
|
|
2164
|
-
(
|
|
2165
|
-
p.value = o(
|
|
2164
|
+
(d) => {
|
|
2165
|
+
p.value = o(d);
|
|
2166
2166
|
}
|
|
2167
2167
|
);
|
|
2168
2168
|
const g = b(() => {
|
|
2169
|
-
var
|
|
2170
|
-
return Number((
|
|
2169
|
+
var d;
|
|
2170
|
+
return Number((d = e.item.props) == null ? void 0 : d.maxCount) || 1;
|
|
2171
2171
|
}), a = b(
|
|
2172
2172
|
() => {
|
|
2173
|
-
var
|
|
2174
|
-
return p.value.length < g.value && !((
|
|
2173
|
+
var d;
|
|
2174
|
+
return p.value.length < g.value && !((d = e.field) != null && d.disabled) && !m.value;
|
|
2175
2175
|
}
|
|
2176
2176
|
);
|
|
2177
|
-
function o(
|
|
2178
|
-
return Array.isArray(
|
|
2177
|
+
function o(d) {
|
|
2178
|
+
return Array.isArray(d) ? d.map(String).filter(Boolean) : typeof d == "string" && d ? [d] : [];
|
|
2179
2179
|
}
|
|
2180
|
-
async function c(
|
|
2180
|
+
async function c(d) {
|
|
2181
2181
|
var u;
|
|
2182
|
-
const T =
|
|
2182
|
+
const T = d.target, A = Array.from(T.files || []);
|
|
2183
2183
|
if (T.value = "", !A.length || (u = e.field) != null && u.disabled) return;
|
|
2184
|
-
const L = g.value - p.value.length,
|
|
2185
|
-
if (
|
|
2184
|
+
const L = g.value - p.value.length, R = A.slice(0, Math.max(0, L));
|
|
2185
|
+
if (R.length) {
|
|
2186
2186
|
h.value = "", m.value = !0;
|
|
2187
2187
|
try {
|
|
2188
|
-
const k =
|
|
2188
|
+
const k = oe(f);
|
|
2189
2189
|
let V;
|
|
2190
2190
|
if (k != null && k.uploadFile) {
|
|
2191
|
-
const
|
|
2192
|
-
for (const _ of
|
|
2191
|
+
const v = [];
|
|
2192
|
+
for (const _ of R) {
|
|
2193
2193
|
const I = await k.uploadFile(
|
|
2194
2194
|
{ name: _.name, size: _.size, raw: _ },
|
|
2195
2195
|
{ item: e.item }
|
|
2196
2196
|
);
|
|
2197
2197
|
if (!(I != null && I.url)) throw new Error("上传未返回 url");
|
|
2198
|
-
|
|
2198
|
+
v.push(I.url);
|
|
2199
2199
|
}
|
|
2200
|
-
V = [...p.value, ...
|
|
2200
|
+
V = [...p.value, ...v];
|
|
2201
2201
|
} else
|
|
2202
|
-
V = [...p.value, ...
|
|
2202
|
+
V = [...p.value, ...R.map((v) => URL.createObjectURL(v))];
|
|
2203
2203
|
p.value = V, r("change", { value: V, eventType: "pickChange" });
|
|
2204
2204
|
} catch (k) {
|
|
2205
2205
|
h.value = (k == null ? void 0 : k.message) || "上传失败";
|
|
@@ -2208,19 +2208,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
}
|
|
2211
|
-
function y(
|
|
2211
|
+
function y(d) {
|
|
2212
2212
|
var A;
|
|
2213
2213
|
if ((A = e.field) != null && A.disabled) return;
|
|
2214
|
-
const T = p.value.filter((L,
|
|
2214
|
+
const T = p.value.filter((L, R) => R !== d);
|
|
2215
2215
|
p.value = T, r("change", { value: T, eventType: "pickChange" });
|
|
2216
2216
|
}
|
|
2217
|
-
return (
|
|
2218
|
-
l("div",
|
|
2217
|
+
return (d, T) => (s(), i("div", ma, [
|
|
2218
|
+
l("div", pa, [
|
|
2219
2219
|
(s(!0), i(
|
|
2220
|
-
|
|
2220
|
+
z,
|
|
2221
2221
|
null,
|
|
2222
|
-
|
|
2223
|
-
var
|
|
2222
|
+
J(p.value, (A, L) => {
|
|
2223
|
+
var R;
|
|
2224
2224
|
return s(), i("div", {
|
|
2225
2225
|
key: A + L,
|
|
2226
2226
|
class: "ctrl-upload-thumb"
|
|
@@ -2228,20 +2228,20 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2228
2228
|
l("img", {
|
|
2229
2229
|
src: A,
|
|
2230
2230
|
alt: ""
|
|
2231
|
-
}, null, 8,
|
|
2232
|
-
(
|
|
2231
|
+
}, null, 8, ha),
|
|
2232
|
+
(R = t.field) != null && R.disabled ? x("v-if", !0) : (s(), i("button", {
|
|
2233
2233
|
key: 0,
|
|
2234
2234
|
type: "button",
|
|
2235
2235
|
class: "ctrl-upload-remove",
|
|
2236
2236
|
"aria-label": "删除图片",
|
|
2237
2237
|
onClick: (u) => y(L)
|
|
2238
|
-
}, " × ", 8,
|
|
2238
|
+
}, " × ", 8, ga))
|
|
2239
2239
|
]);
|
|
2240
2240
|
}),
|
|
2241
2241
|
128
|
|
2242
2242
|
/* KEYED_FRAGMENT */
|
|
2243
2243
|
)),
|
|
2244
|
-
a.value ? (s(), i("label",
|
|
2244
|
+
a.value ? (s(), i("label", ya, [
|
|
2245
2245
|
T[0] || (T[0] = l(
|
|
2246
2246
|
"span",
|
|
2247
2247
|
null,
|
|
@@ -2251,7 +2251,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2251
2251
|
)),
|
|
2252
2252
|
l(
|
|
2253
2253
|
"span",
|
|
2254
|
-
|
|
2254
|
+
ka,
|
|
2255
2255
|
$(m.value ? "…" : t.item.placeholder || "上传"),
|
|
2256
2256
|
1
|
|
2257
2257
|
/* TEXT */
|
|
@@ -2262,19 +2262,19 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2262
2262
|
multiple: g.value > 1,
|
|
2263
2263
|
hidden: "",
|
|
2264
2264
|
onChange: c
|
|
2265
|
-
}, null, 40,
|
|
2265
|
+
}, null, 40, ba)
|
|
2266
2266
|
])) : x("v-if", !0)
|
|
2267
2267
|
]),
|
|
2268
2268
|
h.value ? (s(), i(
|
|
2269
2269
|
"div",
|
|
2270
|
-
|
|
2270
|
+
_a,
|
|
2271
2271
|
$(h.value),
|
|
2272
2272
|
1
|
|
2273
2273
|
/* TEXT */
|
|
2274
2274
|
)) : x("v-if", !0)
|
|
2275
2275
|
]));
|
|
2276
2276
|
}
|
|
2277
|
-
}),
|
|
2277
|
+
}), $a = /* @__PURE__ */ H(Ca, [["__scopeId", "data-v-f549efb4"]]), Ta = { class: "ctrl-slider" }, wa = ["min", "max", "step", "value", "disabled", "aria-label"], Sa = { class: "ctrl-slider-value" }, xa = /* @__PURE__ */ U({
|
|
2278
2278
|
__name: "SliderControl",
|
|
2279
2279
|
props: {
|
|
2280
2280
|
item: {},
|
|
@@ -2293,8 +2293,8 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2293
2293
|
}), m = b(() => {
|
|
2294
2294
|
var y;
|
|
2295
2295
|
return Number(((y = e.item.props) == null ? void 0 : y.step) ?? 1);
|
|
2296
|
-
}), h =
|
|
2297
|
-
|
|
2296
|
+
}), h = P(g((c = e.field) == null ? void 0 : c.value, f.value));
|
|
2297
|
+
ee(
|
|
2298
2298
|
() => {
|
|
2299
2299
|
var y;
|
|
2300
2300
|
return (y = e.field) == null ? void 0 : y.value;
|
|
@@ -2303,20 +2303,20 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2303
2303
|
h.value = g(y, f.value);
|
|
2304
2304
|
}
|
|
2305
2305
|
);
|
|
2306
|
-
function g(y,
|
|
2307
|
-
const
|
|
2308
|
-
return Number.isFinite(
|
|
2306
|
+
function g(y, O) {
|
|
2307
|
+
const d = Number(y);
|
|
2308
|
+
return Number.isFinite(d) ? d : O;
|
|
2309
2309
|
}
|
|
2310
2310
|
function a(y) {
|
|
2311
2311
|
h.value = Number(y.target.value);
|
|
2312
2312
|
}
|
|
2313
2313
|
function o(y) {
|
|
2314
|
-
const
|
|
2315
|
-
h.value =
|
|
2314
|
+
const O = Number(y.target.value);
|
|
2315
|
+
h.value = O, r("change", { value: O, eventType: "pickChange" });
|
|
2316
2316
|
}
|
|
2317
|
-
return (y,
|
|
2318
|
-
var
|
|
2319
|
-
return s(), i("div",
|
|
2317
|
+
return (y, O) => {
|
|
2318
|
+
var d;
|
|
2319
|
+
return s(), i("div", Ta, [
|
|
2320
2320
|
l("input", {
|
|
2321
2321
|
class: "ctrl-slider-input",
|
|
2322
2322
|
type: "range",
|
|
@@ -2324,14 +2324,14 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2324
2324
|
max: p.value,
|
|
2325
2325
|
step: m.value,
|
|
2326
2326
|
value: h.value,
|
|
2327
|
-
disabled: (
|
|
2327
|
+
disabled: (d = t.field) == null ? void 0 : d.disabled,
|
|
2328
2328
|
"aria-label": t.item.label || "滑块",
|
|
2329
2329
|
onInput: a,
|
|
2330
2330
|
onChange: o
|
|
2331
|
-
}, null, 40,
|
|
2331
|
+
}, null, 40, wa),
|
|
2332
2332
|
l(
|
|
2333
2333
|
"span",
|
|
2334
|
-
|
|
2334
|
+
Sa,
|
|
2335
2335
|
$(h.value),
|
|
2336
2336
|
1
|
|
2337
2337
|
/* TEXT */
|
|
@@ -2339,7 +2339,7 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2339
2339
|
]);
|
|
2340
2340
|
};
|
|
2341
2341
|
}
|
|
2342
|
-
}),
|
|
2342
|
+
}), Aa = /* @__PURE__ */ H(xa, [["__scopeId", "data-v-ac8f0c27"]]), Ia = {
|
|
2343
2343
|
input: "InputControl",
|
|
2344
2344
|
textarea: "InputControl",
|
|
2345
2345
|
number: "InputControl",
|
|
@@ -2363,30 +2363,30 @@ const Ze = { class: "ctrl-input-wrapper" }, et = ["value", "placeholder", "disab
|
|
|
2363
2363
|
custom: "InputControl",
|
|
2364
2364
|
list: "ListControl"
|
|
2365
2365
|
};
|
|
2366
|
-
function
|
|
2367
|
-
return
|
|
2366
|
+
function Ma(t, n) {
|
|
2367
|
+
return Te(t) ? "TaskControl" : Ia[n] || "InputControl";
|
|
2368
2368
|
}
|
|
2369
|
-
function
|
|
2370
|
-
const r =
|
|
2369
|
+
function Oa(t, n, e) {
|
|
2370
|
+
const r = Te(t);
|
|
2371
2371
|
return r ? {
|
|
2372
2372
|
...e || {},
|
|
2373
2373
|
taskType: t,
|
|
2374
2374
|
taskCategory: r === "customer" ? "CUSTOMER_TASK" : r === "inline" ? "inline" : "TASKS"
|
|
2375
2375
|
} : e;
|
|
2376
2376
|
}
|
|
2377
|
-
function
|
|
2377
|
+
function Va(t) {
|
|
2378
2378
|
if (typeof t != "object" || t === null)
|
|
2379
2379
|
return { value: t };
|
|
2380
2380
|
const n = t.value !== void 0 ? t.value : t, e = t.eventType, { value: r, eventType: f, ...p } = t;
|
|
2381
2381
|
return Object.keys(p).length > 0 ? { value: n, eventType: e, extraFields: p } : { value: n, eventType: e };
|
|
2382
2382
|
}
|
|
2383
|
-
const
|
|
2383
|
+
const Pa = ["data-label-position", "data-field-key"], Ea = {
|
|
2384
2384
|
key: 0,
|
|
2385
2385
|
class: "form-error"
|
|
2386
|
-
},
|
|
2386
|
+
}, Fa = {
|
|
2387
2387
|
key: 1,
|
|
2388
2388
|
class: "form-icon"
|
|
2389
|
-
},
|
|
2389
|
+
}, Ra = { key: 0 }, Da = { key: 1 }, Na = { key: 2 }, La = /* @__PURE__ */ U({
|
|
2390
2390
|
__name: "FormItem",
|
|
2391
2391
|
props: {
|
|
2392
2392
|
item: {},
|
|
@@ -2394,21 +2394,21 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2394
2394
|
formCore: {}
|
|
2395
2395
|
},
|
|
2396
2396
|
setup(t) {
|
|
2397
|
-
const n = t, e =
|
|
2398
|
-
InputControl:
|
|
2399
|
-
SelectControl:
|
|
2400
|
-
CascaderControl:
|
|
2401
|
-
SearchControl:
|
|
2402
|
-
AddressControl:
|
|
2403
|
-
AgreementControl:
|
|
2404
|
-
TaskControl:
|
|
2405
|
-
ListControl:
|
|
2406
|
-
DateControl:
|
|
2407
|
-
VerifyCodeControl:
|
|
2408
|
-
ImageUploadControl:
|
|
2409
|
-
SliderControl:
|
|
2397
|
+
const n = t, e = ae("customControls", {}), r = ae("themeLabelPosition", void 0), f = {
|
|
2398
|
+
InputControl: it,
|
|
2399
|
+
SelectControl: pt,
|
|
2400
|
+
CascaderControl: xt,
|
|
2401
|
+
SearchControl: Rt,
|
|
2402
|
+
AddressControl: zt,
|
|
2403
|
+
AgreementControl: Qt,
|
|
2404
|
+
TaskControl: Kl,
|
|
2405
|
+
ListControl: ea,
|
|
2406
|
+
DateControl: sa,
|
|
2407
|
+
VerifyCodeControl: fa,
|
|
2408
|
+
ImageUploadControl: $a,
|
|
2409
|
+
SliderControl: Aa
|
|
2410
2410
|
}, p = b(() => {
|
|
2411
|
-
const a =
|
|
2411
|
+
const a = Oa(
|
|
2412
2412
|
n.item.key,
|
|
2413
2413
|
n.item.type,
|
|
2414
2414
|
n.item.raw.props || {}
|
|
@@ -2423,9 +2423,9 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2423
2423
|
}), m = b(
|
|
2424
2424
|
() => {
|
|
2425
2425
|
var a;
|
|
2426
|
-
return
|
|
2426
|
+
return Ke(
|
|
2427
2427
|
(a = n.item.raw) == null ? void 0 : a.labelPosition,
|
|
2428
|
-
|
|
2428
|
+
oe(r)
|
|
2429
2429
|
);
|
|
2430
2430
|
}
|
|
2431
2431
|
), h = b(() => {
|
|
@@ -2437,11 +2437,11 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2437
2437
|
if (c && typeof c != "string")
|
|
2438
2438
|
return c;
|
|
2439
2439
|
}
|
|
2440
|
-
const a =
|
|
2440
|
+
const a = Ma(n.item.key, n.item.type);
|
|
2441
2441
|
return f[a];
|
|
2442
2442
|
});
|
|
2443
2443
|
function g(a) {
|
|
2444
|
-
const { value: o, eventType: c, extraFields: y } =
|
|
2444
|
+
const { value: o, eventType: c, extraFields: y } = Va(a);
|
|
2445
2445
|
n.formCore.setControlData(n.item.key, o, {
|
|
2446
2446
|
eventType: c,
|
|
2447
2447
|
...y ? { extraFields: y } : {}
|
|
@@ -2450,7 +2450,7 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2450
2450
|
return (a, o) => {
|
|
2451
2451
|
var c, y;
|
|
2452
2452
|
return s(), i("div", {
|
|
2453
|
-
class:
|
|
2453
|
+
class: q(["form-item", {
|
|
2454
2454
|
"form-item-error": (c = t.field) == null ? void 0 : c.errMsg,
|
|
2455
2455
|
"form-item--top": m.value === "top",
|
|
2456
2456
|
"form-item--left": m.value === "left"
|
|
@@ -2462,7 +2462,7 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2462
2462
|
"label",
|
|
2463
2463
|
{
|
|
2464
2464
|
key: 0,
|
|
2465
|
-
class:
|
|
2465
|
+
class: q(["form-label", { required: t.item.required }])
|
|
2466
2466
|
},
|
|
2467
2467
|
$(t.item.label),
|
|
2468
2468
|
3
|
|
@@ -2471,10 +2471,10 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2471
2471
|
l(
|
|
2472
2472
|
"div",
|
|
2473
2473
|
{
|
|
2474
|
-
class:
|
|
2474
|
+
class: q(["form-control", { "form-control-full": t.item.hideLabel }])
|
|
2475
2475
|
},
|
|
2476
2476
|
[
|
|
2477
|
-
(s(),
|
|
2477
|
+
(s(), te(ce(h.value), {
|
|
2478
2478
|
item: p.value.raw,
|
|
2479
2479
|
field: t.field,
|
|
2480
2480
|
formCore: t.formCore,
|
|
@@ -2482,7 +2482,7 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2482
2482
|
}, null, 40, ["item", "field", "formCore"])),
|
|
2483
2483
|
(y = t.field) != null && y.errMsg ? (s(), i(
|
|
2484
2484
|
"div",
|
|
2485
|
-
|
|
2485
|
+
Ea,
|
|
2486
2486
|
$(t.field.errMsg),
|
|
2487
2487
|
1
|
|
2488
2488
|
/* TEXT */
|
|
@@ -2491,13 +2491,13 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2491
2491
|
2
|
|
2492
2492
|
/* CLASS */
|
|
2493
2493
|
),
|
|
2494
|
-
t.item.rightIcon && !t.item.hideLabel && m.value === "left" ? (s(), i("span",
|
|
2495
|
-
t.item.rightIcon === "arrow" ? (s(), i("span",
|
|
2494
|
+
t.item.rightIcon && !t.item.hideLabel && m.value === "left" ? (s(), i("span", Fa, [
|
|
2495
|
+
t.item.rightIcon === "arrow" ? (s(), i("span", Ra, "›")) : t.item.rightIcon === "location" ? (s(), i("span", Da, "📍")) : t.item.rightIcon === "search" ? (s(), i("span", Na, "🔍")) : x("v-if", !0)
|
|
2496
2496
|
])) : x("v-if", !0)
|
|
2497
|
-
], 10,
|
|
2497
|
+
], 10, Pa);
|
|
2498
2498
|
};
|
|
2499
2499
|
}
|
|
2500
|
-
}),
|
|
2500
|
+
}), we = /* @__PURE__ */ H(La, [["__scopeId", "data-v-177bcff2"]]), ja = { class: "form-group" }, Ba = { class: "group-body" }, Ka = /* @__PURE__ */ U({
|
|
2501
2501
|
__name: "FormGroup",
|
|
2502
2502
|
props: {
|
|
2503
2503
|
group: {},
|
|
@@ -2505,23 +2505,23 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2505
2505
|
formCore: {}
|
|
2506
2506
|
},
|
|
2507
2507
|
setup(t) {
|
|
2508
|
-
const n = t, e =
|
|
2508
|
+
const n = t, e = ae(
|
|
2509
2509
|
"FormItemComponent",
|
|
2510
2510
|
void 0
|
|
2511
2511
|
), r = b(
|
|
2512
|
-
() => e ?
|
|
2512
|
+
() => e ? oe(e) : we
|
|
2513
2513
|
), f = b(
|
|
2514
2514
|
() => n.group.items.filter((p) => {
|
|
2515
2515
|
const m = n.fields[p.key];
|
|
2516
2516
|
return !m || m.visible;
|
|
2517
2517
|
})
|
|
2518
2518
|
);
|
|
2519
|
-
return (p, m) => (s(), i("div",
|
|
2520
|
-
l("div",
|
|
2519
|
+
return (p, m) => (s(), i("div", ja, [
|
|
2520
|
+
l("div", Ba, [
|
|
2521
2521
|
(s(!0), i(
|
|
2522
|
-
|
|
2522
|
+
z,
|
|
2523
2523
|
null,
|
|
2524
|
-
|
|
2524
|
+
J(f.value, (h) => (s(), te(ce(r.value), {
|
|
2525
2525
|
key: h.key,
|
|
2526
2526
|
item: h,
|
|
2527
2527
|
field: t.fields[h.key],
|
|
@@ -2533,10 +2533,10 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2533
2533
|
])
|
|
2534
2534
|
]));
|
|
2535
2535
|
}
|
|
2536
|
-
}),
|
|
2536
|
+
}), qa = /* @__PURE__ */ H(Ka, [["__scopeId", "data-v-83eda13b"]]), Ua = ["data-shell", "data-label-align", "data-content-align"], Ha = {
|
|
2537
2537
|
key: 0,
|
|
2538
2538
|
class: "form-render__title"
|
|
2539
|
-
},
|
|
2539
|
+
}, Ya = /* @__PURE__ */ U({
|
|
2540
2540
|
__name: "FormRender",
|
|
2541
2541
|
props: {
|
|
2542
2542
|
groups: {},
|
|
@@ -2556,18 +2556,18 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2556
2556
|
const n = t, e = b(() => n.labelAlign === "left" || n.labelAlign === "right" || n.labelAlign === "top" ? n.labelAlign : n.labelPosition === "top" ? "top" : (n.labelPosition === "left", "left")), r = b(
|
|
2557
2557
|
() => e.value === "top" ? "top" : "left"
|
|
2558
2558
|
);
|
|
2559
|
-
|
|
2559
|
+
W("customControls", n.customControls || {}), W("themeLabelPosition", r), W("formUiLayout", b(() => ({
|
|
2560
2560
|
labelAlign: e.value,
|
|
2561
2561
|
labelWidth: n.labelWidth ?? "81px",
|
|
2562
2562
|
contentAlign: n.contentAlign ?? "left"
|
|
2563
|
-
}))),
|
|
2563
|
+
}))), W(
|
|
2564
2564
|
"FormItemComponent",
|
|
2565
|
-
b(() => n.FormItemComponent ||
|
|
2566
|
-
),
|
|
2565
|
+
b(() => n.FormItemComponent || we)
|
|
2566
|
+
), W(
|
|
2567
2567
|
ue,
|
|
2568
2568
|
b(() => n.hostHandlers ?? null)
|
|
2569
2569
|
);
|
|
2570
|
-
const f = b(() => n.FormGroupComponent ||
|
|
2570
|
+
const f = b(() => n.FormGroupComponent || qa);
|
|
2571
2571
|
return (p, m) => (s(), i("div", {
|
|
2572
2572
|
class: "form-render",
|
|
2573
2573
|
"data-shell": t.FormGroupComponent ? "override" : "default",
|
|
@@ -2576,15 +2576,15 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2576
2576
|
}, [
|
|
2577
2577
|
t.title ? (s(), i(
|
|
2578
2578
|
"div",
|
|
2579
|
-
|
|
2579
|
+
Ha,
|
|
2580
2580
|
$(t.title),
|
|
2581
2581
|
1
|
|
2582
2582
|
/* TEXT */
|
|
2583
2583
|
)) : x("v-if", !0),
|
|
2584
2584
|
(s(!0), i(
|
|
2585
|
-
|
|
2585
|
+
z,
|
|
2586
2586
|
null,
|
|
2587
|
-
|
|
2587
|
+
J(t.groups, (h) => (s(), te(ce(f.value), {
|
|
2588
2588
|
key: h.key,
|
|
2589
2589
|
group: h,
|
|
2590
2590
|
fields: t.fields,
|
|
@@ -2593,30 +2593,30 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2593
2593
|
128
|
|
2594
2594
|
/* KEYED_FRAGMENT */
|
|
2595
2595
|
)),
|
|
2596
|
-
|
|
2597
|
-
], 8,
|
|
2596
|
+
be(p.$slots, "footer", {}, void 0, !0)
|
|
2597
|
+
], 8, Ua));
|
|
2598
2598
|
}
|
|
2599
|
-
}),
|
|
2599
|
+
}), za = /* @__PURE__ */ H(Ya, [["__scopeId", "data-v-c936694c"]]), Ga = ["data-modern-skin"], Wa = {
|
|
2600
2600
|
key: 0,
|
|
2601
2601
|
class: "apf-prism-form__header"
|
|
2602
|
-
},
|
|
2602
|
+
}, Ja = { class: "apf-prism-form__title" }, Xa = {
|
|
2603
2603
|
key: 0,
|
|
2604
2604
|
class: "apf-prism-form__desc"
|
|
2605
|
-
},
|
|
2605
|
+
}, Qa = {
|
|
2606
2606
|
key: 1,
|
|
2607
2607
|
class: "apf-prism-form__progress",
|
|
2608
2608
|
"data-testid": "prism-form-progress"
|
|
2609
|
-
},
|
|
2609
|
+
}, Za = { class: "apf-prism-form__progress-row" }, en = { key: 0 }, tn = { key: 1 }, ln = { class: "apf-prism-form__bar" }, an = {
|
|
2610
2610
|
key: 2,
|
|
2611
2611
|
class: "apf-prism-form__steps",
|
|
2612
2612
|
"data-testid": "prism-form-steps"
|
|
2613
|
-
},
|
|
2613
|
+
}, nn = ["onClick"], on = {
|
|
2614
2614
|
key: 0,
|
|
2615
2615
|
class: "apf-prism-form__step-nav"
|
|
2616
|
-
},
|
|
2616
|
+
}, sn = ["disabled"], rn = { class: "apf-prism-form__step-count" }, cn = ["disabled"], un = {
|
|
2617
2617
|
key: 0,
|
|
2618
2618
|
class: "apf-prism-form__footer"
|
|
2619
|
-
},
|
|
2619
|
+
}, dn = ["disabled"], vn = /* @__PURE__ */ U({
|
|
2620
2620
|
__name: "PrismForm",
|
|
2621
2621
|
props: {
|
|
2622
2622
|
schema: { default: null },
|
|
@@ -2658,150 +2658,166 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2658
2658
|
() => r.formMode || m.value.formMode || "flat"
|
|
2659
2659
|
), o = b(() => typeof r.showProgressBar == "boolean" ? r.showProgressBar : typeof m.value.showProgressBar == "boolean" ? m.value.showProgressBar : !0), c = b(() => typeof r.readOnly == "boolean" ? r.readOnly : !!m.value.readOnly), y = b(
|
|
2660
2660
|
() => r.keyboardPolicy || m.value.keyboardPolicy || "auto"
|
|
2661
|
-
),
|
|
2662
|
-
() =>
|
|
2663
|
-
),
|
|
2664
|
-
|
|
2665
|
-
|
|
2661
|
+
), O = b(
|
|
2662
|
+
() => qe(r.locale || m.value.locale || "zh-CN")
|
|
2663
|
+
), d = b(() => O.value === "en-US"), T = b(() => Ue(h.value, g.value)), A = He();
|
|
2664
|
+
W(Ye, h), W(ze, g), W(
|
|
2665
|
+
Ge,
|
|
2666
2666
|
b(() => a.value === "collapsible")
|
|
2667
|
-
),
|
|
2668
|
-
|
|
2667
|
+
), W(We, y), W(Je, c), W(
|
|
2668
|
+
Xe,
|
|
2669
2669
|
b(() => r.onTelemetry || null)
|
|
2670
|
-
),
|
|
2671
|
-
|
|
2670
|
+
), W(Qe, O), W(
|
|
2671
|
+
Ze,
|
|
2672
2672
|
b(() => r.customControls || {})
|
|
2673
|
-
),
|
|
2673
|
+
), W(
|
|
2674
2674
|
ue,
|
|
2675
2675
|
b(() => r.hostHandlers ?? null)
|
|
2676
2676
|
);
|
|
2677
|
-
const L =
|
|
2677
|
+
const L = P(null), R = Le(null), u = _e({}), k = P([]), V = P(0), v = P(!1);
|
|
2678
2678
|
let _ = null;
|
|
2679
2679
|
function I() {
|
|
2680
2680
|
const F = /* @__PURE__ */ new Map();
|
|
2681
2681
|
return {
|
|
2682
|
-
get: (
|
|
2683
|
-
set: (
|
|
2684
|
-
remove: (
|
|
2682
|
+
get: (E) => F.get(E),
|
|
2683
|
+
set: (E, D) => F.set(E, D),
|
|
2684
|
+
remove: (E) => F.delete(E)
|
|
2685
2685
|
};
|
|
2686
2686
|
}
|
|
2687
2687
|
function w(F) {
|
|
2688
2688
|
return JSON.parse(JSON.stringify(F));
|
|
2689
2689
|
}
|
|
2690
|
-
function
|
|
2691
|
-
const
|
|
2692
|
-
for (const
|
|
2693
|
-
|
|
2690
|
+
function M(F, E) {
|
|
2691
|
+
const D = new Set(Object.keys(F.fields));
|
|
2692
|
+
for (const B of Object.keys(u))
|
|
2693
|
+
D.has(B) || delete u[B];
|
|
2694
2694
|
const N = {};
|
|
2695
|
-
for (const
|
|
2696
|
-
const
|
|
2697
|
-
u[
|
|
2695
|
+
for (const B of D) {
|
|
2696
|
+
const Y = { ...F.fields[B] };
|
|
2697
|
+
u[B] = Y, N[B] = Y;
|
|
2698
2698
|
}
|
|
2699
|
-
k.value =
|
|
2699
|
+
k.value = $e(E, N, { excludeTaskAndAgreement: !1 }).groups;
|
|
2700
2700
|
}
|
|
2701
2701
|
async function S(F) {
|
|
2702
|
-
if (_ && (_(), _ = null),
|
|
2703
|
-
|
|
2702
|
+
if (_ && (_(), _ = null), v.value = !1, V.value = 0, !F) {
|
|
2703
|
+
R.value = null, k.value = [];
|
|
2704
2704
|
return;
|
|
2705
2705
|
}
|
|
2706
|
-
const
|
|
2707
|
-
|
|
2706
|
+
const E = w(F), D = new ye(E, r.storageAdapter || I());
|
|
2707
|
+
R.value = D;
|
|
2708
2708
|
const N = () => {
|
|
2709
|
-
|
|
2710
|
-
values:
|
|
2709
|
+
M(D, E), f("change", {
|
|
2710
|
+
values: D.collectFormData({ skipVerify: !0 }),
|
|
2711
2711
|
fields: { ...u }
|
|
2712
2712
|
});
|
|
2713
2713
|
};
|
|
2714
|
-
await
|
|
2715
|
-
|
|
2716
|
-
},
|
|
2714
|
+
await D.init(r.initialValues ? { ...r.initialValues } : {}), D.on("afterChange", N), _ = () => {
|
|
2715
|
+
D.off("afterChange", N);
|
|
2716
|
+
}, M(D, E), v.value = !0;
|
|
2717
2717
|
}
|
|
2718
|
-
|
|
2718
|
+
ee(
|
|
2719
2719
|
p,
|
|
2720
2720
|
(F) => {
|
|
2721
2721
|
S(F);
|
|
2722
2722
|
},
|
|
2723
2723
|
{ immediate: !0 }
|
|
2724
|
-
),
|
|
2724
|
+
), Ce(() => {
|
|
2725
2725
|
_ && (_(), _ = null);
|
|
2726
2726
|
});
|
|
2727
|
-
const C = b(() => a.value === "step" && k.value.length > 1), j = b(() => Math.min(V.value, Math.max(0, k.value.length - 1))),
|
|
2727
|
+
const C = b(() => a.value === "step" && k.value.length > 1), j = b(() => Math.min(V.value, Math.max(0, k.value.length - 1))), G = b(
|
|
2728
2728
|
() => C.value ? [k.value[j.value]].filter(Boolean) : k.value
|
|
2729
|
-
),
|
|
2730
|
-
() => o.value ?
|
|
2731
|
-
),
|
|
2732
|
-
() => r.submitText || m.value.submitText || (
|
|
2729
|
+
), K = b(
|
|
2730
|
+
() => o.value ? et(k.value, u) : null
|
|
2731
|
+
), Se = b(
|
|
2732
|
+
() => r.submitText || m.value.submitText || (d.value ? "Submit Form" : "提交表单")
|
|
2733
2733
|
);
|
|
2734
|
-
function
|
|
2735
|
-
var
|
|
2734
|
+
function me(F) {
|
|
2735
|
+
var B;
|
|
2736
2736
|
if (!F || typeof document > "u") return;
|
|
2737
2737
|
if (C.value) {
|
|
2738
|
-
const
|
|
2739
|
-
|
|
2738
|
+
const Y = k.value.findIndex((X) => (X.items || []).some((ge) => ge.key === F));
|
|
2739
|
+
Y >= 0 && (V.value = Y);
|
|
2740
2740
|
}
|
|
2741
|
-
const
|
|
2742
|
-
|
|
2743
|
-
const N =
|
|
2744
|
-
(
|
|
2741
|
+
const E = L.value || document, D = E.querySelector(`[data-field-key="${F}"]`) || E.querySelector('[data-has-error="1"], .m-field-error');
|
|
2742
|
+
D && typeof D.scrollIntoView == "function" && D.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
2743
|
+
const N = D == null ? void 0 : D.querySelector("input, textarea, select");
|
|
2744
|
+
(B = N == null ? void 0 : N.focus) == null || B.call(N, { preventScroll: !0 });
|
|
2745
2745
|
}
|
|
2746
|
-
function
|
|
2746
|
+
function xe(F) {
|
|
2747
2747
|
var N;
|
|
2748
|
-
const
|
|
2749
|
-
let
|
|
2750
|
-
for (const
|
|
2751
|
-
for (const
|
|
2752
|
-
const
|
|
2753
|
-
|
|
2748
|
+
const E = {};
|
|
2749
|
+
let D = null;
|
|
2750
|
+
for (const B of k.value)
|
|
2751
|
+
for (const Y of B.items || []) {
|
|
2752
|
+
const X = (N = F.fields[Y.key]) == null ? void 0 : N.errMsg;
|
|
2753
|
+
X && (E[Y.key] = String(X), D || (D = Y.key));
|
|
2754
2754
|
}
|
|
2755
|
-
return { firstErrorKey:
|
|
2755
|
+
return { firstErrorKey: D, errors: E };
|
|
2756
|
+
}
|
|
2757
|
+
function Ae(F) {
|
|
2758
|
+
return F === !0 || F === "1" || F === 1 || F === "true";
|
|
2759
|
+
}
|
|
2760
|
+
function Ie(F) {
|
|
2761
|
+
const E = String(F || "").trim();
|
|
2762
|
+
return d.value ? E && /^(I have read|I agree|Agree)/i.test(E) ? `Please accept "${E}"` : `Please read and accept ${E || "the agreement"}` : E && /^(我已|已)?阅读并同意/.test(E) ? `请先勾选「${E}」` : `请先阅读并同意${E || "相关协议"}`;
|
|
2756
2763
|
}
|
|
2757
2764
|
function de() {
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2765
|
+
var N;
|
|
2766
|
+
const F = R.value, E = p.value;
|
|
2767
|
+
if (!F || !E) return !1;
|
|
2768
|
+
let D = F.validateAll();
|
|
2769
|
+
for (const B of k.value)
|
|
2770
|
+
for (const Y of B.items || []) {
|
|
2771
|
+
const X = F.fields[Y.key];
|
|
2772
|
+
if (!(!X || X.visible === !1) && Y.type === "agreement" && !X.errMsg && (typeof X.required == "boolean" ? X.required : Y.required === !0 || Array.isArray(Y.rules) && Y.rules.some((ve) => ve.type === "required")) && !Ae(X.value)) {
|
|
2773
|
+
const ve = Array.isArray(Y.rules) ? (N = Y.rules.find((Ve) => Ve.type === "required")) == null ? void 0 : N.message : "";
|
|
2774
|
+
X.errMsg = String(ve || Ie(Y.label || "")), D = !1;
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
if (M(F, E), !D) {
|
|
2778
|
+
const B = xe(F);
|
|
2779
|
+
f("validate-error", B), me(B.firstErrorKey);
|
|
2764
2780
|
}
|
|
2765
|
-
return
|
|
2781
|
+
return D;
|
|
2766
2782
|
}
|
|
2767
|
-
function
|
|
2768
|
-
return
|
|
2783
|
+
function pe() {
|
|
2784
|
+
return R.value ? R.value.collectFormData({ skipVerify: !0 }) : {};
|
|
2769
2785
|
}
|
|
2770
|
-
function
|
|
2786
|
+
function Me(F, E, D) {
|
|
2771
2787
|
var N;
|
|
2772
|
-
(N =
|
|
2788
|
+
(N = R.value) == null || N.setControlData(F, E, D);
|
|
2773
2789
|
}
|
|
2774
|
-
async function
|
|
2775
|
-
const
|
|
2776
|
-
if (
|
|
2790
|
+
async function Oe(F) {
|
|
2791
|
+
const E = p.value;
|
|
2792
|
+
if (E) {
|
|
2777
2793
|
if (F !== void 0) {
|
|
2778
|
-
const
|
|
2794
|
+
const D = w(E);
|
|
2779
2795
|
_ && (_(), _ = null);
|
|
2780
|
-
const N = new
|
|
2781
|
-
|
|
2782
|
-
const
|
|
2783
|
-
|
|
2796
|
+
const N = new ye(D, r.storageAdapter || I());
|
|
2797
|
+
R.value = N;
|
|
2798
|
+
const B = () => {
|
|
2799
|
+
M(N, D), f("change", {
|
|
2784
2800
|
values: N.collectFormData({ skipVerify: !0 }),
|
|
2785
2801
|
fields: { ...u }
|
|
2786
2802
|
});
|
|
2787
2803
|
};
|
|
2788
|
-
await N.init({ ...F }), N.on("afterChange",
|
|
2804
|
+
await N.init({ ...F }), N.on("afterChange", B), _ = () => N.off("afterChange", B), M(N, D), v.value = !0;
|
|
2789
2805
|
return;
|
|
2790
2806
|
}
|
|
2791
|
-
await S(
|
|
2807
|
+
await S(E);
|
|
2792
2808
|
}
|
|
2793
2809
|
}
|
|
2794
|
-
function
|
|
2795
|
-
r.submitting || c.value || de() && f("submit",
|
|
2810
|
+
function he() {
|
|
2811
|
+
r.submitting || c.value || de() && f("submit", pe());
|
|
2796
2812
|
}
|
|
2797
2813
|
return n({
|
|
2798
2814
|
validate: de,
|
|
2799
|
-
getValues:
|
|
2800
|
-
setValue:
|
|
2801
|
-
reset:
|
|
2802
|
-
getCore: () =>
|
|
2803
|
-
}), (F,
|
|
2804
|
-
var
|
|
2815
|
+
getValues: pe,
|
|
2816
|
+
setValue: Me,
|
|
2817
|
+
reset: Oe,
|
|
2818
|
+
getCore: () => R.value
|
|
2819
|
+
}), (F, E) => {
|
|
2820
|
+
var D;
|
|
2805
2821
|
return s(), i("div", {
|
|
2806
2822
|
ref_key: "rootEl",
|
|
2807
2823
|
ref: L,
|
|
@@ -2809,26 +2825,26 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2809
2825
|
"data-modern-skin": h.value,
|
|
2810
2826
|
style: re({ ...T.value, maxWidth: t.maxWidth })
|
|
2811
2827
|
}, [
|
|
2812
|
-
(
|
|
2828
|
+
(D = p.value) != null && D.title ? (s(), i("div", Wa, [
|
|
2813
2829
|
l(
|
|
2814
2830
|
"div",
|
|
2815
|
-
|
|
2831
|
+
Ja,
|
|
2816
2832
|
$(p.value.title),
|
|
2817
2833
|
1
|
|
2818
2834
|
/* TEXT */
|
|
2819
2835
|
),
|
|
2820
2836
|
p.value.description ? (s(), i(
|
|
2821
2837
|
"div",
|
|
2822
|
-
|
|
2838
|
+
Xa,
|
|
2823
2839
|
$(p.value.description),
|
|
2824
2840
|
1
|
|
2825
2841
|
/* TEXT */
|
|
2826
2842
|
)) : x("v-if", !0)
|
|
2827
2843
|
])) : x("v-if", !0),
|
|
2828
|
-
|
|
2829
|
-
l("div",
|
|
2830
|
-
|
|
2831
|
-
|
|
2844
|
+
v.value && K.value && K.value.total > 0 ? (s(), i("div", Qa, [
|
|
2845
|
+
l("div", Za, [
|
|
2846
|
+
d.value ? (s(), i("span", en, [
|
|
2847
|
+
E[3] || (E[3] = Q(
|
|
2832
2848
|
" Progress ",
|
|
2833
2849
|
-1
|
|
2834
2850
|
/* CACHED */
|
|
@@ -2836,17 +2852,17 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2836
2852
|
l(
|
|
2837
2853
|
"strong",
|
|
2838
2854
|
null,
|
|
2839
|
-
$(
|
|
2855
|
+
$(K.value.percent) + "%",
|
|
2840
2856
|
1
|
|
2841
2857
|
/* TEXT */
|
|
2842
2858
|
),
|
|
2843
|
-
|
|
2844
|
-
" (Required " + $(
|
|
2859
|
+
Q(
|
|
2860
|
+
" (Required " + $(K.value.requiredFilled) + "/" + $(K.value.requiredTotal) + ") ",
|
|
2845
2861
|
1
|
|
2846
2862
|
/* TEXT */
|
|
2847
2863
|
)
|
|
2848
|
-
])) : (s(), i("span",
|
|
2849
|
-
|
|
2864
|
+
])) : (s(), i("span", tn, [
|
|
2865
|
+
E[4] || (E[4] = Q(
|
|
2850
2866
|
" 填写进度 ",
|
|
2851
2867
|
-1
|
|
2852
2868
|
/* CACHED */
|
|
@@ -2854,35 +2870,35 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2854
2870
|
l(
|
|
2855
2871
|
"strong",
|
|
2856
2872
|
null,
|
|
2857
|
-
$(
|
|
2873
|
+
$(K.value.percent) + "%",
|
|
2858
2874
|
1
|
|
2859
2875
|
/* TEXT */
|
|
2860
2876
|
),
|
|
2861
|
-
|
|
2862
|
-
"(必填 " + $(
|
|
2877
|
+
Q(
|
|
2878
|
+
"(必填 " + $(K.value.requiredFilled) + "/" + $(K.value.requiredTotal) + ") ",
|
|
2863
2879
|
1
|
|
2864
2880
|
/* TEXT */
|
|
2865
2881
|
)
|
|
2866
2882
|
])),
|
|
2867
|
-
|
|
2883
|
+
K.value.firstMissingRequiredKey ? (s(), i(
|
|
2868
2884
|
"button",
|
|
2869
2885
|
{
|
|
2870
2886
|
key: 2,
|
|
2871
2887
|
type: "button",
|
|
2872
2888
|
class: "apf-prism-form__jump",
|
|
2873
|
-
onClick:
|
|
2889
|
+
onClick: E[0] || (E[0] = (N) => me(K.value.firstMissingRequiredKey))
|
|
2874
2890
|
},
|
|
2875
|
-
$(
|
|
2891
|
+
$(d.value ? "Next required ›" : "定位未填 ›"),
|
|
2876
2892
|
1
|
|
2877
2893
|
/* TEXT */
|
|
2878
2894
|
)) : x("v-if", !0)
|
|
2879
2895
|
]),
|
|
2880
|
-
l("div",
|
|
2896
|
+
l("div", ln, [
|
|
2881
2897
|
l(
|
|
2882
2898
|
"div",
|
|
2883
2899
|
{
|
|
2884
2900
|
class: "apf-prism-form__bar-fill",
|
|
2885
|
-
style: re({ width: `${
|
|
2901
|
+
style: re({ width: `${K.value.percent}%` })
|
|
2886
2902
|
},
|
|
2887
2903
|
null,
|
|
2888
2904
|
4
|
|
@@ -2890,39 +2906,39 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2890
2906
|
)
|
|
2891
2907
|
])
|
|
2892
2908
|
])) : x("v-if", !0),
|
|
2893
|
-
|
|
2909
|
+
v.value && C.value ? (s(), i("div", an, [
|
|
2894
2910
|
(s(!0), i(
|
|
2895
|
-
|
|
2911
|
+
z,
|
|
2896
2912
|
null,
|
|
2897
|
-
|
|
2898
|
-
key: N.key ||
|
|
2913
|
+
J(k.value, (N, B) => (s(), i("button", {
|
|
2914
|
+
key: N.key || B,
|
|
2899
2915
|
type: "button",
|
|
2900
|
-
class:
|
|
2901
|
-
onClick: (
|
|
2902
|
-
}, $(
|
|
2916
|
+
class: q(["apf-prism-form__step-pill", { "is-active": j.value === B }]),
|
|
2917
|
+
onClick: (Y) => V.value = B
|
|
2918
|
+
}, $(B + 1) + ". " + $(N.title || (d.value ? `Step ${B + 1}` : `第${B + 1}步`)), 11, nn))),
|
|
2903
2919
|
128
|
|
2904
2920
|
/* KEYED_FRAGMENT */
|
|
2905
2921
|
))
|
|
2906
2922
|
])) : x("v-if", !0),
|
|
2907
|
-
|
|
2923
|
+
v.value && R.value ? (s(), te(za, je({
|
|
2908
2924
|
key: 3,
|
|
2909
|
-
groups:
|
|
2925
|
+
groups: G.value,
|
|
2910
2926
|
fields: u,
|
|
2911
|
-
"form-core":
|
|
2927
|
+
"form-core": R.value,
|
|
2912
2928
|
"custom-controls": t.customControls,
|
|
2913
2929
|
"host-handlers": t.hostHandlers
|
|
2914
|
-
},
|
|
2915
|
-
footer:
|
|
2916
|
-
C.value ? (s(), i("div",
|
|
2930
|
+
}, oe(A)), {
|
|
2931
|
+
footer: le(() => [
|
|
2932
|
+
C.value ? (s(), i("div", on, [
|
|
2917
2933
|
l("button", {
|
|
2918
2934
|
type: "button",
|
|
2919
2935
|
class: "apf-prism-form__step-btn",
|
|
2920
2936
|
disabled: j.value <= 0,
|
|
2921
|
-
onClick:
|
|
2922
|
-
}, $(
|
|
2937
|
+
onClick: E[1] || (E[1] = (N) => V.value = Math.max(0, j.value - 1))
|
|
2938
|
+
}, $(d.value ? "Previous" : "上一步"), 9, sn),
|
|
2923
2939
|
l(
|
|
2924
2940
|
"span",
|
|
2925
|
-
|
|
2941
|
+
rn,
|
|
2926
2942
|
$(j.value + 1) + " / " + $(k.value.length),
|
|
2927
2943
|
1
|
|
2928
2944
|
/* TEXT */
|
|
@@ -2931,33 +2947,33 @@ const Ia = ["data-label-position", "data-field-key"], Oa = {
|
|
|
2931
2947
|
type: "button",
|
|
2932
2948
|
class: "apf-prism-form__step-btn is-primary",
|
|
2933
2949
|
disabled: j.value >= k.value.length - 1,
|
|
2934
|
-
onClick:
|
|
2935
|
-
}, $(
|
|
2950
|
+
onClick: E[2] || (E[2] = (N) => V.value = Math.min(k.value.length - 1, j.value + 1))
|
|
2951
|
+
}, $(d.value ? "Next" : "下一步"), 9, cn)
|
|
2936
2952
|
])) : x("v-if", !0),
|
|
2937
|
-
|
|
2938
|
-
submit:
|
|
2953
|
+
be(F.$slots, "footer", {
|
|
2954
|
+
submit: he,
|
|
2939
2955
|
validate: de,
|
|
2940
2956
|
submitting: t.submitting
|
|
2941
2957
|
}, () => [
|
|
2942
|
-
t.showSubmit && !c.value ? (s(), i("div",
|
|
2958
|
+
t.showSubmit && !c.value ? (s(), i("div", un, [
|
|
2943
2959
|
l("button", {
|
|
2944
2960
|
type: "button",
|
|
2945
2961
|
class: "apf-prism-form__submit",
|
|
2946
2962
|
disabled: t.submitting,
|
|
2947
|
-
onClick:
|
|
2948
|
-
}, $(t.submitting ?
|
|
2963
|
+
onClick: he
|
|
2964
|
+
}, $(t.submitting ? d.value ? "Submitting…" : "提交中…" : Se.value), 9, dn)
|
|
2949
2965
|
])) : x("v-if", !0)
|
|
2950
2966
|
], !0)
|
|
2951
2967
|
]),
|
|
2952
2968
|
_: 3
|
|
2953
2969
|
/* FORWARDED */
|
|
2954
2970
|
}, 16, ["groups", "fields", "form-core", "custom-controls", "host-handlers"])) : x("v-if", !0)
|
|
2955
|
-
], 12,
|
|
2971
|
+
], 12, Ga);
|
|
2956
2972
|
};
|
|
2957
2973
|
}
|
|
2958
|
-
}),
|
|
2959
|
-
function
|
|
2960
|
-
const r =
|
|
2974
|
+
}), yn = /* @__PURE__ */ H(vn, [["__scopeId", "data-v-7cc6ff7e"]]);
|
|
2975
|
+
function kn(t, n, e) {
|
|
2976
|
+
const r = $e(t, void 0, e), f = _e({
|
|
2961
2977
|
groups: r.groups,
|
|
2962
2978
|
fields: {}
|
|
2963
2979
|
});
|
|
@@ -2978,18 +2994,18 @@ function pn(t, n, e) {
|
|
|
2978
2994
|
function h() {
|
|
2979
2995
|
n.off("afterChange", m);
|
|
2980
2996
|
}
|
|
2981
|
-
|
|
2997
|
+
Be() && Ce(h), p();
|
|
2982
2998
|
const g = {};
|
|
2983
2999
|
for (const a of Object.keys(n.fields))
|
|
2984
3000
|
g[a] = n.fields[a];
|
|
2985
3001
|
return r.update(g), f.groups = r.groups, { groups: f.groups, fields: f.fields, formCore: n, destroy: h };
|
|
2986
3002
|
}
|
|
2987
3003
|
export {
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
3004
|
+
qa as FormGroup,
|
|
3005
|
+
we as FormItem,
|
|
3006
|
+
za as FormRender,
|
|
3007
|
+
yn as PrismForm,
|
|
3008
|
+
Cn as createFetchHostHandlers,
|
|
3009
|
+
Tn as setTaskHandlers,
|
|
3010
|
+
kn as useFormRender
|
|
2995
3011
|
};
|