@shaonq/vue 1.0.0

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.
Files changed (3) hide show
  1. package/lib/index.js +1911 -0
  2. package/lib/style.css +1 -0
  3. package/package.json +94 -0
package/lib/index.js ADDED
@@ -0,0 +1,1911 @@
1
+ import mt from "vxe-table";
2
+ import "vxe-table/lib/style.css";
3
+ import { ref as V, defineComponent as E, computed as B, shallowRef as yt, watch as bt, onUnmounted as wt, resolveComponent as m, openBlock as r, createElementBlock as x, createBlock as R, withCtx as f, renderSlot as ae, createElementVNode as y, toDisplayString as M, createVNode as p, createTextVNode as q, unref as g, createCommentVNode as D, Fragment as I, renderList as oe, createSlots as xt, isVNode as Le, resolveDynamicComponent as xe, normalizeStyle as ee, normalizeProps as ke, guardReactiveProps as Ae, mergeProps as Me, normalizeClass as _e, withModifiers as kt } from "vue";
4
+ import Pe from "xe-utils";
5
+ import Ce from "vuedraggable";
6
+ import Ct from "mitt";
7
+ import $t from "bwip-js";
8
+ const Y = (o) => o && typeof o == "function";
9
+ function re(o, t) {
10
+ var e;
11
+ const l = (e = o[t.dataIndex]) != null ? e : "";
12
+ return t.format && Y(t.format) ? t.format(l, o) : l;
13
+ }
14
+ function ze(o, t) {
15
+ return Y(t.style) ? t.style(o) : { ...t.style };
16
+ }
17
+ function Ee(o) {
18
+ return (o == null ? void 0 : o.rowKey) || "_X_ROW_KEY";
19
+ }
20
+ function St(o, t) {
21
+ return { disabledList: V({
22
+ highlight: !0,
23
+ reserve: o.option.reserve,
24
+ checkMethod: ({ row: i }) => !i.disabled
25
+ }), selectChangeEvent: ({ $table: i, checked: a, row: c }) => {
26
+ const { option: u } = o, { fullData: C } = i.getTableData();
27
+ if (c && u.checkboxKey) {
28
+ const S = u.checkboxKey, _ = C.filter((v) => v[S] && v[S] === c[S]);
29
+ _.length && i.setCheckboxRow(_, a);
30
+ }
31
+ const $ = i.getCheckboxRecords().concat(i.getCheckboxReserveRecords()), b = Ee(o.option);
32
+ b && t(
33
+ "update:selectedKeys",
34
+ $.map((S) => S[b])
35
+ );
36
+ }, radioChangeEvent: ({ row: i }) => {
37
+ const a = [i], c = Ee(o.option);
38
+ c && t(
39
+ "update:selectedKeys",
40
+ a.map((u) => u[c])
41
+ );
42
+ } };
43
+ }
44
+ const P = V(/* @__PURE__ */ Object.create({}));
45
+ function Qe(o) {
46
+ const t = {
47
+ ...o,
48
+ ref: (e) => {
49
+ e && (P.value = e);
50
+ }
51
+ };
52
+ return {
53
+ tableOption: t,
54
+ $grid: P,
55
+ $gridTwo: {
56
+ getRowKey() {
57
+ return Ee(o);
58
+ },
59
+ getRowIndex(e) {
60
+ return P.value.getRowIndex(e);
61
+ },
62
+ getRowSeq(e) {
63
+ return P.value.getRowSeq(e);
64
+ },
65
+ getTableData() {
66
+ var e, n;
67
+ return P.value ? (n = (e = P.value) == null ? void 0 : e.getTableData().fullData) != null ? n : [] : [];
68
+ },
69
+ getSelection() {
70
+ return P.value ? t.selectedType === "checkbox" ? P.value.getCheckboxRecords() : t.selectedType === "radio" ? [P.value.getRadioRecord()] : [] : [];
71
+ },
72
+ getReserveSelection() {
73
+ if (P.value) {
74
+ if (t.selectedType === "checkbox") {
75
+ const e = P.value.getCheckboxRecords();
76
+ return o.reserve ? e.concat(P.value.getCheckboxReserveRecords()) : e;
77
+ }
78
+ if (t.selectedType === "radio") {
79
+ let e = P.value.getRadioRecord();
80
+ return o.reserve && !e && (e = P.value.getRadioReserveRecord()), e ? [e] : [];
81
+ }
82
+ return [];
83
+ }
84
+ return [];
85
+ },
86
+ getCheckboxKeySelection(e) {
87
+ const n = o.checkboxKey;
88
+ return e || (e = this.getSelection().map((a) => a[n])), this.getTableData().filter((a) => e && e.includes(a[n]));
89
+ },
90
+ clearSelection() {
91
+ P.value && (t.selectedType === "checkbox" && (o.reserve && P.value.clearCheckboxReserve(), P.value.clearCheckboxRow()), t.selectedType === "radio" && (o.reserve && P.value.clearRadioReserve(), P.value.clearRadioRow()));
92
+ },
93
+ insertRow(e, n, i = !0) {
94
+ var u;
95
+ const a = this.getRowKey();
96
+ if (n && typeof n == "object" && i) {
97
+ const C = P.value.getRowIndex(n);
98
+ C >= 0 && (n = (u = this.getTableData()[C + 1]) != null ? u : -1);
99
+ }
100
+ return e[a] && delete e[a], P.value.insertAt(e, n);
101
+ },
102
+ removeRows() {
103
+ P.value && (t.selectedType === "checkbox" && P.value.removeCheckboxRow(), t.selectedType === "radio" && P.value.removeRadioRow());
104
+ },
105
+ removerRowIndex(e) {
106
+ if (P.value) {
107
+ const n = this.getTableData();
108
+ n.splice(e, 1), P.value.reloadData(n);
109
+ }
110
+ },
111
+ async checkRows(e = void 0) {
112
+ e = e != null ? e : this.getSelection();
113
+ let n = "";
114
+ const i = await P.value.validate(e);
115
+ return i && Object.values(i).forEach((a) => {
116
+ a.forEach(({ rowIndex: c, column: u, rules: C }) => {
117
+ C.forEach(($) => {
118
+ n = `\u5E8F\u53F7${c + 1} ${u.title} ${$.message}`;
119
+ });
120
+ });
121
+ }), [n, e];
122
+ }
123
+ }
124
+ };
125
+ }
126
+ const Rt = { class: "orchisky-vxe" }, Ot = { class: "u-card orchisky-vxe__setting" }, Pt = {
127
+ class: "u-card__hd",
128
+ style: { height: "auto", padding: "4px 12px", "line-height": "28px" }
129
+ }, zt = /* @__PURE__ */ y("span", { style: { "font-size": "14px" } }, "\u8BBE\u7F6E", -1), jt = {
130
+ class: "u-card__floor",
131
+ style: { padding: "0" }
132
+ }, Tt = { class: "orchisky-vxe__draggable" }, Et = { class: "orchisky-vxe__draggable-item" }, Dt = {
133
+ key: 0,
134
+ class: "u-flex"
135
+ }, At = ["title"], Mt = { style: { padding: "0 0.75em" } }, Bt = {
136
+ key: 1,
137
+ class: "orchisky-vxe__draggable-moving"
138
+ }, Ft = {
139
+ class: "u-card__floor u-flex",
140
+ style: { padding: "6px 12px" }
141
+ }, Kt = {
142
+ key: 0,
143
+ class: "not-light-text"
144
+ }, Vt = {
145
+ key: 1,
146
+ class: "orchisky-vxe__pagination"
147
+ }, It = { class: "u-flex u-flex--start" }, Ut = { class: "u-flex__item" }, Wt = { style: { width: "500px" } }, Nt = /* @__PURE__ */ E({
148
+ __name: "table",
149
+ props: {
150
+ title: String,
151
+ height: [Number, String],
152
+ hideToolbar: Boolean,
153
+ hidePagination: Boolean,
154
+ size: {
155
+ type: String,
156
+ default: "mini"
157
+ },
158
+ selectedKeys: { type: Array, default: () => [] },
159
+ data: { type: Array, default: () => [] },
160
+ option: {
161
+ type: Object,
162
+ default: () => ({ columns: [] })
163
+ },
164
+ hook: Object
165
+ },
166
+ emits: ["update:selectedKeys", "cellClick", "onReset", "change", "confirm"],
167
+ setup(o, { expose: t, emit: l }) {
168
+ var Ue;
169
+ const e = o, n = l;
170
+ function i(s, h) {
171
+ return (O) => {
172
+ typeof O == "object" ? Object.keys(O).forEach((w) => {
173
+ s[w] = O[w];
174
+ }) : s[h] = O;
175
+ };
176
+ }
177
+ const a = B(() => {
178
+ var s, h;
179
+ return (h = (s = e.option) == null ? void 0 : s.pageSize) != null ? h : 50;
180
+ }), c = B(() => {
181
+ var s, h;
182
+ return (h = (s = e.option) == null ? void 0 : s.pageSizeOptions) != null ? h : [10, 20, 50, 100, 200];
183
+ }), u = V({ page: 1, size: a.value }), { disabledList: C, selectChangeEvent: $, radioChangeEvent: b } = St(e, n), { $grid: S, $gridTwo: _ } = Qe(e.option);
184
+ function v(s) {
185
+ n("cellClick", s);
186
+ }
187
+ function k(s, h, O) {
188
+ var G, X;
189
+ const w = (G = s[h]) != null ? G : {}, A = (X = s[h - 1]) != null ? X : {};
190
+ return ["string", "number"].includes(typeof w[O]) ? e.option.skinRow && typeof e.option.skinRow == "string" ? w[e.option.skinRow] === A[e.option.skinRow] && w[O] === A[O] : w[O] === A[O] : !1;
191
+ }
192
+ function j(s, h, O) {
193
+ let w = {};
194
+ try {
195
+ w = h > 0 && !k(s, h, O) && e.option.skinRow && s[h][String(e.option.skinRow)] === s[h - 1][String(e.option.skinRow)] ? e.option.skinRowStyle : {};
196
+ } catch {
197
+ }
198
+ return w;
199
+ }
200
+ const z = V([]);
201
+ function L() {
202
+ const s = [...e.option.columns], h = e.option.resolveColumns && Y(e.option.resolveColumns) ? e.option.resolveColumns(s) : s;
203
+ return Object.assign([], h).filter((w) => Boolean(w)).map((w) => {
204
+ var A;
205
+ return w.show = (A = w.show) != null ? A : !0, w.tooltip && (w.ellipsis = !0), w;
206
+ });
207
+ }
208
+ const J = B(() => {
209
+ const s = L(), h = Object.assign([], z.value);
210
+ return [
211
+ ...new Set(
212
+ [...h].map((w) => w.dataIndex).filter((w) => s.find((A) => A.dataIndex === w)).concat([...s].map((w) => w.dataIndex)).filter((w) => !!w)
213
+ )
214
+ ].map((w) => {
215
+ var X;
216
+ const A = s.find((le) => le.dataIndex === w), G = (X = h.find((le) => le.dataIndex === w)) != null ? X : /* @__PURE__ */ Object.create({});
217
+ return { ...A, ...G };
218
+ });
219
+ }), ge = B(() => e.option.resolvePage && Y(e.option.resolvePage) ? e.option.resolvePage(u.value) : e.option.resolvePage), ce = B(() => Boolean(e.option.url)), Z = V(!1), de = V(!1), W = V(0), N = yt((Ue = e.data) != null ? Ue : []), ve = new AbortController();
220
+ function Ke() {
221
+ if (!e.option.useErrData)
222
+ throw new Error("useErrData is required");
223
+ let s = /* @__PURE__ */ Object.create({});
224
+ ge.value ? Y(e.option.resolvePage) ? s = { ...ge.value } : s = { page: u.value } : s = {};
225
+ const h = {
226
+ [String(e.option.method).toUpperCase() === "GET" ? "params" : "data"]: { ...s, ...e.option.data }
227
+ }, O = { url: e.option.url, method: e.option.method, ...h, signal: ve.signal };
228
+ return e.option.timeout && (O.timeout = e.option.timeout), e.option.useErrData(O);
229
+ }
230
+ const me = B({
231
+ get: () => e.selectedKeys,
232
+ set: (s) => {
233
+ n("update:selectedKeys", s);
234
+ }
235
+ });
236
+ function Se(s = !0) {
237
+ Z.value = s;
238
+ }
239
+ const ue = async () => {
240
+ var s, h, O, w, A, G, X;
241
+ if (ce.value) {
242
+ Se(!0);
243
+ const [le, U] = await Ke();
244
+ if (Se(!1), le)
245
+ Y(e.option.error) && ((X = (G = e.option).error) == null || X.call(G, U));
246
+ else {
247
+ const ye = e.option.resolveData && Y(e.option.resolveData) ? e.option.resolveData(U, { ...u.value }) : (h = (s = U == null ? void 0 : U.rows) != null ? s : U) != null ? h : [];
248
+ if (Object.prototype.toString.call(ye).slice(8, -1) !== "Array")
249
+ throw new Error("[orchisky-vxe] :Not in Array format data ");
250
+ N.value = ye, W.value = e.option.resolveTotal && Y(e.option.resolveTotal) ? e.option.resolveTotal(U) : (O = U == null ? void 0 : U.total) != null ? O : 0, Y(e.option.success) && ((A = (w = e.option).success) == null || A.call(w, U));
251
+ }
252
+ }
253
+ };
254
+ async function it() {
255
+ Z.value || (n("onReset"), await ue());
256
+ }
257
+ function Ve(s, h = !1) {
258
+ s && (u.value.page = s), (!e.option.reserve || h) && (me.value = [], _.clearSelection()), ue();
259
+ }
260
+ async function at(s) {
261
+ u.value.size = s, Ve(1, !0);
262
+ }
263
+ const ne = V(/* @__PURE__ */ Object.create({})), H = V({
264
+ loading: !1,
265
+ columns: [],
266
+ tempWidth: /* @__PURE__ */ Object.create({})
267
+ });
268
+ async function st() {
269
+ var s;
270
+ if (typeof ((s = e.hook) == null ? void 0 : s.getColumn) == "function") {
271
+ const [h, O] = await e.hook.getColumn();
272
+ !h && O && (z.value = O);
273
+ }
274
+ }
275
+ st();
276
+ const Ie = (s = !1) => {
277
+ !ne.value || (s ? ne.value.togglePanel() : ne.value.showPanel(), H.value.columns = Object.assign([], [...J.value]).map((h) => {
278
+ const O = H.value.tempWidth[h.dataIndex];
279
+ return O && (h.width = O), h;
280
+ }));
281
+ }, Re = () => {
282
+ !ne.value || ne.value.hidePanel();
283
+ };
284
+ function rt() {
285
+ H.value.loading = !0, z.value = [], H.value.tempWidth = /* @__PURE__ */ Object.create({}), H.value.columns = L(), Ie(), setTimeout(() => {
286
+ H.value.loading = !1;
287
+ }, 500);
288
+ }
289
+ function ct(s) {
290
+ let h = s.column.property;
291
+ !h && s.column.type === "seq" && (h = "index"), h && s.column.resizeWidth > 0 && (H.value.tempWidth[h] = s.column.resizeWidth, Re());
292
+ }
293
+ const dt = () => {
294
+ var s;
295
+ !ne.value || (z.value = H.value.columns, n("confirm", J.value), typeof ((s = e.hook) == null ? void 0 : s.setColumn) == "function" && e.hook.setColumn(J.value), H.value.tempWidth = /* @__PURE__ */ Object.create({}), Re());
296
+ };
297
+ return e.option.firstLoad !== !1 && ue(), bt(
298
+ () => e.option.firstLoad,
299
+ (s) => {
300
+ s === !0 && ue();
301
+ }
302
+ ), wt(() => {
303
+ ve.abort();
304
+ }), t({
305
+ loading: Z,
306
+ setLoading: Se,
307
+ dataInit(s) {
308
+ return s !== !1 && (u.value.page = 1), me.value = [], _.clearSelection(), ue();
309
+ },
310
+ loadData(s) {
311
+ S.value && (S.value.reloadData(s), N.value = s);
312
+ },
313
+ ..._
314
+ }), (s, h) => {
315
+ var qe;
316
+ const O = m("a-switch"), w = m("a-tooltip"), A = m("icon-refresh"), G = m("a-button"), X = m("icon-settings"), le = m("icon-drag-dot-vertical"), U = m("a-checkbox");
317
+ m("a-input-number");
318
+ const ye = m("a-divider"), We = m("vxe-button"), ut = m("vxe-pulldown"), Ne = m("a-space"), pt = m("vxe-toolbar"), be = m("vxe-column"), ft = m("a-empty"), _t = m("a-spin"), ht = m("vxe-table"), gt = m("a-pagination");
319
+ return r(), x("div", Rt, [
320
+ e.hideToolbar ? D("", !0) : (r(), R(pt, {
321
+ key: 0,
322
+ size: "mini",
323
+ "class-name": "orchisky-vxe__toolbar"
324
+ }, {
325
+ buttons: f(() => [
326
+ ae(s.$slots, "default", {}, () => [
327
+ y("div", null, M(e.title), 1)
328
+ ])
329
+ ]),
330
+ tools: f(() => [
331
+ p(Ne, { size: "small" }, {
332
+ default: f(() => [
333
+ ae(s.$slots, "tools"),
334
+ p(w, {
335
+ content: "\u8868\u683C\u6591\u9A6C\u7EB9",
336
+ mini: ""
337
+ }, {
338
+ default: f(() => [
339
+ p(O, {
340
+ modelValue: de.value,
341
+ "onUpdate:modelValue": h[0] || (h[0] = (F) => de.value = F),
342
+ size: "small"
343
+ }, {
344
+ checked: f(() => [
345
+ q(" \u5F00 ")
346
+ ]),
347
+ unchecked: f(() => [
348
+ q(" \u5173 ")
349
+ ]),
350
+ _: 1
351
+ }, 8, ["modelValue"])
352
+ ]),
353
+ _: 1
354
+ }),
355
+ p(w, {
356
+ content: "\u5237\u65B0",
357
+ mini: ""
358
+ }, {
359
+ default: f(() => [
360
+ p(G, {
361
+ loading: Z.value,
362
+ size: "small",
363
+ class: "arco-btn-light",
364
+ style: { border: "0" },
365
+ onClick: h[1] || (h[1] = (F) => it())
366
+ }, {
367
+ icon: f(() => [
368
+ p(A, { size: 16 })
369
+ ]),
370
+ _: 1
371
+ }, 8, ["loading"])
372
+ ]),
373
+ _: 1
374
+ }),
375
+ p(ut, {
376
+ ref_key: "settingRef",
377
+ ref: ne,
378
+ transfer: ""
379
+ }, {
380
+ default: f(() => [
381
+ p(w, {
382
+ content: "\u8BBE\u7F6E",
383
+ mini: ""
384
+ }, {
385
+ default: f(() => [
386
+ p(G, {
387
+ size: "small",
388
+ class: "arco-btn-light",
389
+ style: { border: "0" }
390
+ }, {
391
+ icon: f(() => [
392
+ p(X, {
393
+ size: 16,
394
+ onClick: h[2] || (h[2] = (F) => Ie(!0))
395
+ })
396
+ ]),
397
+ _: 1
398
+ })
399
+ ]),
400
+ _: 1
401
+ })
402
+ ]),
403
+ dropdown: f(() => [
404
+ y("div", Ot, [
405
+ y("div", Pt, [
406
+ zt,
407
+ p(w, {
408
+ content: "\u91CD\u7F6E",
409
+ mini: ""
410
+ }, {
411
+ default: f(() => [
412
+ p(G, {
413
+ size: "small",
414
+ class: "arco-btn-light",
415
+ style: { border: "0" },
416
+ loading: H.value.loading,
417
+ onClick: h[3] || (h[3] = (F) => rt())
418
+ }, {
419
+ icon: f(() => [
420
+ p(A)
421
+ ]),
422
+ _: 1
423
+ }, 8, ["loading"])
424
+ ]),
425
+ _: 1
426
+ })
427
+ ]),
428
+ y("div", jt, [
429
+ y("div", Tt, [
430
+ p(g(Ce), {
431
+ list: H.value.columns,
432
+ style: { "user-select": "none" },
433
+ class: "orchisky-vxe__draggable-list",
434
+ group: "toolsGroup",
435
+ animation: "300",
436
+ "drag-class": "orchisky-vxe__draggable-drag",
437
+ "ghost-class": "orchisky-vxe__draggable-ghost",
438
+ "chosen-class": "orchisky-vxe__draggable-chosen",
439
+ "item-key": "id",
440
+ handle: ".orchisky-vxe__draggable-moving"
441
+ }, {
442
+ item: f(({ element: F }) => [
443
+ y("div", Et, [
444
+ F.title ? (r(), x("div", Dt, [
445
+ p(le, { class: "orchisky-vxe__draggable-moving" }),
446
+ p(U, {
447
+ modelValue: F.show,
448
+ "onUpdate:modelValue": (we) => F.show = we
449
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
450
+ y("label", {
451
+ class: "u-flex__item u-clamp",
452
+ title: F.title
453
+ }, [
454
+ y("span", Mt, M(F.title), 1)
455
+ ], 8, At),
456
+ D("", !0)
457
+ ])) : (r(), x("div", Bt, [
458
+ p(ye, {
459
+ margin: 6,
460
+ type: "dashed"
461
+ })
462
+ ]))
463
+ ])
464
+ ]),
465
+ _: 1
466
+ }, 8, ["list"])
467
+ ])
468
+ ]),
469
+ y("div", Ft, [
470
+ p(We, {
471
+ size: "mini",
472
+ class: "u-flex__item",
473
+ type: "text",
474
+ status: "info",
475
+ onClick: h[4] || (h[4] = (F) => Re())
476
+ }, {
477
+ default: f(() => [
478
+ q("\u53D6\u6D88")
479
+ ]),
480
+ _: 1
481
+ }),
482
+ p(We, {
483
+ size: "mini",
484
+ class: "u-flex__item",
485
+ type: "text",
486
+ status: "primary",
487
+ onClick: h[5] || (h[5] = (F) => dt())
488
+ }, {
489
+ default: f(() => [
490
+ q("\u786E\u8BA4")
491
+ ]),
492
+ _: 1
493
+ })
494
+ ])
495
+ ])
496
+ ]),
497
+ _: 1
498
+ }, 512)
499
+ ]),
500
+ _: 3
501
+ })
502
+ ]),
503
+ _: 3
504
+ })),
505
+ p(ht, {
506
+ ref: e.option.ref,
507
+ data: N.value,
508
+ height: e.height,
509
+ stripe: de.value,
510
+ "keep-source": !1,
511
+ "edit-config": { trigger: "click", mode: "row", showIcon: !1, autoClear: !1, showStatus: !1 },
512
+ "column-config": { isCurrent: !1, resizable: !0 },
513
+ "row-config": { isHover: !0, isCurrent: !1, keyField: e.option.rowKey },
514
+ "show-overflow": e.option.tooltip || "tooltip",
515
+ "show-header-overflow": e.option.tooltip || "tooltip",
516
+ size: e.size,
517
+ loading: Z.value,
518
+ "radio-config": g(C),
519
+ "checkbox-config": { ...g(C), checkField: e.option.checkKey },
520
+ "header-cell-style": e.option.headerStyle,
521
+ "show-footer": g(Y)(e.option.footerMethod),
522
+ "footer-method": e.option.footerMethod,
523
+ "footer-cell-style": e.option.footerStyle,
524
+ "merge-footer-items": e.option.mergeFooter,
525
+ "show-footer-overflow": (qe = e.option) == null ? void 0 : qe.footerTooltip,
526
+ "filter-config": e.option.filterConfig,
527
+ "edit-rules": e.option.rules,
528
+ "scroll-y": e.option.scrollY,
529
+ "scroll-x": e.option.scrollX,
530
+ onCheckboxChange: g($),
531
+ onCheckboxAll: g($),
532
+ onRadioChange: g(b),
533
+ onResizableChange: ct,
534
+ onCellClick: v
535
+ }, {
536
+ empty: f(() => [
537
+ p(ft)
538
+ ]),
539
+ loading: f(() => [
540
+ p(_t)
541
+ ]),
542
+ default: f(() => {
543
+ var F, we;
544
+ return [
545
+ ["checkbox"].includes((F = e.option.selectedType) != null ? F : "") ? (r(), R(be, {
546
+ key: 0,
547
+ type: "checkbox",
548
+ width: "30",
549
+ fixed: "left"
550
+ })) : ["radio"].includes((we = e.option.selectedType) != null ? we : "") ? (r(), R(be, {
551
+ key: 1,
552
+ type: "radio",
553
+ width: "30",
554
+ fixed: "left"
555
+ })) : D("", !0),
556
+ (r(!0), x(I, null, oe(J.value.filter((d) => d.show), (d, vt) => (r(), x(I, { key: vt }, [
557
+ ["index"].includes(d.dataIndex) ? (r(), R(be, {
558
+ key: 0,
559
+ type: "seq",
560
+ field: d.dataIndex,
561
+ width: d.width,
562
+ title: d.title,
563
+ sortable: d.sort,
564
+ "header-align": d.headerAlign,
565
+ "footer-align": d.footerAlign,
566
+ align: d.align,
567
+ "show-header-overflow": d.tooltip,
568
+ "show-overflow": d.tooltip,
569
+ fixed: d.fixed,
570
+ "title-prefix": d.help,
571
+ filters: d.filters,
572
+ "filter-multiple": d.filterMultiple,
573
+ "filter-method": d.filterMethod
574
+ }, null, 8, ["field", "width", "title", "sortable", "header-align", "footer-align", "align", "show-header-overflow", "show-overflow", "fixed", "title-prefix", "filters", "filter-multiple", "filter-method"])) : (r(), R(be, {
575
+ key: 1,
576
+ field: d.dataIndex,
577
+ width: d.width,
578
+ title: d.title,
579
+ sortable: d.sort,
580
+ "header-align": d.headerAlign,
581
+ "footer-align": d.footerAlign,
582
+ align: d.align,
583
+ "show-header-overflow": d.tooltip,
584
+ "show-overflow": d.tooltip,
585
+ fixed: d.fixed,
586
+ "title-prefix": d.help,
587
+ filters: d.filters,
588
+ "filter-multiple": d.filterMultiple,
589
+ "filter-method": d.filterMethod,
590
+ "edit-render": { enabled: Boolean(d.cell), placeholder: d.placeholder }
591
+ }, xt({ _: 2 }, [
592
+ d.cell ? {
593
+ name: "edit",
594
+ fn: f(({ row: T, rowIndex: ie, columnIndex: Oe }) => [
595
+ ae(s.$slots, "cell", {
596
+ record: T,
597
+ dataIndex: d.dataIndex,
598
+ rowIndex: ie,
599
+ columnIndex: Oe,
600
+ value: T[d.dataIndex],
601
+ updateValue: i(T, d.dataIndex),
602
+ formatValue: g(re)(T, d)
603
+ }, () => [
604
+ Le(d.cell) ? (r(), R(xe(d.cell), {
605
+ key: 0,
606
+ record: T
607
+ }, null, 8, ["record"])) : (r(), x("span", {
608
+ key: 1,
609
+ style: ee(g(ze)(T, d))
610
+ }, M(g(re)(T, d)), 5))
611
+ ])
612
+ ]),
613
+ key: "0"
614
+ } : void 0,
615
+ d.cell && d.div ? {
616
+ name: "default",
617
+ fn: f(({ row: T, rowIndex: ie, columnIndex: Oe }) => [
618
+ ae(s.$slots, "cell", {
619
+ record: T,
620
+ dataIndex: d.dataIndex,
621
+ rowIndex: ie,
622
+ columnIndex: Oe,
623
+ value: T[d.dataIndex],
624
+ updateValue: i(T, d.dataIndex),
625
+ formatValue: g(re)(T, d)
626
+ }, () => [
627
+ Le(d.cell) ? (r(), R(xe(d.cell), {
628
+ key: 0,
629
+ record: T
630
+ }, null, 8, ["record"])) : (r(), x("span", {
631
+ key: 1,
632
+ style: ee(g(ze)(T, d))
633
+ }, M(g(re)(T, d)), 5))
634
+ ])
635
+ ]),
636
+ key: "1"
637
+ } : {
638
+ name: "default",
639
+ fn: f(({ row: T, rowIndex: ie }) => [
640
+ e.option.skinRow && !d.cell ? (r(), x(I, { key: 0 }, [
641
+ ie > 0 && k(N.value, ie, d.dataIndex) && d.width ? (r(), x("span", Kt, M(e.option.skinRowText), 1)) : (r(), x("span", {
642
+ key: 1,
643
+ style: ee(j(N.value, ie, d.dataIndex))
644
+ }, M(g(re)(T, d)), 5))
645
+ ], 64)) : (r(), x("span", {
646
+ key: 1,
647
+ style: ee(g(ze)(T, d))
648
+ }, M(g(re)(T, d)), 5))
649
+ ]),
650
+ key: "2"
651
+ }
652
+ ]), 1032, ["field", "width", "title", "sortable", "header-align", "footer-align", "align", "show-header-overflow", "show-overflow", "fixed", "title-prefix", "filters", "filter-multiple", "filter-method", "edit-render"]))
653
+ ], 64))), 128))
654
+ ];
655
+ }),
656
+ _: 3
657
+ }, 8, ["data", "height", "stripe", "row-config", "show-overflow", "show-header-overflow", "size", "loading", "radio-config", "checkbox-config", "header-cell-style", "show-footer", "footer-method", "footer-cell-style", "merge-footer-items", "show-footer-overflow", "filter-config", "edit-rules", "scroll-y", "scroll-x", "onCheckboxChange", "onCheckboxAll", "onRadioChange"]),
658
+ ce.value && !e.hidePagination ? (r(), x("div", Vt, [
659
+ y("div", It, [
660
+ y("div", Ut, [
661
+ ae(s.$slots, "footer")
662
+ ]),
663
+ y("div", Wt, [
664
+ p(Ne, {
665
+ fill: "",
666
+ direction: "vertical",
667
+ align: "end"
668
+ }, {
669
+ default: f(() => [
670
+ p(gt, {
671
+ current: u.value.page,
672
+ "default-page-size": u.value.size,
673
+ total: W.value,
674
+ "auto-adjust": !1,
675
+ size: e.size,
676
+ "show-total": "",
677
+ "show-page-size": "",
678
+ "page-size-options": c.value,
679
+ onPageSizeChange: at,
680
+ onChange: Ve
681
+ }, {
682
+ total: f(() => [
683
+ me.value.length ? (r(), x(I, { key: 0 }, [
684
+ q(" \u9009 " + M(me.value.length), 1)
685
+ ], 64)) : D("", !0),
686
+ q(" \u5171 " + M(W.value) + " \u6761 ", 1)
687
+ ]),
688
+ _: 1
689
+ }, 8, ["current", "default-page-size", "total", "size", "page-size-options"])
690
+ ]),
691
+ _: 1
692
+ })
693
+ ])
694
+ ])
695
+ ])) : D("", !0)
696
+ ]);
697
+ };
698
+ }
699
+ });
700
+ const hn = {
701
+ tf: (o, t) => {
702
+ if (typeof o != "number")
703
+ return o;
704
+ if (typeof t != "number") {
705
+ const l = String(o).split(".");
706
+ l.length === 2 && (t = l[1].length);
707
+ }
708
+ return Pe.commafy(o, { digits: t });
709
+ },
710
+ t: (o) => Pe.toDateString(o, "yyyy-MM-dd"),
711
+ time: (o, t = "yyyy-MM-dd HH:mm:ss") => Pe.toDateString(o, t),
712
+ p: (o, t, l = "%") => typeof o != "number" ? o : (typeof t != "number" && (t = 2), (o * 100).toFixed(t) + l)
713
+ }, gn = (o) => {
714
+ const t = V(/* @__PURE__ */ Object.create({})), l = V([]), { tableOption: e, $grid: n, $gridTwo: i } = Qe(o), a = {
715
+ rowKey: i.getRowKey(),
716
+ addKey(c) {
717
+ var $;
718
+ const C = i.getTableData()[c];
719
+ if (!C.disabled && n.value) {
720
+ const b = i.getRowKey();
721
+ if (e.selectedType === "checkbox") {
722
+ const S = n.value, { fullData: _ } = S.getTableData();
723
+ if (o.checkboxKey) {
724
+ const v = o.checkboxKey, k = _.filter((j) => j[v] && j[v] === C[v]);
725
+ k.length && S.setCheckboxRow(k, !0);
726
+ } else
727
+ n.value.setCheckboxRow(C, !0);
728
+ b && (l.value = (($ = n.value.getCheckboxRecords()) != null ? $ : []).map((v) => v[b]));
729
+ }
730
+ e.selectedType === "radio" && (n.value.setRadioRow(C), n.value.getRadioRecord() && b && (l.value = [n.value.getRadioRecord()].map((S) => S[b])));
731
+ }
732
+ },
733
+ setTableData(c) {
734
+ n.value && n.value.reloadData(c);
735
+ },
736
+ setTableRow(c, u, C) {
737
+ if (n.value) {
738
+ const $ = i.getTableData();
739
+ typeof u == "string" ? $[c][u] = C : Object.keys({ ...u }).forEach((b) => {
740
+ $[c][b] = u[b];
741
+ }), a.addKey(c), typeof o.footerMethod == "function" && n.value.updateFooter();
742
+ }
743
+ }
744
+ };
745
+ return {
746
+ tableRef: t,
747
+ tableOptions: e,
748
+ tableUtils: {
749
+ ...a,
750
+ ...i
751
+ },
752
+ $grid: n,
753
+ selectedKeys: l
754
+ };
755
+ }, K = Ct(), te = (o) => {
756
+ let t = [];
757
+ const l = JSON.stringify(o, (e, n) => {
758
+ if (typeof n == "object" && n !== null) {
759
+ if (t.indexOf(n) !== -1)
760
+ return null;
761
+ t.push(n);
762
+ }
763
+ return n;
764
+ });
765
+ return t = null, JSON.parse(l);
766
+ }, Xe = {
767
+ animation: 300,
768
+ dragClass: "fe-drag",
769
+ ghostClass: "fe-ghost",
770
+ chosenClass: "fe-chosen",
771
+ itemKey: "key",
772
+ handle: ".fe-moving"
773
+ };
774
+ function Q() {
775
+ return {
776
+ data: {
777
+ type: Object,
778
+ default: () => ({ children: [] })
779
+ },
780
+ field: {
781
+ type: Object,
782
+ default: null
783
+ },
784
+ fieldIndex: Number,
785
+ path: String,
786
+ selectedPath: String
787
+ };
788
+ }
789
+ function He(o) {
790
+ return Boolean(o.category && o.category === "child");
791
+ }
792
+ const qt = () => (Number(new Date()) + Number(String(Math.random()).slice(2, 15))).toString(32);
793
+ function Lt(o) {
794
+ const t = qt();
795
+ return { key: t, model: `${o}_${t}` };
796
+ }
797
+ function Be(o, t) {
798
+ if (!(o != null && o.type))
799
+ throw new Error(`widget ${o == null ? void 0 : o.key} error`);
800
+ return t = { ...t, ...Lt(o.type) }, Object.assign({}, { ...o, ...t, options: { ...o.options, ...t.options } });
801
+ }
802
+ function Ye(o, t) {
803
+ const l = Be(o, t);
804
+ return l.children && (l.children = l.children.map((e) => Ye(e, t))), l;
805
+ }
806
+ function Je(o) {
807
+ return Array.isArray(o) ? o : o.replace(/\[/g, ".").replace(/\]/g, "").split(".");
808
+ }
809
+ function se(o, t, l) {
810
+ return typeof o != "object" ? l : Je(t).reduce((e, n) => (e || {})[n], te(o)) || l;
811
+ }
812
+ function pe(o, t, l) {
813
+ return typeof o != "object" ? o : (Je(t).reduce((e, n, i, a) => i === a.length - 1 ? (e[n] = l, null) : (n in e || (e[n] = /^[0-9]{1,}$/.test(a[i + 1]) ? [] : {}), e[n]), o), te(o));
814
+ }
815
+ function he(o, t, l = "children") {
816
+ const e = o ? `${o}.` : "", n = t !== void 0 ? `[${t}]` : "";
817
+ return `${e}${l}${n}`;
818
+ }
819
+ function De(o) {
820
+ const t = /(.*)\[(.*)$/.exec(o);
821
+ if (t) {
822
+ const [, l, e] = t, n = +e.slice(0, -1);
823
+ return [l, n];
824
+ }
825
+ throw new Error("getPathAndIndex: Invalid path");
826
+ }
827
+ function Ze(o, t) {
828
+ const l = {
829
+ value: he(o.path, t),
830
+ label: o.name,
831
+ children: [],
832
+ model: o.model
833
+ };
834
+ return o.children && (l.children = o.children.map((e, n) => Ze(e, n))), l;
835
+ }
836
+ function Ht(o) {
837
+ return () => {
838
+ const { data: t, selectedPath: l } = o;
839
+ if (!l)
840
+ return null;
841
+ const e = Ze(t), n = l.split("."), i = [];
842
+ return n.forEach((a, c) => {
843
+ const u = n.slice(0, c + 1).join("."), C = se(e, u);
844
+ C && i.push(C);
845
+ }), i;
846
+ };
847
+ }
848
+ function Gt() {
849
+ }
850
+ function Qt(o) {
851
+ const t = B(() => se(o.data, o.path)), l = B(() => {
852
+ var n, i;
853
+ return (i = (n = t.value) == null ? void 0 : n.options) != null ? i : {};
854
+ }), e = B(() => {
855
+ var n, i;
856
+ return (i = (n = t.value) == null ? void 0 : n.optionsConfig) != null ? i : {};
857
+ });
858
+ return {
859
+ widget: t,
860
+ options: l,
861
+ optionsConfig: e,
862
+ selectedPath: o.selectedPath
863
+ };
864
+ }
865
+ function et(o) {
866
+ const t = B({
867
+ get: () => o.data.config,
868
+ set(i) {
869
+ K.emit("widget(path:update)", ["config", i]);
870
+ }
871
+ }), l = B(() => o.selectedPath ? se(o.data, o.selectedPath) : null), e = B({
872
+ get: () => {
873
+ var i, a;
874
+ return (a = (i = l.value) == null ? void 0 : i.options) != null ? a : {};
875
+ },
876
+ set(i) {
877
+ K.emit("widget(selectedPath:options)", i);
878
+ }
879
+ }), n = B(() => {
880
+ var i, a;
881
+ return (a = (i = l.value) == null ? void 0 : i.optionsConfig) != null ? a : {};
882
+ });
883
+ return {
884
+ config: t,
885
+ selectedWidget: l,
886
+ selectedWidgetOptions: e,
887
+ selectedWidgetOptionsConfig: n,
888
+ selectedPath: o.selectedPath
889
+ };
890
+ }
891
+ const Xt = { key: 0 }, Yt = ["src"], tt = /* @__PURE__ */ E({
892
+ __name: "qrcode",
893
+ props: Q(),
894
+ setup(o) {
895
+ const t = o, { options: l } = Qt(t), e = document.createElement("canvas");
896
+ e.height = 1, e.width = 1;
897
+ function n() {
898
+ var i, a;
899
+ return $t.toCanvas(e, {
900
+ bcid: l.value.bcid,
901
+ text: (i = l.value.defaultValue) != null ? i : "10000",
902
+ height: l.value.height,
903
+ width: l.value.width,
904
+ padding: (a = l.value.padding) != null ? a : 0,
905
+ eclevel: "H"
906
+ }), e.toDataURL();
907
+ }
908
+ return (i, a) => g(l) ? (r(), x("div", Xt, [
909
+ y("img", {
910
+ src: n(),
911
+ style: ee({ width: g(l).width + "px", height: g(l).height + "px" })
912
+ }, null, 12, Yt)
913
+ ])) : D("", !0);
914
+ }
915
+ }), Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
916
+ __proto__: null,
917
+ default: tt
918
+ }, Symbol.toStringTag, { value: "Module" })), Zt = {
919
+ __name: "barcode",
920
+ setup(o) {
921
+ return (t, l) => (r(), R(tt, ke(Ae(t.$props)), null, 16));
922
+ }
923
+ }, eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
924
+ __proto__: null,
925
+ default: Zt
926
+ }, Symbol.toStringTag, { value: "Module" })), to = /* @__PURE__ */ E({
927
+ __name: "card",
928
+ props: Q(),
929
+ setup(o) {
930
+ const t = o;
931
+ return (l, e) => l.field && l.field.key && l.field.children ? (r(!0), x(I, { key: 0 }, oe(l.field.children, (n, i) => (r(), R($e, {
932
+ key: i,
933
+ data: t.data,
934
+ "selected-path": t.selectedPath,
935
+ field: n,
936
+ "field-index": i,
937
+ path: g(he)(t.path, i)
938
+ }, null, 8, ["data", "selected-path", "field", "field-index", "path"]))), 128)) : D("", !0);
939
+ }
940
+ }), oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
941
+ __proto__: null,
942
+ default: to
943
+ }, Symbol.toStringTag, { value: "Module" })), no = /* @__PURE__ */ E({
944
+ __name: "col",
945
+ props: Q(),
946
+ setup(o) {
947
+ const t = o;
948
+ function l(n, i, a) {
949
+ var c;
950
+ return ((c = a == null ? void 0 : a.dataset) == null ? void 0 : c.category) === "base";
951
+ }
952
+ function e(n) {
953
+ var c;
954
+ if (!n || !((c = t.field) != null && c.children))
955
+ return;
956
+ const i = n.newIndex, a = te(t.field.children);
957
+ a[i] = Be(a[i], { options: {} }), K.emit("widget(path:update)", [t.path, { ...t.field, children: a }]);
958
+ }
959
+ return (n, i) => t.field && t.field.children ? (r(), R(g(Ce), Me({
960
+ key: 0,
961
+ list: t.field.children,
962
+ class: "fe-form-widget-list",
963
+ group: { name: "orchisky", put: l }
964
+ }, g(Xe), { onAdd: e }), {
965
+ item: f(({ element: a, index: c }) => [
966
+ a && a.key ? (r(), R($e, {
967
+ key: 0,
968
+ data: t.data,
969
+ "selected-path": t.selectedPath,
970
+ field: a,
971
+ "field-index": c,
972
+ path: g(he)(t.path, c)
973
+ }, null, 8, ["data", "selected-path", "field", "field-index", "path"])) : D("", !0)
974
+ ]),
975
+ footer: f(() => []),
976
+ _: 1
977
+ }, 16, ["list", "group"])) : D("", !0);
978
+ }
979
+ }), lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
980
+ __proto__: null,
981
+ default: no
982
+ }, Symbol.toStringTag, { value: "Module" })), io = /* @__PURE__ */ E({
983
+ __name: "grid",
984
+ props: Q(),
985
+ setup(o) {
986
+ const t = o;
987
+ return (l, e) => {
988
+ const n = m("a-col"), i = m("a-row");
989
+ return l.field && l.field.key && l.field.children ? (r(), R(i, { key: 0 }, {
990
+ default: f(() => [
991
+ (r(!0), x(I, null, oe(l.field.children, (a, c) => (r(), R(n, {
992
+ key: c,
993
+ span: 12
994
+ }, {
995
+ default: f(() => [
996
+ p($e, {
997
+ data: t.data,
998
+ "selected-path": t.selectedPath,
999
+ field: a,
1000
+ "field-index": c,
1001
+ path: g(he)(t.path, c)
1002
+ }, null, 8, ["data", "selected-path", "field", "field-index", "path"])
1003
+ ]),
1004
+ _: 2
1005
+ }, 1024))), 128))
1006
+ ]),
1007
+ _: 1
1008
+ })) : D("", !0);
1009
+ };
1010
+ }
1011
+ }), ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1012
+ __proto__: null,
1013
+ default: io
1014
+ }, Symbol.toStringTag, { value: "Module" })), so = /* @__PURE__ */ E({
1015
+ __name: "hline",
1016
+ props: Q(),
1017
+ setup(o) {
1018
+ const t = o, l = B(() => se(t.data, t.path));
1019
+ return (e, n) => l.value.options ? (r(), x("div", {
1020
+ key: 0,
1021
+ style: ee(l.value.options)
1022
+ }, null, 4)) : D("", !0);
1023
+ }
1024
+ }), ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1025
+ __proto__: null,
1026
+ default: so
1027
+ }, Symbol.toStringTag, { value: "Module" })), co = /* @__PURE__ */ E({
1028
+ __name: "input",
1029
+ props: Q(),
1030
+ setup(o) {
1031
+ const t = o;
1032
+ return (l, e) => {
1033
+ var n;
1034
+ return r(), x("div", null, " 404 - " + M((n = t.field) == null ? void 0 : n.name), 1);
1035
+ };
1036
+ }
1037
+ }), uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1038
+ __proto__: null,
1039
+ default: co
1040
+ }, Symbol.toStringTag, { value: "Module" })), ot = /* @__PURE__ */ E({
1041
+ __name: "unknown",
1042
+ props: Q(),
1043
+ setup(o) {
1044
+ const t = o;
1045
+ return (l, e) => {
1046
+ var n, i;
1047
+ return r(), x("div", null, " 404 - " + M((n = t.field) == null ? void 0 : n.name) + " / " + M((i = t.field) == null ? void 0 : i.type), 1);
1048
+ };
1049
+ }
1050
+ }), po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1051
+ __proto__: null,
1052
+ default: ot
1053
+ }, Symbol.toStringTag, { value: "Module" })), je = /* @__PURE__ */ Object.assign({ "./barcode.vue": eo, "./card.vue": oo, "./col.vue": lo, "./grid.vue": ao, "./hline.vue": ro, "./input.vue": uo, "./qrcode.vue": Jt, "./unknown.vue": po });
1054
+ function fo(o) {
1055
+ const t = Object.keys(je).find((l) => l.indexOf(`${o}.vue`) !== -1);
1056
+ return t && je[t] ? je[t].default : ot;
1057
+ }
1058
+ const _o = ["data-type", "data-category", "data-path"], ho = {
1059
+ key: 0,
1060
+ class: "fe-form-widget-tool"
1061
+ }, go = { class: "fe-form-widget-tool-btn" }, vo = { class: "fe-form-widget-tool-rb" }, $e = /* @__PURE__ */ E({
1062
+ __name: "widget-item",
1063
+ props: Q(),
1064
+ setup(o) {
1065
+ const t = o;
1066
+ function l() {
1067
+ var a, c;
1068
+ if (t.path && ((a = t.field) == null ? void 0 : a.category) === "child" && ((c = t.field) == null ? void 0 : c.children)) {
1069
+ const [u] = De(t.path);
1070
+ return se(t.data, u).length > 1;
1071
+ }
1072
+ return !0;
1073
+ }
1074
+ function e() {
1075
+ return t.selectedPath && t.selectedPath === t.path;
1076
+ }
1077
+ function n() {
1078
+ K.emit("widget(path:selected)", t.path);
1079
+ }
1080
+ function i() {
1081
+ return t.field.options ? t.field.fixed ? {
1082
+ position: "absolute",
1083
+ width: t.field.options.width,
1084
+ height: t.field.options.height,
1085
+ left: t.field.options.left,
1086
+ top: t.field.options.top,
1087
+ zIndex: e() ? "9" : "1"
1088
+ } : {} : {};
1089
+ }
1090
+ return (a, c) => {
1091
+ const u = m("icon-drag-dot-vertical"), C = m("icon-copy"), $ = m("icon-delete");
1092
+ return r(), x("div", {
1093
+ class: _e(["fe-form-widget-item fe-cl", { "fe-form-widget-item-fixed": t.field.fixed }]),
1094
+ "data-type": t.field.type,
1095
+ "data-category": t.field.category,
1096
+ "data-path": a.$props.path
1097
+ }, [
1098
+ y("div", {
1099
+ class: _e(["fe-form-widget-view", { "is-selected": e(), "fe-form-widget-view-fixed": t.field.fixed }]),
1100
+ style: ee(i()),
1101
+ onClick: c[2] || (c[2] = kt((b) => n(), ["stop"]))
1102
+ }, [
1103
+ e() ? (r(), x("div", ho, [
1104
+ y("div", {
1105
+ class: _e(["fe-form-widget-tool-lt", { "fe-moving": !g(He)(t.field) }])
1106
+ }, [
1107
+ y("span", go, [
1108
+ g(He)(t.field) ? D("", !0) : (r(), R(u, { key: 0 })),
1109
+ q(" " + M(t.field.name), 1)
1110
+ ])
1111
+ ], 2),
1112
+ y("div", vo, [
1113
+ y("span", {
1114
+ class: "fe-form-widget-tool-btn",
1115
+ onClick: c[0] || (c[0] = (b) => g(K).emit("widget(path:copy)", t.path))
1116
+ }, [
1117
+ p(C)
1118
+ ]),
1119
+ l() ? (r(), x("span", {
1120
+ key: 0,
1121
+ class: "fe-form-widget-tool-btn",
1122
+ onClick: c[1] || (c[1] = (b) => g(K).emit("widget(path:delete)", t.path))
1123
+ }, [
1124
+ p($)
1125
+ ])) : D("", !0)
1126
+ ])
1127
+ ])) : D("", !0),
1128
+ (r(), R(xe(g(fo)(t.field.type)), ke(Ae(t)), null, 16))
1129
+ ], 6)
1130
+ ], 10, _o);
1131
+ };
1132
+ }
1133
+ });
1134
+ const mo = { class: "u-h u-card" }, yo = { class: "u-card__hd fe-layout-head" }, bo = {
1135
+ class: "u-flex",
1136
+ style: { width: "100%", padding: "0 8px" }
1137
+ }, wo = { class: "u-flex__item" }, xo = { class: "u-main fe-layout-main" }, ko = { class: "fe-layout-footer" }, Co = { class: "fe-layout-footer-content" }, $o = /* @__PURE__ */ E({
1138
+ __name: "main",
1139
+ props: Q(),
1140
+ emits: ["update:data", "update:selectedPath", "reset"],
1141
+ setup(o, { emit: t }) {
1142
+ const l = t, e = o, { config: n } = et(e), i = B(Ht(e)), a = B({
1143
+ get: () => e.data,
1144
+ set: (_) => l("update:data", _)
1145
+ });
1146
+ function c(_, v) {
1147
+ const k = te(e.data.children);
1148
+ k[_] = v, l("update:data", { ...e.data, children: k });
1149
+ }
1150
+ function u(_) {
1151
+ l("update:selectedPath", _);
1152
+ }
1153
+ K.on("widget(reset)", () => l("reset")), K.on("widget(path:selected)", u), K.on("widget(path:update)", (_) => {
1154
+ _[0] && (a.value = pe(e.data, _[0], _[1]));
1155
+ }), K.on("widget(config)", (_) => {
1156
+ e.selectedPath && (a.value = pe(e.data, `${e.selectedPath}.options`, _));
1157
+ }), K.on("widget(selectedPath:options)", (_) => {
1158
+ e.selectedPath && (a.value = pe(e.data, `${e.selectedPath}.options`, _));
1159
+ }), K.on("widget(path:copy)", (_) => {
1160
+ if (!_)
1161
+ return;
1162
+ const [v, k] = De(_), j = se(e.data, v), z = Ye(j[k], { options: {} });
1163
+ j.splice(k, 0, z), a.value = pe(e.data, v, j);
1164
+ }), K.on("widget(path:delete)", (_) => {
1165
+ if (!_)
1166
+ return;
1167
+ const [v, k] = De(_), j = se(e.data, v);
1168
+ j.splice(k, 1), u(""), pe(e.data, v, j);
1169
+ });
1170
+ const C = V(null);
1171
+ function $(_) {
1172
+ const { originalEvent: v } = _, { clientX: k, clientY: j } = v, { top: z, left: L } = C.value.getBoundingClientRect();
1173
+ return { left: `${k - L}px`, top: `${j - z}px` };
1174
+ }
1175
+ function b(_) {
1176
+ if (!_)
1177
+ return;
1178
+ const v = _.newIndex, k = te(e.data.children);
1179
+ k[v] = Be(k[v], { options: $(_) }), k[v].children && (k[v] = {
1180
+ ...k[v],
1181
+ children: te(k[v].children)
1182
+ }), u(`children[${v}]`), c(v, k[v]);
1183
+ }
1184
+ function S(_) {
1185
+ if (!_)
1186
+ return;
1187
+ const v = _.newIndex, k = te(e.data.children);
1188
+ k[v].options = {
1189
+ ...k[v].options,
1190
+ ...$(_)
1191
+ }, u(`children[${v}]`), c(v, k[v]);
1192
+ }
1193
+ return (_, v) => {
1194
+ const k = m("a-button"), j = m("a-space"), z = m("icon-save"), L = m("icon-eye"), J = m("icon-eraser"), ge = m("icon-right"), ce = m("a-link"), Z = m("a-breadcrumb-item"), de = m("a-breadcrumb");
1195
+ return r(), x("div", mo, [
1196
+ y("div", yo, [
1197
+ y("div", bo, [
1198
+ y("div", wo, [
1199
+ p(j, { size: "mini" }, {
1200
+ default: f(() => [
1201
+ p(k, { size: "mini" }, {
1202
+ default: f(() => [
1203
+ q("PC")
1204
+ ]),
1205
+ _: 1
1206
+ }),
1207
+ p(k, { size: "mini" }, {
1208
+ default: f(() => [
1209
+ q("A4")
1210
+ ]),
1211
+ _: 1
1212
+ })
1213
+ ]),
1214
+ _: 1
1215
+ })
1216
+ ]),
1217
+ y("div", null, [
1218
+ p(j, { size: "mini" }, {
1219
+ default: f(() => [
1220
+ p(k, {
1221
+ size: "mini",
1222
+ title: "\u4FDD\u5B58",
1223
+ onClick: v[0] || (v[0] = (W) => g(K).emit("widget(click)", ["save", a.value]))
1224
+ }, {
1225
+ icon: f(() => [
1226
+ p(z)
1227
+ ]),
1228
+ _: 1
1229
+ }),
1230
+ p(k, {
1231
+ size: "mini",
1232
+ title: "\u9884\u89C8"
1233
+ }, {
1234
+ icon: f(() => [
1235
+ p(L)
1236
+ ]),
1237
+ _: 1
1238
+ }),
1239
+ p(k, {
1240
+ size: "mini",
1241
+ title: "\u6E05\u7A7A",
1242
+ onClick: v[1] || (v[1] = (W) => l("reset"))
1243
+ }, {
1244
+ icon: f(() => [
1245
+ p(J)
1246
+ ]),
1247
+ _: 1
1248
+ })
1249
+ ]),
1250
+ _: 1
1251
+ })
1252
+ ])
1253
+ ])
1254
+ ]),
1255
+ y("div", xo, [
1256
+ y("div", {
1257
+ ref_key: "formRef",
1258
+ ref: C,
1259
+ class: "fe-form-page",
1260
+ style: ee({ width: `${g(n).width}`, height: `${g(n).height}`, margin: "0 auto" })
1261
+ }, [
1262
+ p(g(Ce), Me({
1263
+ class: "fe-form-widget-list",
1264
+ list: a.value.children,
1265
+ group: { name: "orchisky", put: !0 }
1266
+ }, g(Xe), {
1267
+ onUpdate: g(Gt),
1268
+ onAdd: b,
1269
+ onEnd: S
1270
+ }), {
1271
+ item: f(({ element: W, index: N }) => [
1272
+ W && W.key ? (r(), R($e, {
1273
+ key: 0,
1274
+ data: e.data,
1275
+ "selected-path": e.selectedPath,
1276
+ field: W,
1277
+ "field-index": N,
1278
+ path: g(he)(null, N)
1279
+ }, null, 8, ["data", "selected-path", "field", "field-index", "path"])) : D("", !0)
1280
+ ]),
1281
+ footer: f(() => [
1282
+ ae(_.$slots, "default")
1283
+ ]),
1284
+ _: 3
1285
+ }, 16, ["list", "onUpdate"])
1286
+ ], 4)
1287
+ ]),
1288
+ y("div", ko, [
1289
+ y("div", Co, [
1290
+ p(de, null, {
1291
+ separator: f(() => [
1292
+ p(ge)
1293
+ ]),
1294
+ default: f(() => {
1295
+ var W;
1296
+ return [
1297
+ p(Z, null, {
1298
+ default: f(() => [
1299
+ p(ce, null, {
1300
+ default: f(() => [
1301
+ q("\u7ED3\u6784\u5BFC\u822A")
1302
+ ]),
1303
+ _: 1
1304
+ })
1305
+ ]),
1306
+ _: 1
1307
+ }),
1308
+ (W = i.value) != null && W.length ? (r(!0), x(I, { key: 0 }, oe(i.value, (N, ve) => (r(), R(Z, { key: ve }, {
1309
+ default: f(() => [
1310
+ N ? (r(), R(ce, {
1311
+ key: 0,
1312
+ onClick: (Ke) => u(N.path)
1313
+ }, {
1314
+ default: f(() => [
1315
+ q(M(N.label), 1)
1316
+ ]),
1317
+ _: 2
1318
+ }, 1032, ["onClick"])) : D("", !0)
1319
+ ]),
1320
+ _: 2
1321
+ }, 1024))), 128)) : D("", !0)
1322
+ ];
1323
+ }),
1324
+ _: 1
1325
+ })
1326
+ ])
1327
+ ])
1328
+ ]);
1329
+ };
1330
+ }
1331
+ }), So = { class: "fe-form-side" }, Ro = { class: "u-card u-h" }, Oo = { class: "u-card__hd fe-layout-head" }, Po = {
1332
+ class: "u-tabs u-tabs--small",
1333
+ style: { border: "0" }
1334
+ }, zo = ["onClick"], jo = { class: "u-card__bd fe-cl fe-layout-body" }, nt = /* @__PURE__ */ E({
1335
+ __name: "tabs",
1336
+ props: {
1337
+ list: Array,
1338
+ index: {
1339
+ type: Number,
1340
+ default: 0
1341
+ }
1342
+ },
1343
+ setup(o) {
1344
+ const t = o, l = V(t.index);
1345
+ function e(i) {
1346
+ return { "is-active": i === l.value };
1347
+ }
1348
+ function n(i) {
1349
+ l.value = i;
1350
+ }
1351
+ return (i, a) => (r(), x("div", So, [
1352
+ y("div", Ro, [
1353
+ y("div", Oo, [
1354
+ y("div", Po, [
1355
+ (r(!0), x(I, null, oe(t.list, (c, u) => (r(), x("div", {
1356
+ key: u,
1357
+ class: "u-tabs__item",
1358
+ onClick: (C) => n(u)
1359
+ }, [
1360
+ y("div", {
1361
+ class: _e(["u-tabs__link", e(u)])
1362
+ }, M(c), 3)
1363
+ ], 8, zo))), 128))
1364
+ ])
1365
+ ]),
1366
+ y("div", jo, [
1367
+ ae(i.$slots, "default", { index: l.value })
1368
+ ])
1369
+ ])
1370
+ ]));
1371
+ }
1372
+ }), To = {
1373
+ title: "\u8F85\u52A9\u63A7\u4EF6",
1374
+ order: 4,
1375
+ children: [
1376
+ {
1377
+ type: "hline",
1378
+ name: "\u6A2A\u7EBF",
1379
+ icon: "icon-line",
1380
+ fixed: !0,
1381
+ options: {
1382
+ width: "90pt",
1383
+ height: "9pt",
1384
+ borderTop: "1px solid #000"
1385
+ },
1386
+ optionsConfig: {
1387
+ borderTop: {
1388
+ show: !1
1389
+ }
1390
+ }
1391
+ },
1392
+ {
1393
+ type: "hline",
1394
+ name: "\u7AD6\u7EBF",
1395
+ icon: "icon-line",
1396
+ fixed: !0,
1397
+ options: {
1398
+ width: "9pt",
1399
+ height: "90pt",
1400
+ borderLeft: "1px solid #000"
1401
+ },
1402
+ optionsConfig: {
1403
+ borderLeft: {
1404
+ show: !1
1405
+ }
1406
+ }
1407
+ }
1408
+ ]
1409
+ }, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1410
+ __proto__: null,
1411
+ default: To
1412
+ }, Symbol.toStringTag, { value: "Module" })), Do = {
1413
+ title: "\u57FA\u7840\u5B57\u6BB5",
1414
+ order: 1,
1415
+ children: [
1416
+ {
1417
+ type: "input",
1418
+ name: "\u5355\u884C\u6587\u672C",
1419
+ icon: "icon-text",
1420
+ category: "base",
1421
+ fixed: !0,
1422
+ options: {
1423
+ width: "120pt",
1424
+ height: "9.75pt",
1425
+ defaultValue: "1"
1426
+ },
1427
+ optionsConfig: {
1428
+ height: "input",
1429
+ width: "input"
1430
+ }
1431
+ },
1432
+ {
1433
+ type: "textarea",
1434
+ name: "\u591A\u884C\u6587\u672C",
1435
+ icon: "icon-text",
1436
+ category: "base",
1437
+ fixed: !0,
1438
+ options: {
1439
+ width: "250pt",
1440
+ height: "42pt"
1441
+ }
1442
+ },
1443
+ {
1444
+ type: "image",
1445
+ name: "\u56FE\u7247",
1446
+ icon: "icon-text",
1447
+ fixed: !0,
1448
+ options: {
1449
+ width: "150pt",
1450
+ height: "150pt"
1451
+ }
1452
+ }
1453
+ ]
1454
+ }, Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1455
+ __proto__: null,
1456
+ default: Do
1457
+ }, Symbol.toStringTag, { value: "Module" })), Mo = {
1458
+ title: "\u6761\u5F62\u7801 ",
1459
+ order: 7,
1460
+ children: [
1461
+ {
1462
+ type: "barcode",
1463
+ name: "\u6761\u5F62\u7801",
1464
+ icon: "icon-text",
1465
+ category: "base",
1466
+ fixed: !0,
1467
+ options: {
1468
+ width: 142,
1469
+ height: 42,
1470
+ defaultValue: "201212121212",
1471
+ bcid: "code128"
1472
+ },
1473
+ optionsConfig: {
1474
+ height: "number",
1475
+ width: "number",
1476
+ bcid: {
1477
+ type: "select",
1478
+ options: [
1479
+ { value: "code39", text: "Code 39" },
1480
+ { value: "code39ext", text: "Code 39 Extended" },
1481
+ { value: "code93", text: "Code 93" },
1482
+ { value: "code93ext", text: "Code 93 Extended" },
1483
+ { value: "code128", text: "Code 128" },
1484
+ { value: "interleaved2of5", text: "Interleaved 2 of 5 (ITF)" }
1485
+ ]
1486
+ }
1487
+ }
1488
+ },
1489
+ {
1490
+ type: "qrcode",
1491
+ name: "\u4E8C\u7EF4\u7801",
1492
+ icon: "icon-text",
1493
+ category: "base",
1494
+ fixed: !0,
1495
+ options: {
1496
+ width: 142,
1497
+ height: 142,
1498
+ padding: 2,
1499
+ bcid: "qrcode"
1500
+ },
1501
+ optionsConfig: {
1502
+ height: "number",
1503
+ width: "number",
1504
+ padding: "number",
1505
+ bcid: {
1506
+ type: "select",
1507
+ options: [
1508
+ { value: "qrcode", text: "QR Code" },
1509
+ { value: "microqrcode", text: "Micro QR Code" },
1510
+ { value: "swissqrcode", text: "Swiss QR Code" },
1511
+ { value: "rectangularmicroqrcode", text: "Rectangular Micro QR Code" },
1512
+ { value: "azteccode", text: "Aztec Code" },
1513
+ { value: "aztecrune", text: "Aztec Runes" },
1514
+ { value: "azteccodecompact", text: "Compact Aztec Code" },
1515
+ { value: "datamatrix", text: "Data Matrix" },
1516
+ { value: "datamatrixrectangular", text: "Data Matrix Rectangular" },
1517
+ { value: "hanxin", text: "\u6C49\u4FE1\u7801" },
1518
+ { value: "pdf417", text: "PDF417" },
1519
+ { value: "micropdf417", text: "MicroPDF417" }
1520
+ ]
1521
+ }
1522
+ }
1523
+ }
1524
+ ]
1525
+ }, Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1526
+ __proto__: null,
1527
+ default: Mo
1528
+ }, Symbol.toStringTag, { value: "Module" })), Fo = {
1529
+ title: "\u5E03\u5C40\u63A7\u4EF6",
1530
+ order: 4,
1531
+ children: [
1532
+ {
1533
+ type: "card",
1534
+ icon: "icon-grid",
1535
+ name: "\u9AD8\u7EA7\u5361\u7247",
1536
+ category: "view",
1537
+ children: [
1538
+ {
1539
+ type: "col",
1540
+ name: "\u5206\u7EC4",
1541
+ category: "child",
1542
+ options: { span: 12 },
1543
+ children: []
1544
+ }
1545
+ ],
1546
+ options: {
1547
+ width: "200pt",
1548
+ height: "auto"
1549
+ }
1550
+ },
1551
+ {
1552
+ type: "grid",
1553
+ icon: "icon-grid",
1554
+ name: "\u6805\u683C\u5E03\u5C40",
1555
+ category: "view",
1556
+ children: [
1557
+ {
1558
+ type: "col",
1559
+ name: "\u5206\u7EC4",
1560
+ category: "child",
1561
+ options: { span: 12 },
1562
+ children: []
1563
+ },
1564
+ {
1565
+ type: "col",
1566
+ name: "\u5B50\u6805\u683C",
1567
+ category: "child",
1568
+ options: { span: 12 },
1569
+ children: []
1570
+ }
1571
+ ],
1572
+ options: {
1573
+ width: "200pt",
1574
+ height: "auto"
1575
+ }
1576
+ }
1577
+ ]
1578
+ }, Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1579
+ __proto__: null,
1580
+ default: Fo
1581
+ }, Symbol.toStringTag, { value: "Module" })), Ge = /* @__PURE__ */ Object.assign({ "./module/assist.ts": Eo, "./module/base.ts": Ao, "./module/bwip.ts": Bo, "./module/view.ts": Ko }), Fe = [];
1582
+ Object.keys(Ge).forEach((o) => {
1583
+ const t = Ge[o].default;
1584
+ t && Fe.push(t);
1585
+ });
1586
+ Fe.sort((o, t) => o.order - t.order);
1587
+ const Vo = { class: "fe-form-side-bd" }, Io = { class: "fe-form-side-bd-title" }, Uo = { class: "fe-form-side-bd-content" }, Wo = /* @__PURE__ */ E({
1588
+ __name: "side-library",
1589
+ setup(o) {
1590
+ return (t, l) => {
1591
+ const e = m("icon-drag-arrow"), n = m("a-button");
1592
+ return r(), x("div", Vo, [
1593
+ (r(!0), x(I, null, oe(g(Fe), ({ title: i, children: a }, c) => (r(), x(I, { key: c }, [
1594
+ y("span", Io, [
1595
+ y("strong", null, M(i), 1)
1596
+ ]),
1597
+ y("div", Uo, [
1598
+ p(g(Ce), {
1599
+ list: a,
1600
+ group: { name: "orchisky", pull: "clone", put: !1, animation: 300 },
1601
+ sort: !1,
1602
+ "ghost-class": "ghost",
1603
+ "chosen-class": "chosen",
1604
+ "item-key": "key"
1605
+ }, {
1606
+ item: f(({ element: u }) => [
1607
+ p(n, {
1608
+ class: _e(["fe-form-side-bd-button", { "fe-ghost-fixed": u.fixed }]),
1609
+ "data-type": u.type,
1610
+ "data-category": u.category,
1611
+ size: "mini"
1612
+ }, {
1613
+ icon: f(() => [
1614
+ p(e)
1615
+ ]),
1616
+ default: f(() => [
1617
+ q(" " + M(u.name), 1)
1618
+ ]),
1619
+ _: 2
1620
+ }, 1032, ["class", "data-type", "data-category"])
1621
+ ]),
1622
+ _: 2
1623
+ }, 1032, ["list"])
1624
+ ])
1625
+ ], 64))), 128))
1626
+ ]);
1627
+ };
1628
+ }
1629
+ }), No = { class: "fe-form-side" }, qo = /* @__PURE__ */ E({
1630
+ __name: "side",
1631
+ props: Q(),
1632
+ setup(o) {
1633
+ const t = o;
1634
+ return (l, e) => {
1635
+ const n = m("a-empty");
1636
+ return r(), x("div", No, [
1637
+ p(nt, { list: ["\u7EC4\u4EF6\u5E93", "\u7ED3\u6784", "\u6570\u636E"] }, {
1638
+ default: f(({ index: i }) => [
1639
+ i === 0 ? (r(), R(Wo, ke(Me({ key: 0 }, t)), null, 16)) : (r(), R(n, { key: 1 }))
1640
+ ]),
1641
+ _: 1
1642
+ })
1643
+ ]);
1644
+ };
1645
+ }
1646
+ });
1647
+ const lt = /* @__PURE__ */ E({
1648
+ __name: "input",
1649
+ props: { label: String, modelValue: [String, Number, Boolean] },
1650
+ emits: ["update:model-value"],
1651
+ setup(o, { emit: t }) {
1652
+ const l = t, e = o;
1653
+ return (n, i) => {
1654
+ const a = m("a-input"), c = m("a-form-item");
1655
+ return r(), R(c, {
1656
+ field: "name",
1657
+ label: e.label
1658
+ }, {
1659
+ default: f(() => [
1660
+ p(a, {
1661
+ "model-value": String(e.modelValue),
1662
+ size: "mini",
1663
+ "onUpdate:modelValue": i[0] || (i[0] = (u) => l("update:model-value", u))
1664
+ }, null, 8, ["model-value"])
1665
+ ]),
1666
+ _: 1
1667
+ }, 8, ["label"]);
1668
+ };
1669
+ }
1670
+ }), Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1671
+ __proto__: null,
1672
+ default: lt
1673
+ }, Symbol.toStringTag, { value: "Module" })), Ho = /* @__PURE__ */ E({
1674
+ __name: "number",
1675
+ props: { label: String, modelValue: [String, Number, Boolean] },
1676
+ emits: ["update:model-value"],
1677
+ setup(o, { emit: t }) {
1678
+ const l = t, e = o;
1679
+ return (n, i) => {
1680
+ const a = m("a-input-number"), c = m("a-form-item");
1681
+ return r(), R(c, {
1682
+ field: "name",
1683
+ label: e.label
1684
+ }, {
1685
+ default: f(() => [
1686
+ p(a, {
1687
+ "model-value": Number(e.modelValue),
1688
+ size: "mini",
1689
+ "onUpdate:modelValue": i[0] || (i[0] = (u) => l("update:model-value", u))
1690
+ }, null, 8, ["model-value"])
1691
+ ]),
1692
+ _: 1
1693
+ }, 8, ["label"]);
1694
+ };
1695
+ }
1696
+ }), Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1697
+ __proto__: null,
1698
+ default: Ho
1699
+ }, Symbol.toStringTag, { value: "Module" })), Qo = /* @__PURE__ */ E({
1700
+ __name: "select",
1701
+ props: { label: String, modelValue: [String, Number, Boolean], optionsConfig: Object },
1702
+ emits: ["update:model-value"],
1703
+ setup(o, { emit: t }) {
1704
+ const l = t, e = o;
1705
+ return (n, i) => {
1706
+ const a = m("a-select"), c = m("a-form-item");
1707
+ return r(), R(c, {
1708
+ field: "name",
1709
+ label: e.label
1710
+ }, {
1711
+ default: f(() => {
1712
+ var u, C;
1713
+ return [
1714
+ p(a, {
1715
+ "model-value": String(e.modelValue),
1716
+ options: (C = (u = e.optionsConfig) == null ? void 0 : u.options) != null ? C : [],
1717
+ size: "mini",
1718
+ "onUpdate:modelValue": i[0] || (i[0] = ($) => l("update:model-value", $))
1719
+ }, null, 8, ["model-value", "options"])
1720
+ ];
1721
+ }),
1722
+ _: 1
1723
+ }, 8, ["label"]);
1724
+ };
1725
+ }
1726
+ }), Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1727
+ __proto__: null,
1728
+ default: Qo
1729
+ }, Symbol.toStringTag, { value: "Module" })), Te = /* @__PURE__ */ Object.assign({ "./input.vue": Lo, "./number.vue": Go, "./select.vue": Xo });
1730
+ function Yo(o) {
1731
+ const t = Object.keys(Te).find((l) => l.indexOf(`${o}.vue`) !== -1);
1732
+ return t && Te[t] ? Te[t].default : lt;
1733
+ }
1734
+ const fe = /* @__PURE__ */ E({
1735
+ __name: "panel-item",
1736
+ props: {
1737
+ type: { type: String, default: "input" }
1738
+ },
1739
+ setup(o) {
1740
+ const t = o;
1741
+ return (l, e) => (r(), R(xe(g(Yo)(t.type)), ke(Ae(l.$props)), null, 16));
1742
+ }
1743
+ }), Jo = { class: "fe-form-panels" }, Zo = { class: "fe-form-panels-bd" }, en = /* @__PURE__ */ y("span", { class: "fe-form-side-bd-title" }, [
1744
+ /* @__PURE__ */ y("strong", null, "\u57FA\u7840\u8BBE\u7F6E")
1745
+ ], -1), tn = /* @__PURE__ */ y("span", { class: "fe-form-side-bd-title" }, [
1746
+ /* @__PURE__ */ y("strong", null, "\u5176\u4ED6")
1747
+ ], -1), on = /* @__PURE__ */ E({
1748
+ __name: "panel",
1749
+ props: Q(),
1750
+ setup(o) {
1751
+ const t = o, { config: l, selectedWidget: e, selectedWidgetOptions: n, selectedWidgetOptionsConfig: i } = et(t);
1752
+ function a($) {
1753
+ var S;
1754
+ const b = (S = i.value) == null ? void 0 : S[$];
1755
+ if (!!b)
1756
+ return typeof b == "object" ? b : { type: b };
1757
+ }
1758
+ function c($) {
1759
+ var b;
1760
+ return (b = a($)) == null ? void 0 : b.type;
1761
+ }
1762
+ function u($, b) {
1763
+ n.value = { ...n.value, [$]: b };
1764
+ }
1765
+ function C($, b) {
1766
+ l.value = { ...l.value, [$]: b };
1767
+ }
1768
+ return ($, b) => {
1769
+ const S = m("a-form"), _ = m("a-divider"), v = m("a-empty");
1770
+ return r(), x("div", Jo, [
1771
+ p(nt, { list: ["\u7EC4\u4EF6\u5C5E\u6027", "\u5168\u5C40\u5C5E\u6027"] }, {
1772
+ default: f(({ index: k }) => [
1773
+ y("div", Zo, [
1774
+ k === 1 ? (r(), R(S, {
1775
+ key: 0,
1776
+ model: {},
1777
+ layout: "vertical"
1778
+ }, {
1779
+ default: f(() => [
1780
+ (r(!0), x(I, null, oe(g(l), (j, z) => (r(), R(fe, {
1781
+ key: z,
1782
+ "model-value": j,
1783
+ label: $.$t(`fe.panel.${z}`),
1784
+ "onUpdate:modelValue": (L) => C(z, L)
1785
+ }, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))
1786
+ ]),
1787
+ _: 1
1788
+ })) : k === 0 ? (r(), x(I, { key: 1 }, [
1789
+ g(e) ? (r(), R(S, {
1790
+ key: 0,
1791
+ model: {},
1792
+ layout: "vertical"
1793
+ }, {
1794
+ default: f(() => [
1795
+ en,
1796
+ p(fe, {
1797
+ "model-value": g(e).type,
1798
+ type: "input",
1799
+ label: "\u7C7B\u578B",
1800
+ disabled: ""
1801
+ }, null, 8, ["model-value"]),
1802
+ p(fe, {
1803
+ "model-value": g(e).name,
1804
+ type: "input",
1805
+ label: "\u6807\u9898",
1806
+ disabled: ""
1807
+ }, null, 8, ["model-value"]),
1808
+ p(fe, {
1809
+ "model-value": g(e).model,
1810
+ type: "input",
1811
+ label: "\u6807\u8BC6\u5B57\u7B26",
1812
+ disabled: ""
1813
+ }, null, 8, ["model-value"]),
1814
+ p(_, { margin: 5 }),
1815
+ tn,
1816
+ (r(!0), x(I, null, oe(g(n), (j, z) => {
1817
+ var L;
1818
+ return r(), x(I, { key: z }, [
1819
+ ((L = a(z)) == null ? void 0 : L.show) !== !1 ? (r(), R(fe, {
1820
+ key: 0,
1821
+ "model-value": j,
1822
+ type: c(z),
1823
+ label: $.$t(`fe.panel.${z}`),
1824
+ "options-config": a(z),
1825
+ "onUpdate:modelValue": (J) => u(z, J)
1826
+ }, null, 8, ["model-value", "type", "label", "options-config", "onUpdate:modelValue"])) : D("", !0)
1827
+ ], 64);
1828
+ }), 128))
1829
+ ]),
1830
+ _: 1
1831
+ })) : (r(), R(v, { key: 1 }))
1832
+ ], 64)) : (r(), R(v, { key: 2 }))
1833
+ ])
1834
+ ]),
1835
+ _: 1
1836
+ })
1837
+ ]);
1838
+ };
1839
+ }
1840
+ });
1841
+ const nn = { class: "fe-layout" }, ln = { class: "u-page u-page--row" }, an = {
1842
+ class: "u-main",
1843
+ style: { padding: "0" }
1844
+ }, sn = /* @__PURE__ */ E({
1845
+ __name: "index",
1846
+ props: {
1847
+ data: {
1848
+ type: Object,
1849
+ default: () => ({ children: [], config: {}, models: {} })
1850
+ }
1851
+ },
1852
+ emits: ["click"],
1853
+ setup(o, { expose: t, emit: l }) {
1854
+ const e = l;
1855
+ K.on("widget(click)", (b) => {
1856
+ !b || (typeof b == "string" && (b = [b]), b[0] && e("click", { type: b[0], arg: b[1] }));
1857
+ });
1858
+ const i = V({ ...o.data }), a = V("");
1859
+ function c(b) {
1860
+ i.value = Object.assign({}, { ...b });
1861
+ }
1862
+ function u() {
1863
+ c({ ...i.value, children: [] }), a.value = "";
1864
+ }
1865
+ function C() {
1866
+ return te(i.value);
1867
+ }
1868
+ function $() {
1869
+ return i.value;
1870
+ }
1871
+ return t({
1872
+ getData: C,
1873
+ setData: c,
1874
+ onReset: u,
1875
+ getSelectedWidget: $
1876
+ }), (b, S) => (r(), x("div", nn, [
1877
+ y("div", ln, [
1878
+ p(qo, {
1879
+ "selected-path": a.value,
1880
+ "onUpdate:selectedPath": S[0] || (S[0] = (_) => a.value = _),
1881
+ data: i.value
1882
+ }, null, 8, ["selected-path", "data"]),
1883
+ y("div", an, [
1884
+ p($o, {
1885
+ "selected-path": a.value,
1886
+ "onUpdate:selectedPath": S[1] || (S[1] = (_) => a.value = _),
1887
+ data: i.value,
1888
+ "onUpdate:data": S[2] || (S[2] = (_) => i.value = _),
1889
+ onReset: S[3] || (S[3] = (_) => u())
1890
+ }, null, 8, ["selected-path", "data"])
1891
+ ]),
1892
+ p(on, {
1893
+ "selected-path": a.value,
1894
+ "onUpdate:selectedPath": S[4] || (S[4] = (_) => a.value = _),
1895
+ data: i.value
1896
+ }, null, 8, ["selected-path", "data"])
1897
+ ])
1898
+ ]));
1899
+ }
1900
+ }), vn = {
1901
+ install(o) {
1902
+ o.use(mt), o.component("OrchiskyTable", Nt), o.component("OrchiskyPrint", sn);
1903
+ }
1904
+ };
1905
+ export {
1906
+ sn as OrchiskyPrint,
1907
+ Nt as OrchiskyTable,
1908
+ vn as default,
1909
+ hn as formatTable,
1910
+ gn as useOrchiskyVxe
1911
+ };