@shaonq/vue 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +8 -0
- package/lib/index.js +424 -416
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -21,9 +21,9 @@ function xe(e) {
|
|
|
21
21
|
return typeof e == "function";
|
|
22
22
|
}
|
|
23
23
|
function He(e, t) {
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
return t.format && xe(t.format) ? t.format(
|
|
24
|
+
var o;
|
|
25
|
+
const n = (o = e[t.dataIndex]) != null ? o : "";
|
|
26
|
+
return t.format && xe(t.format) ? t.format(n, e) : n;
|
|
27
27
|
}
|
|
28
28
|
function dt(e, t) {
|
|
29
29
|
return xe(t.style) ? t.style(e) : { ...t.style };
|
|
@@ -64,8 +64,8 @@ const le = q(/* @__PURE__ */ Object.create({}));
|
|
|
64
64
|
function no(e) {
|
|
65
65
|
const t = {
|
|
66
66
|
...e,
|
|
67
|
-
ref: (
|
|
68
|
-
|
|
67
|
+
ref: (o) => {
|
|
68
|
+
o && (le.value = o);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
return {
|
|
@@ -75,15 +75,18 @@ function no(e) {
|
|
|
75
75
|
getRowKey() {
|
|
76
76
|
return _t(e);
|
|
77
77
|
},
|
|
78
|
-
getRowIndex(
|
|
79
|
-
return le.value.getRowIndex(
|
|
78
|
+
getRowIndex(o) {
|
|
79
|
+
return le.value.getRowIndex(o);
|
|
80
80
|
},
|
|
81
|
-
getRowSeq(
|
|
82
|
-
return le.value.getRowSeq(
|
|
81
|
+
getRowSeq(o) {
|
|
82
|
+
return le.value.getRowSeq(o);
|
|
83
83
|
},
|
|
84
84
|
getTableData() {
|
|
85
|
-
var
|
|
86
|
-
return le.value ? (u = (
|
|
85
|
+
var o, u;
|
|
86
|
+
return le.value ? (u = (o = le.value) == null ? void 0 : o.getTableData().fullData) != null ? u : [] : [];
|
|
87
|
+
},
|
|
88
|
+
setSelectionRow(o, u = !0) {
|
|
89
|
+
le.value && (t.selectedType === "checkbox" && le.value.setCheckboxRow(o, u), t.selectedType === "radio" && le.value.setRadioRow(o));
|
|
87
90
|
},
|
|
88
91
|
getSelection() {
|
|
89
92
|
return le.value ? t.selectedType === "checkbox" ? le.value.getCheckboxRecords() : t.selectedType === "radio" ? [le.value.getRadioRecord()] : [] : [];
|
|
@@ -91,53 +94,53 @@ function no(e) {
|
|
|
91
94
|
getReserveSelection() {
|
|
92
95
|
if (le.value) {
|
|
93
96
|
if (t.selectedType === "checkbox") {
|
|
94
|
-
const
|
|
95
|
-
return e.reserve ?
|
|
97
|
+
const o = le.value.getCheckboxRecords();
|
|
98
|
+
return e.reserve ? o.concat(le.value.getCheckboxReserveRecords()) : o;
|
|
96
99
|
}
|
|
97
100
|
if (t.selectedType === "radio") {
|
|
98
|
-
let
|
|
99
|
-
return e.reserve && !
|
|
101
|
+
let o = le.value.getRadioRecord();
|
|
102
|
+
return e.reserve && !o && (o = le.value.getRadioReserveRecord()), o ? [o] : [];
|
|
100
103
|
}
|
|
101
104
|
return [];
|
|
102
105
|
}
|
|
103
106
|
return [];
|
|
104
107
|
},
|
|
105
|
-
getCheckboxKeySelection(
|
|
108
|
+
getCheckboxKeySelection(o) {
|
|
106
109
|
const u = e.checkboxKey;
|
|
107
|
-
return
|
|
110
|
+
return o || (o = this.getSelection().map((l) => l[u])), this.getTableData().filter((l) => o && o.includes(l[u]));
|
|
108
111
|
},
|
|
109
112
|
clearSelection() {
|
|
110
113
|
le.value && (t.selectedType === "checkbox" && (e.reserve && le.value.clearCheckboxReserve(), le.value.clearCheckboxRow()), t.selectedType === "radio" && (e.reserve && le.value.clearRadioReserve(), le.value.clearRadioRow()));
|
|
111
114
|
},
|
|
112
|
-
insertRow(
|
|
115
|
+
insertRow(o, u, a = !0) {
|
|
113
116
|
var m;
|
|
114
117
|
const l = this.getRowKey();
|
|
115
118
|
if (u && typeof u == "object" && a) {
|
|
116
119
|
const f = le.value.getRowIndex(u);
|
|
117
120
|
f >= 0 && (u = (m = this.getTableData()[f + 1]) != null ? m : -1);
|
|
118
121
|
}
|
|
119
|
-
return
|
|
122
|
+
return o[l] && delete o[l], le.value.insertAt(o, u);
|
|
120
123
|
},
|
|
121
124
|
removeRows() {
|
|
122
125
|
le.value && (t.selectedType === "checkbox" && le.value.removeCheckboxRow(), t.selectedType === "radio" && le.value.removeRadioRow());
|
|
123
126
|
},
|
|
124
|
-
removerRowIndex(
|
|
127
|
+
removerRowIndex(o) {
|
|
125
128
|
if (le.value) {
|
|
126
129
|
const u = this.getTableData();
|
|
127
|
-
u.splice(
|
|
130
|
+
u.splice(o, 1), le.value.reloadData(u);
|
|
128
131
|
}
|
|
129
132
|
},
|
|
130
|
-
async validate(
|
|
131
|
-
|
|
133
|
+
async validate(o = void 0) {
|
|
134
|
+
o = o != null ? o : this.getSelection();
|
|
132
135
|
let u = "";
|
|
133
|
-
const a = await le.value.validate(
|
|
136
|
+
const a = await le.value.validate(o);
|
|
134
137
|
return a && Object.values(a).forEach((l) => {
|
|
135
138
|
l.forEach(({ rowIndex: i, column: m, rules: f }) => {
|
|
136
139
|
f.forEach((r) => {
|
|
137
140
|
u = `\u5E8F\u53F7${i + 1} ${m.title} ${r.message}`;
|
|
138
141
|
});
|
|
139
142
|
});
|
|
140
|
-
}), [u,
|
|
143
|
+
}), [u, o];
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
};
|
|
@@ -190,9 +193,9 @@ function Qo(e) {
|
|
|
190
193
|
let t = null;
|
|
191
194
|
return typeof e == "string" && (t = jt[e] || jt["zh-CN"]), t || e;
|
|
192
195
|
}
|
|
193
|
-
function Yo(e, t,
|
|
194
|
-
const
|
|
195
|
-
return
|
|
196
|
+
function Yo(e, t, n) {
|
|
197
|
+
const o = Array.isArray(n) ? n : [n], u = String(Qo(e)[t]);
|
|
198
|
+
return n ? u.replace(/{(\d+)}/g, (a, l) => o[l] || "") : u;
|
|
196
199
|
}
|
|
197
200
|
const Xo = { class: "orc-table" }, Zo = { class: "arco-card-header-title" }, en = { class: "u-card orc-table__setting" }, tn = {
|
|
198
201
|
class: "u-card__hd",
|
|
@@ -232,9 +235,9 @@ const Xo = { class: "orc-table" }, Zo = { class: "arco-card-header-title" }, en
|
|
|
232
235
|
hook: {}
|
|
233
236
|
},
|
|
234
237
|
emits: ["update:selectedKeys", "cellClick", "onReset", "change", "confirm", "cellDblclick"],
|
|
235
|
-
setup(e, { expose: t, emit:
|
|
238
|
+
setup(e, { expose: t, emit: n }) {
|
|
236
239
|
var $t;
|
|
237
|
-
const
|
|
240
|
+
const o = Jo(), u = G(() => o.useErrData);
|
|
238
241
|
function a(V) {
|
|
239
242
|
return !!(V && typeof V == "object" && ["setup", "props"].some((j) => j in V));
|
|
240
243
|
}
|
|
@@ -245,7 +248,7 @@ const Xo = { class: "orc-table" }, Zo = { class: "arco-card-header-title" }, en
|
|
|
245
248
|
function f(V) {
|
|
246
249
|
return xe(V) ? V() : V;
|
|
247
250
|
}
|
|
248
|
-
const r =
|
|
251
|
+
const r = n;
|
|
249
252
|
function h(V, j) {
|
|
250
253
|
return (oe) => {
|
|
251
254
|
oe && typeof oe == "object" && !Array.isArray(oe) ? Object.assign(V, oe) : V[j] = oe;
|
|
@@ -777,6 +780,9 @@ const Xo = { class: "orc-table" }, Zo = { class: "arco-card-header-title" }, en
|
|
|
777
780
|
"show-total": "",
|
|
778
781
|
"show-page-size": "",
|
|
779
782
|
"page-size-options": $.value,
|
|
783
|
+
"page-size-props": {
|
|
784
|
+
triggerProps: { autoFitPopupMinWidth: !0, contentClass: "arco-trigger-content-size-small" }
|
|
785
|
+
},
|
|
780
786
|
onPageSizeChange: be,
|
|
781
787
|
onChange: De
|
|
782
788
|
}, {
|
|
@@ -805,32 +811,32 @@ const vn = {
|
|
|
805
811
|
if (typeof e != "number")
|
|
806
812
|
return e;
|
|
807
813
|
if (typeof t != "number") {
|
|
808
|
-
const
|
|
809
|
-
|
|
814
|
+
const n = String(e).split(".");
|
|
815
|
+
n.length === 2 && (t = n[1].length);
|
|
810
816
|
}
|
|
811
817
|
return Qe.commafy(e, { digits: t });
|
|
812
818
|
},
|
|
813
819
|
t: (e) => Qe.toDateString(e, "yyyy-MM-dd"),
|
|
814
820
|
time: (e, t = "yyyy-MM-dd HH:mm:ss") => Qe.toDateString(e, t),
|
|
815
|
-
p: (e, t,
|
|
821
|
+
p: (e, t, n = "%") => typeof e != "number" ? e : (typeof t != "number" && (t = 2), (e * 100).toFixed(t) + n)
|
|
816
822
|
}, yn = (e) => {
|
|
817
|
-
const t = q(/* @__PURE__ */ Object.create({})),
|
|
823
|
+
const t = q(/* @__PURE__ */ Object.create({})), n = q([]), { tableOption: o, $grid: u, $gridTwo: a } = no(e), l = {
|
|
818
824
|
rowKey: a.getRowKey(),
|
|
819
825
|
addKey(i) {
|
|
820
826
|
var r;
|
|
821
827
|
const f = a.getTableData()[i];
|
|
822
828
|
if (!f.disabled && u.value) {
|
|
823
829
|
const h = a.getRowKey();
|
|
824
|
-
if (
|
|
830
|
+
if (o.selectedType === "checkbox") {
|
|
825
831
|
const E = u.value, { fullData: w } = E.getTableData();
|
|
826
832
|
if (e.checkboxKey) {
|
|
827
833
|
const B = e.checkboxKey, $ = w.filter((y) => y[B] && y[B] === f[B]);
|
|
828
834
|
$.length && E.setCheckboxRow($, !0);
|
|
829
835
|
} else
|
|
830
836
|
u.value.setCheckboxRow(f, !0);
|
|
831
|
-
h && (
|
|
837
|
+
h && (n.value = ((r = u.value.getCheckboxRecords()) != null ? r : []).map((B) => B[h]));
|
|
832
838
|
}
|
|
833
|
-
|
|
839
|
+
o.selectedType === "radio" && (u.value.setRadioRow(f), u.value.getRadioRecord() && h && (n.value = [u.value.getRadioRecord()].map((E) => E[h])));
|
|
834
840
|
}
|
|
835
841
|
},
|
|
836
842
|
setTableData(i) {
|
|
@@ -847,24 +853,24 @@ const vn = {
|
|
|
847
853
|
};
|
|
848
854
|
return {
|
|
849
855
|
tableRef: t,
|
|
850
|
-
tableOptions:
|
|
856
|
+
tableOptions: o,
|
|
851
857
|
tableUtils: {
|
|
852
858
|
...l,
|
|
853
859
|
...a
|
|
854
860
|
},
|
|
855
861
|
$grid: u,
|
|
856
|
-
selectedKeys:
|
|
862
|
+
selectedKeys: n
|
|
857
863
|
};
|
|
858
864
|
};
|
|
859
865
|
function Ri(e, t) {
|
|
860
|
-
const { total:
|
|
866
|
+
const { total: n = "\u5408\u8BA1", affixIndex: o = 1, ignoreIndex: u = 2 } = { ...t };
|
|
861
867
|
return {
|
|
862
868
|
footerStyle: { fontWeight: "bold" },
|
|
863
869
|
footerMethod({ columns: a, data: l }) {
|
|
864
870
|
return [
|
|
865
871
|
a.map((i, m) => {
|
|
866
|
-
if (m ===
|
|
867
|
-
return
|
|
872
|
+
if (m === o)
|
|
873
|
+
return n;
|
|
868
874
|
if (m < u)
|
|
869
875
|
return null;
|
|
870
876
|
const f = l.reduce((r, h) => (e != null && e.length ? e.includes(i.field) : typeof h[i.field] == "number") ? (r || (r = 0), r = Qe.add(r, h[i.field]), r) : null, null);
|
|
@@ -876,7 +882,7 @@ function Ri(e, t) {
|
|
|
876
882
|
}
|
|
877
883
|
const gt = (e) => {
|
|
878
884
|
let t = [];
|
|
879
|
-
const
|
|
885
|
+
const n = JSON.stringify(e, (o, u) => {
|
|
880
886
|
if (typeof u == "object" && u !== null) {
|
|
881
887
|
if (t.indexOf(u) !== -1)
|
|
882
888
|
return null;
|
|
@@ -884,7 +890,7 @@ const gt = (e) => {
|
|
|
884
890
|
}
|
|
885
891
|
return u;
|
|
886
892
|
});
|
|
887
|
-
return t = null, JSON.parse(
|
|
893
|
+
return t = null, JSON.parse(n);
|
|
888
894
|
};
|
|
889
895
|
function vt(e) {
|
|
890
896
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
@@ -901,52 +907,52 @@ function It(e, t) {
|
|
|
901
907
|
if (!(e != null && e.type))
|
|
902
908
|
throw new Error(`widget ${e == null ? void 0 : e.key} error`);
|
|
903
909
|
t = { ...t, ...hn(e.type) };
|
|
904
|
-
const
|
|
905
|
-
return
|
|
910
|
+
const n = Object.assign({}, { ...e, ...t, options: { ...e.options, ...t.options } });
|
|
911
|
+
return n.category !== "basic" && delete n.model, n;
|
|
906
912
|
}
|
|
907
913
|
function lo(e) {
|
|
908
914
|
return Array.isArray(e) ? e : e.replace(/\[/g, ".").replace(/\]/g, "").split(".");
|
|
909
915
|
}
|
|
910
|
-
function io(e, t,
|
|
911
|
-
return typeof e != "object" ?
|
|
916
|
+
function io(e, t, n) {
|
|
917
|
+
return typeof e != "object" ? n : lo(t).reduce((o, u) => (o || {})[u], { ...e }) || n;
|
|
912
918
|
}
|
|
913
|
-
function Fn(e, t,
|
|
914
|
-
return typeof e != "object" ? e : (lo(t).reduce((
|
|
919
|
+
function Fn(e, t, n) {
|
|
920
|
+
return typeof e != "object" ? e : (lo(t).reduce((o, u, a, l) => a === l.length - 1 ? (o[u] = n, null) : (u in o || (o[u] = /^[0-9]{1,}$/.test(l[a + 1]) ? [] : {}), o[u]), e), gt(e));
|
|
915
921
|
}
|
|
916
|
-
function Pe(e, t,
|
|
917
|
-
const
|
|
918
|
-
return `${
|
|
922
|
+
function Pe(e, t, n = "children") {
|
|
923
|
+
const o = e ? `${e}.` : "", u = t !== void 0 ? `[${t}]` : "";
|
|
924
|
+
return `${o}${n}${u}`;
|
|
919
925
|
}
|
|
920
926
|
function ct(e) {
|
|
921
927
|
const t = /(.*)\[(.*)$/.exec(e);
|
|
922
928
|
if (t) {
|
|
923
|
-
const [,
|
|
924
|
-
return [
|
|
929
|
+
const [, n, o] = t, u = Number(o.slice(0, -1));
|
|
930
|
+
return [n, Number.isNaN(u) ? void 0 : u];
|
|
925
931
|
}
|
|
926
932
|
return ["", void 0];
|
|
927
933
|
}
|
|
928
|
-
function so(e, t,
|
|
934
|
+
function so(e, t, n) {
|
|
929
935
|
if (typeof e == "function" || typeof t == "function")
|
|
930
936
|
throw new Error("Cannot merge config in form of callback");
|
|
931
|
-
const
|
|
937
|
+
const o = { ...e };
|
|
932
938
|
return Object.keys(t).forEach((u) => {
|
|
933
939
|
const a = t[u];
|
|
934
940
|
if (a == null)
|
|
935
941
|
return;
|
|
936
|
-
const l =
|
|
942
|
+
const l = o[u];
|
|
937
943
|
if (l == null)
|
|
938
|
-
|
|
944
|
+
o[u] = a;
|
|
939
945
|
else if (Array.isArray(l) || Array.isArray(a))
|
|
940
|
-
|
|
946
|
+
o[u] = [...Mt(l), ...Mt(a)];
|
|
941
947
|
else if (vt(l) && vt(a))
|
|
942
948
|
try {
|
|
943
|
-
|
|
949
|
+
o[u] = so(l, a, n ? `${n}.${u}` : u);
|
|
944
950
|
} catch {
|
|
945
|
-
console.error(`${
|
|
951
|
+
console.error(`${n} Error: `, a);
|
|
946
952
|
}
|
|
947
953
|
else
|
|
948
|
-
|
|
949
|
-
}),
|
|
954
|
+
o[u] = a;
|
|
955
|
+
}), o;
|
|
950
956
|
}
|
|
951
957
|
const Je = Yt({
|
|
952
958
|
children: [],
|
|
@@ -977,7 +983,7 @@ const Oe = {
|
|
|
977
983
|
options: "select"
|
|
978
984
|
};
|
|
979
985
|
function Fe() {
|
|
980
|
-
const { children: e, models: t, config:
|
|
986
|
+
const { children: e, models: t, config: n, remoteFuncs: o, selectPath: u } = et(), a = () => ({ children: e.value });
|
|
981
987
|
function l(w, B) {
|
|
982
988
|
if (w) {
|
|
983
989
|
if (!/^children/.test(w))
|
|
@@ -1034,16 +1040,16 @@ function Fe() {
|
|
|
1034
1040
|
}), [B];
|
|
1035
1041
|
}, useWidgetOperation: () => {
|
|
1036
1042
|
const w = (z, S) => {
|
|
1037
|
-
|
|
1043
|
+
n.value[z] = S;
|
|
1038
1044
|
}, B = (z) => {
|
|
1039
1045
|
u.value = z;
|
|
1040
1046
|
}, $ = (z) => u.value === z, y = () => {
|
|
1041
1047
|
e.value = [], u.value = null;
|
|
1042
1048
|
}, v = () => ({
|
|
1043
|
-
config: { ...
|
|
1049
|
+
config: { ...n.value },
|
|
1044
1050
|
children: [...e.value],
|
|
1045
1051
|
models: { ...t.value },
|
|
1046
|
-
remoteFuncs: { ...
|
|
1052
|
+
remoteFuncs: { ...o.value }
|
|
1047
1053
|
});
|
|
1048
1054
|
function b(z) {
|
|
1049
1055
|
if (!z)
|
|
@@ -1096,7 +1102,7 @@ function Fe() {
|
|
|
1096
1102
|
} };
|
|
1097
1103
|
}
|
|
1098
1104
|
function Ti(...e) {
|
|
1099
|
-
e.forEach((t,
|
|
1105
|
+
e.forEach((t, n) => console.log(`%c#${n + 1}: %o`, "color: #1672f6 ;", t));
|
|
1100
1106
|
}
|
|
1101
1107
|
function Ne(e) {
|
|
1102
1108
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1122,7 +1128,7 @@ function yt(e) {
|
|
|
1122
1128
|
const Ii = (e) => {
|
|
1123
1129
|
try {
|
|
1124
1130
|
let t = [];
|
|
1125
|
-
const
|
|
1131
|
+
const n = JSON.stringify(e, (o, u) => {
|
|
1126
1132
|
if (typeof u == "object" && u !== null) {
|
|
1127
1133
|
if (t.indexOf(u) !== -1)
|
|
1128
1134
|
return null;
|
|
@@ -1130,91 +1136,91 @@ const Ii = (e) => {
|
|
|
1130
1136
|
}
|
|
1131
1137
|
return u;
|
|
1132
1138
|
});
|
|
1133
|
-
return t = null, JSON.parse(
|
|
1139
|
+
return t = null, JSON.parse(n);
|
|
1134
1140
|
} catch {
|
|
1135
1141
|
return console.log("deepClone error, please use omitObject to remove non data type keys", e), Ne(e) !== "Array" ? {} : [];
|
|
1136
1142
|
}
|
|
1137
1143
|
};
|
|
1138
1144
|
function ro(e, t = []) {
|
|
1139
1145
|
typeof t == "string" && (t = [t]);
|
|
1140
|
-
const
|
|
1141
|
-
return Object.keys(e).forEach((
|
|
1142
|
-
t.includes(
|
|
1143
|
-
}),
|
|
1146
|
+
const n = /* @__PURE__ */ Object.create({});
|
|
1147
|
+
return Object.keys(e).forEach((o) => {
|
|
1148
|
+
t.includes(o) || (n[o] = e[o]);
|
|
1149
|
+
}), n;
|
|
1144
1150
|
}
|
|
1145
1151
|
function co(e, t = []) {
|
|
1146
1152
|
typeof t == "string" && (t = [t]);
|
|
1147
|
-
const
|
|
1148
|
-
return Object.keys(e).forEach((
|
|
1149
|
-
t.includes(
|
|
1150
|
-
}),
|
|
1153
|
+
const n = /* @__PURE__ */ Object.create({});
|
|
1154
|
+
return Object.keys(e).forEach((o) => {
|
|
1155
|
+
t.includes(o) && (n[o] = e[o]);
|
|
1156
|
+
}), n;
|
|
1151
1157
|
}
|
|
1152
1158
|
const Wi = () => (Number(new Date()) + Number(String(Math.random()).slice(2, 15))).toString(32);
|
|
1153
1159
|
function po(e) {
|
|
1154
1160
|
return Array.isArray(e) ? e : e.replace(/\[/g, ".").replace(/\]/g, "").split(".");
|
|
1155
1161
|
}
|
|
1156
|
-
function Ui(e, t,
|
|
1157
|
-
return typeof e != "object" ?
|
|
1162
|
+
function Ui(e, t, n) {
|
|
1163
|
+
return typeof e != "object" ? n : po(t).reduce((o, u) => (o || {})[u], e) || n;
|
|
1158
1164
|
}
|
|
1159
|
-
function Ni(e, t,
|
|
1160
|
-
return typeof e != "object" || po(t).reduce((
|
|
1165
|
+
function Ni(e, t, n) {
|
|
1166
|
+
return typeof e != "object" || po(t).reduce((o, u, a, l) => a === l.length - 1 ? (o[u] = n, null) : (u in o || (o[u] = /^[0-9]{1,}$/.test(l[a + 1]) ? [] : {}), o[u]), e), e;
|
|
1161
1167
|
}
|
|
1162
1168
|
const qi = (e, t = "") => {
|
|
1163
1169
|
if (/(chrome|safari|firefox)/g.test(navigator.userAgent.toLowerCase())) {
|
|
1164
|
-
const
|
|
1165
|
-
if (
|
|
1166
|
-
const
|
|
1167
|
-
return
|
|
1170
|
+
const n = document.createElement("a");
|
|
1171
|
+
if (n.href = e, n.download !== void 0 && (t = t || e.substring(e.lastIndexOf("/") + 1, e.length), n.download = t), console.log(`download: ${t}`), document.createEvent) {
|
|
1172
|
+
const o = document.createEvent("MouseEvents");
|
|
1173
|
+
return o.initEvent("click", !0, !0), n.dispatchEvent(o), !0;
|
|
1168
1174
|
}
|
|
1169
1175
|
}
|
|
1170
1176
|
return ~e.indexOf("?") || (e += "?download"), window.open(e, "_self"), !0;
|
|
1171
1177
|
};
|
|
1172
1178
|
function je(e, t) {
|
|
1173
|
-
const
|
|
1174
|
-
return [
|
|
1179
|
+
const n = q(e != null ? e : {});
|
|
1180
|
+
return [n, (u) => {
|
|
1175
1181
|
var a;
|
|
1176
|
-
|
|
1182
|
+
n.value = { ...e, ...u != null ? u : {} }, (a = t == null ? void 0 : t.value) != null && a.resetFields && t.value.resetFields();
|
|
1177
1183
|
}];
|
|
1178
1184
|
}
|
|
1179
|
-
function Li(e, t,
|
|
1180
|
-
const
|
|
1181
|
-
wt[
|
|
1185
|
+
function Li(e, t, n = "warning") {
|
|
1186
|
+
const o = t != null ? t : { okButtonProps: { status: "danger" }, okText: "\u5220\u9664" };
|
|
1187
|
+
wt[n]({
|
|
1182
1188
|
title: "\u5220\u9664\u63D0\u793A",
|
|
1183
1189
|
simple: !1,
|
|
1184
1190
|
width: 360,
|
|
1185
1191
|
titleAlign: "start",
|
|
1186
1192
|
content: "\u786E\u5B9A\u5220\u9664\u6B64\u6570\u636E\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",
|
|
1187
1193
|
hideCancel: !1,
|
|
1188
|
-
...
|
|
1194
|
+
...o,
|
|
1189
1195
|
async onOk(u) {
|
|
1190
|
-
typeof
|
|
1196
|
+
typeof o.onOk == "function" && o.onOk(u), e && e();
|
|
1191
1197
|
}
|
|
1192
1198
|
});
|
|
1193
1199
|
}
|
|
1194
|
-
function fo(e, t,
|
|
1195
|
-
const
|
|
1200
|
+
function fo(e, t, n) {
|
|
1201
|
+
const o = { ...e };
|
|
1196
1202
|
for (const u in t) {
|
|
1197
1203
|
const a = t[u];
|
|
1198
1204
|
if (a == null)
|
|
1199
1205
|
continue;
|
|
1200
|
-
const l =
|
|
1206
|
+
const l = o[u];
|
|
1201
1207
|
if (l == null) {
|
|
1202
|
-
|
|
1208
|
+
o[u] = a;
|
|
1203
1209
|
continue;
|
|
1204
1210
|
}
|
|
1205
1211
|
if (Array.isArray(l) || Array.isArray(a)) {
|
|
1206
|
-
|
|
1212
|
+
o[u] = [...yt(l), ...yt(a)];
|
|
1207
1213
|
continue;
|
|
1208
1214
|
}
|
|
1209
1215
|
if (Wt(l) && Wt(a)) {
|
|
1210
|
-
|
|
1216
|
+
o[u] = fo(l, a);
|
|
1211
1217
|
continue;
|
|
1212
1218
|
}
|
|
1213
|
-
|
|
1219
|
+
o[u] = a;
|
|
1214
1220
|
}
|
|
1215
|
-
return
|
|
1221
|
+
return o;
|
|
1216
1222
|
}
|
|
1217
|
-
function Ki(e, t,
|
|
1223
|
+
function Ki(e, t, n = !0) {
|
|
1218
1224
|
if (typeof e == "function" || typeof t == "function")
|
|
1219
1225
|
throw new Error("Cannot merge config in form of callback");
|
|
1220
1226
|
return fo(e, t);
|
|
@@ -1225,19 +1231,19 @@ function Hi(e) {
|
|
|
1225
1231
|
});
|
|
1226
1232
|
}
|
|
1227
1233
|
function Ut(e, t = 5) {
|
|
1228
|
-
const
|
|
1229
|
-
let
|
|
1234
|
+
const n = new Array(e.length);
|
|
1235
|
+
let o = 0, u = 0;
|
|
1230
1236
|
return new Promise((a) => {
|
|
1231
1237
|
function l() {
|
|
1232
|
-
for (; u < t &&
|
|
1233
|
-
const i =
|
|
1234
|
-
|
|
1238
|
+
for (; u < t && o < e.length; ) {
|
|
1239
|
+
const i = o, m = e[i];
|
|
1240
|
+
o += 1, typeof m == "function" && (u += 1, setTimeout(() => {
|
|
1235
1241
|
Promise.resolve().then(() => m()).then((f) => {
|
|
1236
|
-
|
|
1242
|
+
n[i] = f;
|
|
1237
1243
|
}).catch((f) => {
|
|
1238
|
-
console.error(`Task ${i} failed:`, f),
|
|
1244
|
+
console.error(`Task ${i} failed:`, f), n[i] = null;
|
|
1239
1245
|
}).finally(() => {
|
|
1240
|
-
u -= 1, l(),
|
|
1246
|
+
u -= 1, l(), o >= e.length && u === 0 && a(n);
|
|
1241
1247
|
});
|
|
1242
1248
|
}, 0));
|
|
1243
1249
|
}
|
|
@@ -1245,25 +1251,25 @@ function Ut(e, t = 5) {
|
|
|
1245
1251
|
l();
|
|
1246
1252
|
});
|
|
1247
1253
|
}
|
|
1248
|
-
async function Bn(e, t,
|
|
1254
|
+
async function Bn(e, t, n, o) {
|
|
1249
1255
|
var w;
|
|
1250
1256
|
if (!t)
|
|
1251
1257
|
throw new Error("downLoadPdf not element");
|
|
1252
1258
|
const u = `${e || "\u65B0\u5EFA PDF\u6587\u6863"}.pdf`;
|
|
1253
|
-
let a =
|
|
1259
|
+
let a = n != null && n.className ? Array.from(t.querySelectorAll(n.className)) : [t];
|
|
1254
1260
|
a.length || (a = [t]);
|
|
1255
|
-
const l = new qo({ unit: "mm", format: "a4", orientation: "portrait", putOnlyUsedFonts: !0, compress: !0, floatPrecision: "smart", ...
|
|
1261
|
+
const l = new qo({ unit: "mm", format: "a4", orientation: "portrait", putOnlyUsedFonts: !0, compress: !0, floatPrecision: "smart", ...o }), i = a.map((B) => () => {
|
|
1256
1262
|
var $;
|
|
1257
|
-
return Lo.toCanvas(B, { scale: ($ =
|
|
1263
|
+
return Lo.toCanvas(B, { scale: ($ = n == null ? void 0 : n.scale) != null ? $ : 1.3 });
|
|
1258
1264
|
}), m = (await Ut(i)).filter((B) => !!B);
|
|
1259
1265
|
if (m.some((B) => B === null))
|
|
1260
1266
|
throw new Error("\u751F\u6210\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u4E0D\u53EF\u8BBF\u95EE\u7684\u7F51\u7EDC\u8D44\u6E90");
|
|
1261
1267
|
console.log(`Create a ${m.length}-page file named ${u}`);
|
|
1262
1268
|
let f = 0;
|
|
1263
1269
|
function r() {
|
|
1264
|
-
f += 1, typeof (
|
|
1270
|
+
f += 1, typeof (n == null ? void 0 : n.progress) == "function" && n.progress(f, m.length);
|
|
1265
1271
|
}
|
|
1266
|
-
const h = (w =
|
|
1272
|
+
const h = (w = n == null ? void 0 : n.paddingBuffer) != null ? w : 5, E = m.map((B, $) => async () => {
|
|
1267
1273
|
$ > 0 && l.addPage();
|
|
1268
1274
|
const y = B.width / 210, v = B.height / y;
|
|
1269
1275
|
if (v <= 297)
|
|
@@ -1278,15 +1284,15 @@ async function Bn(e, t, o, n) {
|
|
|
1278
1284
|
await Ut(E), l.save(u);
|
|
1279
1285
|
}
|
|
1280
1286
|
function kn(e) {
|
|
1281
|
-
var
|
|
1287
|
+
var n, o, u, a, l, i;
|
|
1282
1288
|
if (!e.bcid)
|
|
1283
1289
|
return "";
|
|
1284
1290
|
const t = document.createElement("canvas");
|
|
1285
1291
|
return t.height = 1, t.width = 1, No.toCanvas(t, {
|
|
1286
1292
|
bcid: e.bcid,
|
|
1287
|
-
text: (
|
|
1293
|
+
text: (n = e.defaultValue) != null ? n : "Unknown",
|
|
1288
1294
|
height: e.height,
|
|
1289
|
-
scaleX: (u = (
|
|
1295
|
+
scaleX: (u = (o = e.scaleX) != null ? o : e.scale) != null ? u : 2,
|
|
1290
1296
|
scaleY: (l = (a = e.scaleY) != null ? a : e.scale) != null ? l : 2,
|
|
1291
1297
|
width: e.width,
|
|
1292
1298
|
padding: (i = e.padding) != null ? i : 0,
|
|
@@ -1300,7 +1306,7 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1300
1306
|
isEdit: { type: Boolean }
|
|
1301
1307
|
},
|
|
1302
1308
|
setup(e) {
|
|
1303
|
-
const t = e, { path:
|
|
1309
|
+
const t = e, { path: n } = Re(t), { useField: o, getWidget: u } = Fe(), a = G(() => u(n.value)), [l] = o(n), i = G(() => {
|
|
1304
1310
|
var f;
|
|
1305
1311
|
return (f = a == null ? void 0 : a.value) == null ? void 0 : f.options;
|
|
1306
1312
|
});
|
|
@@ -1329,7 +1335,7 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1329
1335
|
}, Symbol.toStringTag, { value: "Module" })), $n = {
|
|
1330
1336
|
__name: "barcode",
|
|
1331
1337
|
setup(e) {
|
|
1332
|
-
return (t,
|
|
1338
|
+
return (t, n) => (p(), x(mo, Ve(rt(t.$props)), null, 16));
|
|
1333
1339
|
}
|
|
1334
1340
|
}, Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1335
1341
|
__proto__: null,
|
|
@@ -1342,7 +1348,7 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1342
1348
|
isView: { type: Boolean }
|
|
1343
1349
|
},
|
|
1344
1350
|
setup(e) {
|
|
1345
|
-
const t = e, { getWidget:
|
|
1351
|
+
const t = e, { getWidget: n, useDraggableOperation: o } = Fe(), u = G(() => n(t.path)), { onAddWidget: a } = o(), l = (i, m, f) => {
|
|
1346
1352
|
var r;
|
|
1347
1353
|
return t.isView ? !0 : ((r = f == null ? void 0 : f.dataset) == null ? void 0 : r.category) === "basic";
|
|
1348
1354
|
};
|
|
@@ -1381,12 +1387,12 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1381
1387
|
isEdit: { type: Boolean }
|
|
1382
1388
|
},
|
|
1383
1389
|
setup(e) {
|
|
1384
|
-
const t = e, { getWidget:
|
|
1390
|
+
const t = e, { getWidget: n } = Fe(), o = G(() => n(t.path));
|
|
1385
1391
|
return (u, a) => {
|
|
1386
1392
|
const l = g("ACard");
|
|
1387
|
-
return
|
|
1393
|
+
return o.value && o.value.children ? (p(), x(l, {
|
|
1388
1394
|
key: 0,
|
|
1389
|
-
title:
|
|
1395
|
+
title: o.value.name,
|
|
1390
1396
|
size: "small",
|
|
1391
1397
|
style: { "margin-bottom": "8px" }
|
|
1392
1398
|
}, {
|
|
@@ -1411,12 +1417,12 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1411
1417
|
isEdit: { type: Boolean }
|
|
1412
1418
|
},
|
|
1413
1419
|
setup(e) {
|
|
1414
|
-
const t = e, { getWidget:
|
|
1420
|
+
const t = e, { getWidget: n } = Fe(), o = G(() => n(t.path));
|
|
1415
1421
|
return (u, a) => {
|
|
1416
1422
|
const l = g("ACard");
|
|
1417
|
-
return
|
|
1423
|
+
return o.value && o.value.children ? (p(), x(l, {
|
|
1418
1424
|
key: 0,
|
|
1419
|
-
title:
|
|
1425
|
+
title: o.value.name,
|
|
1420
1426
|
size: "small",
|
|
1421
1427
|
style: { "margin-bottom": "8px" }
|
|
1422
1428
|
}, {
|
|
@@ -1451,15 +1457,15 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1451
1457
|
isEdit: { type: Boolean }
|
|
1452
1458
|
},
|
|
1453
1459
|
setup(e) {
|
|
1454
|
-
const t = e, { getWidget:
|
|
1460
|
+
const t = e, { getWidget: n } = Fe(), o = G(() => n(t.path));
|
|
1455
1461
|
return (u, a) => {
|
|
1456
1462
|
const l = g("a-col"), i = g("a-row");
|
|
1457
|
-
return
|
|
1463
|
+
return o.value && o.value.key && o.value.children ? (p(), x(i, {
|
|
1458
1464
|
key: 0,
|
|
1459
1465
|
gutter: 8
|
|
1460
1466
|
}, {
|
|
1461
1467
|
default: c(() => [
|
|
1462
|
-
(p(!0), P(ue, null, ge(
|
|
1468
|
+
(p(!0), P(ue, null, ge(o.value.children, (m, f) => (p(), x(l, {
|
|
1463
1469
|
key: f,
|
|
1464
1470
|
span: 12
|
|
1465
1471
|
}, {
|
|
@@ -1486,10 +1492,10 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1486
1492
|
isEdit: { type: Boolean }
|
|
1487
1493
|
},
|
|
1488
1494
|
setup(e) {
|
|
1489
|
-
const t = e, { getWidget:
|
|
1490
|
-
return (u, a) =>
|
|
1495
|
+
const t = e, { getWidget: n } = Fe(), o = G(() => n(t.path));
|
|
1496
|
+
return (u, a) => o.value && o.value.options ? (p(), P("div", {
|
|
1491
1497
|
key: 0,
|
|
1492
|
-
style: ie(
|
|
1498
|
+
style: ie(o.value.options)
|
|
1493
1499
|
}, null, 4)) : K("", !0);
|
|
1494
1500
|
}
|
|
1495
1501
|
}), In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1502,7 +1508,7 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1502
1508
|
isEdit: { type: Boolean }
|
|
1503
1509
|
},
|
|
1504
1510
|
setup(e) {
|
|
1505
|
-
const t = e, { path:
|
|
1511
|
+
const t = e, { path: n } = Re(t), { useField: o, getWidget: u } = Fe(), a = G(() => u(n.value)), [l] = o(n);
|
|
1506
1512
|
return (i, m) => {
|
|
1507
1513
|
var f;
|
|
1508
1514
|
return a.value && a.value.options && a.value.model ? (p(), P("img", {
|
|
@@ -1528,7 +1534,7 @@ const xn = ["src", "onerror"], Nt = "data:image/gif;base64,R0lGODlhAQABAAAAACH5B
|
|
|
1528
1534
|
isEdit: { type: Boolean }
|
|
1529
1535
|
},
|
|
1530
1536
|
setup(e) {
|
|
1531
|
-
const t = e, { getWidget:
|
|
1537
|
+
const t = e, { getWidget: n, useDraggableOperation: o } = Fe(), u = G(() => n(t.path)), { onAddWidget: a } = o(), l = (i, m, f) => {
|
|
1532
1538
|
var r;
|
|
1533
1539
|
return ((r = f == null ? void 0 : f.dataset) == null ? void 0 : r.category) === "basic";
|
|
1534
1540
|
};
|
|
@@ -1588,7 +1594,7 @@ const Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1588
1594
|
isEdit: { type: Boolean }
|
|
1589
1595
|
},
|
|
1590
1596
|
setup(e) {
|
|
1591
|
-
const t = e, { path:
|
|
1597
|
+
const t = e, { path: n } = Re(t), { getWidget: o } = Fe(), u = G(() => o(n.value)), a = G(() => {
|
|
1592
1598
|
var i, m;
|
|
1593
1599
|
return (m = (i = u == null ? void 0 : u.value) == null ? void 0 : i.options) != null ? m : {};
|
|
1594
1600
|
}), l = G(() => {
|
|
@@ -1622,7 +1628,7 @@ const Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1622
1628
|
isEdit: { type: Boolean }
|
|
1623
1629
|
},
|
|
1624
1630
|
setup(e) {
|
|
1625
|
-
const t = e, { path:
|
|
1631
|
+
const t = e, { path: n } = Re(t), { useField: o, getWidget: u } = Fe(), a = G(() => u(n.value)), [l] = o(n), i = G(() => {
|
|
1626
1632
|
var f;
|
|
1627
1633
|
return (f = a == null ? void 0 : a.value) == null ? void 0 : f.options;
|
|
1628
1634
|
}), m = G(() => {
|
|
@@ -1649,14 +1655,14 @@ const Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1649
1655
|
isEdit: { type: Boolean }
|
|
1650
1656
|
},
|
|
1651
1657
|
setup(e) {
|
|
1652
|
-
const t = e, { path:
|
|
1658
|
+
const t = e, { path: n } = Re(t), { config: o } = et(), { useField: u, getWidget: a } = Fe(), l = G(() => a(n.value)), [i] = u(n), m = G(() => {
|
|
1653
1659
|
var h, E, w, B, $;
|
|
1654
1660
|
return ((h = l.value) == null ? void 0 : h.options) ? {
|
|
1655
1661
|
field: l.value.model,
|
|
1656
1662
|
label: l.value.name,
|
|
1657
1663
|
rules: l.value.rules || ((E = l.value.options) != null && E.required ? [{ required: !0, message: `\u8BF7\u8F93\u5165${l.value.name}` }] : []),
|
|
1658
1664
|
tooltip: (w = l.value.options) == null ? void 0 : w.tooltip,
|
|
1659
|
-
labelColFlex: ($ = (B = l.value.options) == null ? void 0 : B.labelWidth) != null ? $ :
|
|
1665
|
+
labelColFlex: ($ = (B = l.value.options) == null ? void 0 : B.labelWidth) != null ? $ : o.value.labelWidth
|
|
1660
1666
|
} : {};
|
|
1661
1667
|
}), f = G(() => {
|
|
1662
1668
|
var h;
|
|
@@ -1688,7 +1694,7 @@ const Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1688
1694
|
default: _o
|
|
1689
1695
|
}, Symbol.toStringTag, { value: "Module" })), pt = /* @__PURE__ */ Object.assign({ "./barcode.vue": Sn, "./card.vue": Vn, "./form.vue": Rn, "./grid.vue": jn, "./hline.vue": In, "./image.vue": Nn, "./qrcode.vue": Dn, "./subform.vue": Hn, "./table.vue": Jn, "./text.vue": Yn, "./unknown.vue": Xn, "./view.vue": zn });
|
|
1690
1696
|
function Lt(e) {
|
|
1691
|
-
const t = Object.keys(pt).find((
|
|
1697
|
+
const t = Object.keys(pt).find((n) => n.indexOf(`${e}.vue`) !== -1);
|
|
1692
1698
|
return t && pt[t] ? pt[t].default : _o;
|
|
1693
1699
|
}
|
|
1694
1700
|
const Zn = {
|
|
@@ -1704,7 +1710,7 @@ const Zn = {
|
|
|
1704
1710
|
isEdit: { type: Boolean }
|
|
1705
1711
|
},
|
|
1706
1712
|
setup(e) {
|
|
1707
|
-
const t = e, { useWidgetOperation:
|
|
1713
|
+
const t = e, { useWidgetOperation: n } = Fe(), { onDelete: o, onSelected: u, hasSelected: a, onCopy: l } = n(), { getWidget: i, getWidgetProperty: m } = Fe(), f = G(() => i(t.path)), r = () => {
|
|
1708
1714
|
var v;
|
|
1709
1715
|
return ((v = f.value) == null ? void 0 : v.category) === "only";
|
|
1710
1716
|
}, h = () => a(t.path);
|
|
@@ -1766,7 +1772,7 @@ const Zn = {
|
|
|
1766
1772
|
F(m)(t.path).isDelete ? (p(), P("span", {
|
|
1767
1773
|
key: 0,
|
|
1768
1774
|
class: "fe--widget-tool-btn",
|
|
1769
|
-
onClick: b[1] || (b[1] = (L) => F(
|
|
1775
|
+
onClick: b[1] || (b[1] = (L) => F(o)(t.path))
|
|
1770
1776
|
}, [
|
|
1771
1777
|
d(S)
|
|
1772
1778
|
])) : K("", !0)
|
|
@@ -1783,7 +1789,7 @@ const Zn = {
|
|
|
1783
1789
|
isEdit: { type: Boolean, default: !1 }
|
|
1784
1790
|
},
|
|
1785
1791
|
setup(e) {
|
|
1786
|
-
const t = e, { useDraggableOperation:
|
|
1792
|
+
const t = e, { useDraggableOperation: n } = Fe(), o = q(), { onAddWidget: u, onUpdateWidget: a } = n(o), { children: l, config: i, models: m } = et();
|
|
1787
1793
|
return (f, r) => {
|
|
1788
1794
|
const h = g("AForm");
|
|
1789
1795
|
return p(), x(h, {
|
|
@@ -1798,7 +1804,7 @@ const Zn = {
|
|
|
1798
1804
|
default: c(() => [
|
|
1799
1805
|
s("div", {
|
|
1800
1806
|
ref_key: "form$",
|
|
1801
|
-
ref:
|
|
1807
|
+
ref: o,
|
|
1802
1808
|
style: ie([{ display: "block", height: "100%", "min-height": "0", "box-shadow": "0 0 5px rgba(0, 0, 0, 0.08)" }, { width: `${F(i).width}`, height: `${F(i).height}`, margin: "0 auto" }])
|
|
1803
1809
|
}, [
|
|
1804
1810
|
d(F(Ze), I({
|
|
@@ -1831,11 +1837,11 @@ const Zn = {
|
|
|
1831
1837
|
}
|
|
1832
1838
|
});
|
|
1833
1839
|
function go() {
|
|
1834
|
-
const { children: e, selectPath: t } = et(),
|
|
1835
|
-
function
|
|
1840
|
+
const { children: e, selectPath: t } = et(), n = () => ({ children: e.value });
|
|
1841
|
+
function o(i) {
|
|
1836
1842
|
if (!i)
|
|
1837
1843
|
return null;
|
|
1838
|
-
const m = io(
|
|
1844
|
+
const m = io(n(), i);
|
|
1839
1845
|
return m || null;
|
|
1840
1846
|
}
|
|
1841
1847
|
const u = (i) => i.name || "[\u672A\u547D\u540D]", a = G(() => {
|
|
@@ -1846,12 +1852,12 @@ function go() {
|
|
|
1846
1852
|
h.model && i.push({ ...h, key: w, title: u(h) }), (B = h.children) != null && B.length && m(h.children, w);
|
|
1847
1853
|
});
|
|
1848
1854
|
};
|
|
1849
|
-
return m(
|
|
1855
|
+
return m(n().children), i;
|
|
1850
1856
|
}), l = G(() => {
|
|
1851
1857
|
if (t.value) {
|
|
1852
1858
|
const i = String(t.value).split("."), m = [];
|
|
1853
1859
|
return i.reduce((f, r, h) => {
|
|
1854
|
-
const E = [...i].slice(-h).join("."), w =
|
|
1860
|
+
const E = [...i].slice(-h).join("."), w = o(E);
|
|
1855
1861
|
return w && f.push({ ...w, path: E, name: u(w) }), f;
|
|
1856
1862
|
}, m).reverse();
|
|
1857
1863
|
}
|
|
@@ -1866,7 +1872,7 @@ const tu = { class: "u-h u-card" }, ou = { class: "u-card__hd u-aside__hd" }, nu
|
|
|
1866
1872
|
__name: "main",
|
|
1867
1873
|
emits: ["save"],
|
|
1868
1874
|
setup(e, { emit: t }) {
|
|
1869
|
-
const { useWidgetOperation:
|
|
1875
|
+
const { useWidgetOperation: n } = Fe(), { selectedArrayWidget: o } = go(), { setConfig: u, toJson: a, onSelected: l, onReset: i } = n(), m = q(!1);
|
|
1870
1876
|
function f([B, $]) {
|
|
1871
1877
|
u("width", B), u("height", $);
|
|
1872
1878
|
}
|
|
@@ -2011,7 +2017,7 @@ const tu = { class: "u-h u-card" }, ou = { class: "u-card__hd u-aside__hd" }, nu
|
|
|
2011
2017
|
]),
|
|
2012
2018
|
_: 1
|
|
2013
2019
|
}),
|
|
2014
|
-
(D = F(
|
|
2020
|
+
(D = F(o)) != null && D.length ? (p(!0), P(ue, { key: 0 }, ge(F(o), (R, te) => (p(), x(U, { key: te }, {
|
|
2015
2021
|
default: c(() => [
|
|
2016
2022
|
R ? (p(), x(M, {
|
|
2017
2023
|
key: 0,
|
|
@@ -2074,22 +2080,22 @@ const du = { class: "u-card u-h" }, cu = {
|
|
|
2074
2080
|
},
|
|
2075
2081
|
emits: ["update:tab-index"],
|
|
2076
2082
|
setup(e, { emit: t }) {
|
|
2077
|
-
const
|
|
2083
|
+
const n = t, o = e, u = q(o.tabIndex);
|
|
2078
2084
|
function a(i) {
|
|
2079
2085
|
return { "is-active": i === u.value };
|
|
2080
2086
|
}
|
|
2081
2087
|
function l(i) {
|
|
2082
|
-
u.value = i,
|
|
2088
|
+
u.value = i, n("update:tab-index", u.value);
|
|
2083
2089
|
}
|
|
2084
2090
|
return ae(
|
|
2085
|
-
() =>
|
|
2091
|
+
() => o.tabIndex,
|
|
2086
2092
|
(i) => {
|
|
2087
2093
|
u.value = i;
|
|
2088
2094
|
}
|
|
2089
2095
|
), (i, m) => (p(), P("div", du, [
|
|
2090
2096
|
s("div", cu, [
|
|
2091
2097
|
s("div", pu, [
|
|
2092
|
-
(p(!0), P(ue, null, ge(
|
|
2098
|
+
(p(!0), P(ue, null, ge(o.list, (f, r) => (p(), P("div", {
|
|
2093
2099
|
key: r,
|
|
2094
2100
|
class: "u-tabs__item",
|
|
2095
2101
|
onClick: (h) => l(r)
|
|
@@ -2352,15 +2358,15 @@ const Fu = { class: "u-nos" }, Eu = {
|
|
|
2352
2358
|
__name: "card",
|
|
2353
2359
|
props: { title: String, isFirst: Boolean, show: { type: Boolean, default: !0 } },
|
|
2354
2360
|
setup(e) {
|
|
2355
|
-
const t = e,
|
|
2356
|
-
|
|
2361
|
+
const t = e, n = Xt(t.show), o = () => {
|
|
2362
|
+
n.value = !n.value;
|
|
2357
2363
|
};
|
|
2358
2364
|
return (u, a) => {
|
|
2359
2365
|
const l = g("icon-down"), i = g("icon-right");
|
|
2360
2366
|
return p(), P("div", Fu, [
|
|
2361
2367
|
s("div", {
|
|
2362
2368
|
class: "u-card__hd u-aside__hd",
|
|
2363
|
-
style: ie([{ borderBottomWidth:
|
|
2369
|
+
style: ie([{ borderBottomWidth: n.value ? "0px" : "1px" }, { "line-height": "36px", height: "36px", "border-bottom-color": "var(--color-neutral-2)" }])
|
|
2364
2370
|
}, [
|
|
2365
2371
|
s("div", null, [
|
|
2366
2372
|
Z(u.$slots, "title", {}, () => [
|
|
@@ -2369,14 +2375,14 @@ const Fu = { class: "u-nos" }, Eu = {
|
|
|
2369
2375
|
]),
|
|
2370
2376
|
s("span", {
|
|
2371
2377
|
style: { cursor: "pointer" },
|
|
2372
|
-
onClick: a[0] || (a[0] = (m) =>
|
|
2378
|
+
onClick: a[0] || (a[0] = (m) => o())
|
|
2373
2379
|
}, [
|
|
2374
|
-
|
|
2380
|
+
n.value ? (p(), x(l, { key: 0 })) : (p(), x(i, { key: 1 }))
|
|
2375
2381
|
])
|
|
2376
2382
|
], 4),
|
|
2377
2383
|
d(Zt, null, {
|
|
2378
2384
|
default: c(() => [
|
|
2379
|
-
|
|
2385
|
+
n.value ? (p(), P("div", Eu, [
|
|
2380
2386
|
Z(u.$slots, "default")
|
|
2381
2387
|
])) : K("", !0)
|
|
2382
2388
|
]),
|
|
@@ -2390,12 +2396,12 @@ const Fu = { class: "u-nos" }, Eu = {
|
|
|
2390
2396
|
props: { moduleConfig: Array },
|
|
2391
2397
|
setup(e) {
|
|
2392
2398
|
const t = e;
|
|
2393
|
-
function
|
|
2399
|
+
function n() {
|
|
2394
2400
|
return Object.assign([], t.moduleConfig || xt);
|
|
2395
2401
|
}
|
|
2396
|
-
return (
|
|
2402
|
+
return (o, u) => {
|
|
2397
2403
|
const a = g("icon-drag-arrow"), l = g("a-button");
|
|
2398
|
-
return p(!0), P(ue, null, ge(
|
|
2404
|
+
return p(!0), P(ue, null, ge(n(), ({ title: i, children: m }, f) => (p(), x(ut, {
|
|
2399
2405
|
key: f,
|
|
2400
2406
|
title: i,
|
|
2401
2407
|
"is-first": !f
|
|
@@ -2450,21 +2456,21 @@ const Au = { key: 1 }, wu = {
|
|
|
2450
2456
|
__name: "side",
|
|
2451
2457
|
props: { moduleConfig: Array },
|
|
2452
2458
|
setup(e) {
|
|
2453
|
-
const { widgetArray: t } = go(),
|
|
2459
|
+
const { widgetArray: t } = go(), n = e, o = q(!1), { useWidgetOperation: u } = Fe(), { onSelected: a, hasSelected: l } = u();
|
|
2454
2460
|
return (i, m) => {
|
|
2455
2461
|
const f = g("icon-drag-arrow"), r = g("a-empty"), h = g("icon-right"), E = g("icon-left"), w = g("a-button");
|
|
2456
2462
|
return p(), P("div", {
|
|
2457
2463
|
class: "fe--side u-page__side",
|
|
2458
|
-
style: ie({ width:
|
|
2464
|
+
style: ie({ width: o.value ? "0px" : "219px" })
|
|
2459
2465
|
}, [
|
|
2460
|
-
|
|
2466
|
+
o.value ? K("", !0) : (p(), x(vo, {
|
|
2461
2467
|
key: 0,
|
|
2462
2468
|
list: ["\u7EC4\u4EF6\u5E93", "\u6570\u636E\u6E90"]
|
|
2463
2469
|
}, {
|
|
2464
2470
|
default: c(({ index: B }) => [
|
|
2465
2471
|
B === 0 ? (p(), x(Cu, {
|
|
2466
2472
|
key: 0,
|
|
2467
|
-
"module-config":
|
|
2473
|
+
"module-config": n.moduleConfig
|
|
2468
2474
|
}, null, 8, ["module-config"])) : B === 1 ? (p(), P("div", Au, [
|
|
2469
2475
|
F(t).length ? (p(), P("div", wu, [
|
|
2470
2476
|
(p(!0), P(ue, null, ge(F(t), ($, y) => (p(), P("div", {
|
|
@@ -2497,11 +2503,11 @@ const Au = { key: 1 }, wu = {
|
|
|
2497
2503
|
status: "normal",
|
|
2498
2504
|
size: "mini",
|
|
2499
2505
|
class: "arco-btn-light u-page__arrow",
|
|
2500
|
-
style: ie({ borderLeftWidth:
|
|
2501
|
-
onClick: m[0] || (m[0] = (B) =>
|
|
2506
|
+
style: ie({ borderLeftWidth: o.value ? "1px" : "0" }),
|
|
2507
|
+
onClick: m[0] || (m[0] = (B) => o.value = !o.value)
|
|
2502
2508
|
}, {
|
|
2503
2509
|
icon: c(() => [
|
|
2504
|
-
|
|
2510
|
+
o.value ? (p(), x(h, { key: 0 })) : (p(), x(E, { key: 1 }))
|
|
2505
2511
|
]),
|
|
2506
2512
|
_: 1
|
|
2507
2513
|
}, 8, ["style"])
|
|
@@ -2520,13 +2526,13 @@ const Au = { key: 1 }, wu = {
|
|
|
2520
2526
|
},
|
|
2521
2527
|
emits: ["update:model-value"],
|
|
2522
2528
|
setup(e, { emit: t }) {
|
|
2523
|
-
const
|
|
2529
|
+
const n = t, o = e, u = () => {
|
|
2524
2530
|
var i;
|
|
2525
|
-
return (i =
|
|
2531
|
+
return (i = o.modelValue) != null ? i : void 0;
|
|
2526
2532
|
}, a = q(u());
|
|
2527
|
-
return ae(() =>
|
|
2533
|
+
return ae(() => o.modelValue, () => {
|
|
2528
2534
|
a.value = u();
|
|
2529
|
-
}), ae(a, (i) =>
|
|
2535
|
+
}), ae(a, (i) => n("update:model-value", i)), (i, m) => {
|
|
2530
2536
|
const f = g("AInputNumber"), r = g("AInput"), h = g("AFormItem");
|
|
2531
2537
|
return p(), x(h, I({
|
|
2532
2538
|
field: i.field,
|
|
@@ -2562,13 +2568,13 @@ const Au = { key: 1 }, wu = {
|
|
|
2562
2568
|
},
|
|
2563
2569
|
emits: ["update:model-value"],
|
|
2564
2570
|
setup(e, { emit: t }) {
|
|
2565
|
-
const
|
|
2571
|
+
const n = t, o = e, u = () => {
|
|
2566
2572
|
var i;
|
|
2567
|
-
return (i =
|
|
2573
|
+
return (i = o.modelValue) != null ? i : void 0;
|
|
2568
2574
|
}, a = q(u());
|
|
2569
|
-
return ae(() =>
|
|
2575
|
+
return ae(() => o.modelValue, () => {
|
|
2570
2576
|
a.value = u();
|
|
2571
|
-
}), ae(a, (i) =>
|
|
2577
|
+
}), ae(a, (i) => n("update:model-value", i)), (i, m) => {
|
|
2572
2578
|
const f = g("AInputNumber"), r = g("AFormItem");
|
|
2573
2579
|
return p(), x(r, I({
|
|
2574
2580
|
field: i.field,
|
|
@@ -2598,9 +2604,9 @@ const Au = { key: 1 }, wu = {
|
|
|
2598
2604
|
},
|
|
2599
2605
|
emits: ["update:model-value"],
|
|
2600
2606
|
setup(e, { emit: t }) {
|
|
2601
|
-
const
|
|
2607
|
+
const n = t, o = e, u = ["px", "pt", "mm"], a = q("px"), l = q();
|
|
2602
2608
|
return ae(
|
|
2603
|
-
() =>
|
|
2609
|
+
() => o.modelValue,
|
|
2604
2610
|
(i) => {
|
|
2605
2611
|
if (typeof i == "number")
|
|
2606
2612
|
a.value = "px", l.value = i;
|
|
@@ -2614,17 +2620,17 @@ const Au = { key: 1 }, wu = {
|
|
|
2614
2620
|
{
|
|
2615
2621
|
immediate: !0
|
|
2616
2622
|
}
|
|
2617
|
-
), ae([l, a], () =>
|
|
2623
|
+
), ae([l, a], () => n("update:model-value", `${l.value}${a.value}`)), (i, m) => {
|
|
2618
2624
|
const f = g("AInput"), r = g("AInputNumber"), h = g("ASelect"), E = g("AInputGroup"), w = g("AFormItem");
|
|
2619
2625
|
return p(), x(w, I({
|
|
2620
2626
|
field: i.field,
|
|
2621
2627
|
label: i.label
|
|
2622
2628
|
}, i.formProps), {
|
|
2623
2629
|
label: c(() => [
|
|
2624
|
-
T(X(
|
|
2630
|
+
T(X(o.label), 1)
|
|
2625
2631
|
]),
|
|
2626
2632
|
default: c(() => [
|
|
2627
|
-
|
|
2633
|
+
o.modelValue === "100%" ? (p(), x(f, {
|
|
2628
2634
|
key: 0,
|
|
2629
2635
|
size: "mini",
|
|
2630
2636
|
disabled: "",
|
|
@@ -2666,13 +2672,13 @@ const Au = { key: 1 }, wu = {
|
|
|
2666
2672
|
},
|
|
2667
2673
|
emits: ["update:model-value"],
|
|
2668
2674
|
setup(e, { emit: t }) {
|
|
2669
|
-
const
|
|
2675
|
+
const n = t, o = e, u = () => {
|
|
2670
2676
|
var i;
|
|
2671
|
-
return (i =
|
|
2677
|
+
return (i = o.modelValue) != null ? i : void 0;
|
|
2672
2678
|
}, a = q(u());
|
|
2673
|
-
return ae(() =>
|
|
2679
|
+
return ae(() => o.modelValue, () => {
|
|
2674
2680
|
a.value = u();
|
|
2675
|
-
}), ae(a, (i) =>
|
|
2681
|
+
}), ae(a, (i) => n("update:model-value", i)), (i, m) => {
|
|
2676
2682
|
const f = g("ARadioGroup"), r = g("AFormItem");
|
|
2677
2683
|
return p(), x(r, I({
|
|
2678
2684
|
field: i.field,
|
|
@@ -2702,13 +2708,13 @@ const Au = { key: 1 }, wu = {
|
|
|
2702
2708
|
},
|
|
2703
2709
|
emits: ["update:model-value"],
|
|
2704
2710
|
setup(e, { emit: t }) {
|
|
2705
|
-
const
|
|
2711
|
+
const n = t, o = e, u = () => {
|
|
2706
2712
|
var i;
|
|
2707
|
-
return (i =
|
|
2713
|
+
return (i = o.modelValue) != null ? i : void 0;
|
|
2708
2714
|
}, a = q(u());
|
|
2709
|
-
return ae(() =>
|
|
2715
|
+
return ae(() => o.modelValue, () => {
|
|
2710
2716
|
a.value = u();
|
|
2711
|
-
}), ae(a, (i) =>
|
|
2717
|
+
}), ae(a, (i) => n("update:model-value", i)), (i, m) => {
|
|
2712
2718
|
const f = g("ASelect"), r = g("AFormItem");
|
|
2713
2719
|
return p(), x(r, I({
|
|
2714
2720
|
field: i.field,
|
|
@@ -2738,23 +2744,23 @@ const Au = { key: 1 }, wu = {
|
|
|
2738
2744
|
},
|
|
2739
2745
|
emits: ["update:model-value"],
|
|
2740
2746
|
setup(e, { emit: t }) {
|
|
2741
|
-
const
|
|
2747
|
+
const n = e, o = t, u = Xe();
|
|
2742
2748
|
function a() {
|
|
2743
2749
|
var l;
|
|
2744
|
-
u.value = (l = { string: Ht, number: zu, px: Ou, radio: Vu, select: Pu }[
|
|
2750
|
+
u.value = (l = { string: Ht, number: zu, px: Ou, radio: Vu, select: Pu }[n.elementType]) != null ? l : Ht;
|
|
2745
2751
|
}
|
|
2746
|
-
return Ue(a), ae(() =>
|
|
2747
|
-
"onUpdate:modelValue": i[0] || (i[0] = (m) =>
|
|
2752
|
+
return Ue(a), ae(() => n.elementType, a), (l, i) => u.value ? (p(), x(ke(u.value), I({ key: 0 }, n, {
|
|
2753
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => o("update:model-value", m))
|
|
2748
2754
|
}), null, 16)) : K("", !0);
|
|
2749
2755
|
}
|
|
2750
2756
|
}), Ru = /* @__PURE__ */ J({
|
|
2751
2757
|
__name: "panel",
|
|
2752
2758
|
setup(e) {
|
|
2753
|
-
const { getWidgetPanelProperty: t, getWidget:
|
|
2759
|
+
const { getWidgetPanelProperty: t, getWidget: n, updateRootPathValue: o } = Fe(), { t: u } = Ko(), a = q(!1), l = q(0), { config: i, selectPath: m, models: f } = et(), r = (y) => {
|
|
2754
2760
|
l.value = y ? 0 : 1;
|
|
2755
2761
|
};
|
|
2756
2762
|
r(m.value);
|
|
2757
|
-
const h = G(() =>
|
|
2763
|
+
const h = G(() => n(m.value)), E = (y) => (v) => o(`${m.value}.${y}`, v), w = (y, v) => {
|
|
2758
2764
|
h.value && y && (y === "defaultValue" && h.value.model && (f.value[h.value.model] = v), E(`options.${y}`)(v));
|
|
2759
2765
|
}, B = G(
|
|
2760
2766
|
() => {
|
|
@@ -2989,15 +2995,15 @@ const Tu = {
|
|
|
2989
2995
|
},
|
|
2990
2996
|
emits: ["save"],
|
|
2991
2997
|
setup(e, { emit: t }) {
|
|
2992
|
-
const
|
|
2993
|
-
En({ ...
|
|
2998
|
+
const n = t, o = e;
|
|
2999
|
+
En({ ...o.data, models: o.models, remoteFuncs: o.remoteFuncs });
|
|
2994
3000
|
function u(a) {
|
|
2995
|
-
|
|
3001
|
+
o.readonly || n("save", a);
|
|
2996
3002
|
}
|
|
2997
|
-
return (a, l) =>
|
|
3003
|
+
return (a, l) => o.readonly ? (p(), x(bt, { key: 1 })) : (p(), P("div", Tu, [
|
|
2998
3004
|
s("div", ju, [
|
|
2999
3005
|
d(Su, {
|
|
3000
|
-
"module-config":
|
|
3006
|
+
"module-config": o.moduleConfig
|
|
3001
3007
|
}, null, 8, ["module-config"]),
|
|
3002
3008
|
s("div", Mu, [
|
|
3003
3009
|
d(ru, { onSave: u })
|
|
@@ -3011,15 +3017,15 @@ function lt(e) {
|
|
|
3011
3017
|
return e.multiple && (e.defaultValue ? Ne(e.defaultValue) !== "Array" && (e.defaultValue = String(e.defaultValue).split(",")) : e.defaultValue = []), e;
|
|
3012
3018
|
}
|
|
3013
3019
|
const Dt = (e, t) => {
|
|
3014
|
-
const
|
|
3015
|
-
for (const [
|
|
3016
|
-
o
|
|
3017
|
-
return
|
|
3020
|
+
const n = e.__vccOpts || e;
|
|
3021
|
+
for (const [o, u] of t)
|
|
3022
|
+
n[o] = u;
|
|
3023
|
+
return n;
|
|
3018
3024
|
}, Iu = {};
|
|
3019
3025
|
function Wu(e, t) {
|
|
3020
|
-
const
|
|
3026
|
+
const n = g("a-date-picker"), o = g("a-range-picker");
|
|
3021
3027
|
return p(), P("div", null, [
|
|
3022
|
-
e.$attrs.multiple !== !0 ? (p(), x(
|
|
3028
|
+
e.$attrs.multiple !== !0 ? (p(), x(n, Ve(I({ key: 0 }, e.$attrs)), null, 16)) : (p(), x(o, Ve(I({ key: 1 }, e.$attrs)), null, 16))
|
|
3023
3029
|
]);
|
|
3024
3030
|
}
|
|
3025
3031
|
const Uu = /* @__PURE__ */ Dt(Iu, [["render", Wu]]), Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -3027,8 +3033,8 @@ const Uu = /* @__PURE__ */ Dt(Iu, [["render", Wu]]), Nu = /* @__PURE__ */ Object
|
|
|
3027
3033
|
default: Uu
|
|
3028
3034
|
}, Symbol.toStringTag, { value: "Module" })), qu = {};
|
|
3029
3035
|
function Lu(e, t) {
|
|
3030
|
-
const
|
|
3031
|
-
return p(), x(
|
|
3036
|
+
const n = g("a-input");
|
|
3037
|
+
return p(), x(n, Ve(rt(e.$attrs)), null, 16);
|
|
3032
3038
|
}
|
|
3033
3039
|
const ht = /* @__PURE__ */ Dt(qu, [["render", Lu]]), Ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3034
3040
|
__proto__: null,
|
|
@@ -3044,7 +3050,7 @@ const ht = /* @__PURE__ */ Dt(qu, [["render", Lu]]), Ku = /* @__PURE__ */ Object
|
|
|
3044
3050
|
},
|
|
3045
3051
|
emits: ["update:model-value"],
|
|
3046
3052
|
setup(e, { emit: t }) {
|
|
3047
|
-
const
|
|
3053
|
+
const n = t, o = e, { modelValue: u } = Re(o);
|
|
3048
3054
|
function a(m) {
|
|
3049
3055
|
const f = yt(u == null ? void 0 : u.value), r = Number(f == null ? void 0 : f[m]);
|
|
3050
3056
|
return wn(r) ? r : void 0;
|
|
@@ -3057,7 +3063,7 @@ const ht = /* @__PURE__ */ Dt(qu, [["render", Lu]]), Ku = /* @__PURE__ */ Object
|
|
|
3057
3063
|
d(r, I(m.$attrs, {
|
|
3058
3064
|
style: { width: "auto" },
|
|
3059
3065
|
"model-value": l.value,
|
|
3060
|
-
"onUpdate:modelValue": f[0] || (f[0] = (h) =>
|
|
3066
|
+
"onUpdate:modelValue": f[0] || (f[0] = (h) => n("update:model-value", [h, i.value]))
|
|
3061
3067
|
}), null, 16, ["model-value"]),
|
|
3062
3068
|
f[3] || (f[3] = s("span", {
|
|
3063
3069
|
class: "arco-picker-separator",
|
|
@@ -3066,11 +3072,11 @@ const ht = /* @__PURE__ */ Dt(qu, [["render", Lu]]), Ku = /* @__PURE__ */ Object
|
|
|
3066
3072
|
d(r, I(m.$attrs, {
|
|
3067
3073
|
style: { width: "auto" },
|
|
3068
3074
|
"model-value": i.value,
|
|
3069
|
-
"onUpdate:modelValue": f[1] || (f[1] = (h) =>
|
|
3075
|
+
"onUpdate:modelValue": f[1] || (f[1] = (h) => n("update:model-value", [l.value, h]))
|
|
3070
3076
|
}), null, 16, ["model-value"])
|
|
3071
3077
|
])) : (p(), x(r, I({ key: 1 }, m.$attrs, {
|
|
3072
|
-
"model-value": Number(
|
|
3073
|
-
"onUpdate:modelValue": f[2] || (f[2] = (h) =>
|
|
3078
|
+
"model-value": Number(o.modelValue),
|
|
3079
|
+
"onUpdate:modelValue": f[2] || (f[2] = (h) => n("update:model-value", h))
|
|
3074
3080
|
}), null, 16, ["model-value"]))
|
|
3075
3081
|
]);
|
|
3076
3082
|
};
|
|
@@ -3080,8 +3086,8 @@ const ht = /* @__PURE__ */ Dt(qu, [["render", Lu]]), Ku = /* @__PURE__ */ Object
|
|
|
3080
3086
|
default: Gu
|
|
3081
3087
|
}, Symbol.toStringTag, { value: "Module" })), Qu = {};
|
|
3082
3088
|
function Yu(e, t) {
|
|
3083
|
-
const
|
|
3084
|
-
return p(), x(
|
|
3089
|
+
const n = g("a-select");
|
|
3090
|
+
return p(), x(n, I(e.$attrs, { "trigger-props": { autoFitPopupMinWidth: !0, contentClass: "arco-trigger-content-size-small" } }), null, 16);
|
|
3085
3091
|
}
|
|
3086
3092
|
const Xu = /* @__PURE__ */ Dt(Qu, [["render", Yu]]), Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3087
3093
|
__proto__: null,
|
|
@@ -3090,7 +3096,7 @@ const Xu = /* @__PURE__ */ Dt(Qu, [["render", Yu]]), Zu = /* @__PURE__ */ Object
|
|
|
3090
3096
|
function el(e) {
|
|
3091
3097
|
if (!e)
|
|
3092
3098
|
return ht;
|
|
3093
|
-
const t = Object.keys(ft).find((
|
|
3099
|
+
const t = Object.keys(ft).find((n) => String(n).toLowerCase().slice(2, -4) === e);
|
|
3094
3100
|
return t && ft[t] ? ft[t].default : ht;
|
|
3095
3101
|
}
|
|
3096
3102
|
const Gt = {
|
|
@@ -3120,9 +3126,9 @@ function tl(e) {
|
|
|
3120
3126
|
let t = null;
|
|
3121
3127
|
return typeof e == "string" && (t = Gt[e] || Gt["zh-CN"]), t || e;
|
|
3122
3128
|
}
|
|
3123
|
-
function ol(e, t,
|
|
3124
|
-
const
|
|
3125
|
-
return
|
|
3129
|
+
function ol(e, t, n) {
|
|
3130
|
+
const o = Array.isArray(n) ? n : [n], u = String(tl(e)[t]);
|
|
3131
|
+
return n ? u.replace(/{(\d+)}/g, (a, l) => o[l] || "") : u;
|
|
3126
3132
|
}
|
|
3127
3133
|
const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll = /* @__PURE__ */ J({
|
|
3128
3134
|
__name: "search",
|
|
@@ -3138,9 +3144,9 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3138
3144
|
},
|
|
3139
3145
|
emits: ["onSearch", "update:modelValue"],
|
|
3140
3146
|
setup(e, { emit: t }) {
|
|
3141
|
-
const
|
|
3147
|
+
const n = t, o = e, u = (k, _) => ol(o.locale, k, _), a = q();
|
|
3142
3148
|
function l() {
|
|
3143
|
-
return Object.assign([],
|
|
3149
|
+
return Object.assign([], o.options).map(lt);
|
|
3144
3150
|
}
|
|
3145
3151
|
function i() {
|
|
3146
3152
|
return l().filter((k) => k.show !== !1);
|
|
@@ -3151,7 +3157,7 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3151
3157
|
k[_.name] = lt(_).defaultValue;
|
|
3152
3158
|
}), k;
|
|
3153
3159
|
}
|
|
3154
|
-
const f = G(() =>
|
|
3160
|
+
const f = G(() => o.size), r = q({ ...m(), ...o.modelValue });
|
|
3155
3161
|
function h() {
|
|
3156
3162
|
return { "shaonq--search": !0, [`shaonq--search-${f.value}`]: !0 };
|
|
3157
3163
|
}
|
|
@@ -3194,7 +3200,7 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3194
3200
|
}
|
|
3195
3201
|
function L() {
|
|
3196
3202
|
const k = S();
|
|
3197
|
-
return
|
|
3203
|
+
return n("update:modelValue", k), k;
|
|
3198
3204
|
}
|
|
3199
3205
|
async function Y() {
|
|
3200
3206
|
a.value && await new Promise((_) => {
|
|
@@ -3204,7 +3210,7 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3204
3210
|
const A = (D = (O = Object.values({ ...U })) == null ? void 0 : O[0]) == null ? void 0 : D.label;
|
|
3205
3211
|
A && Mo.warning(`\u8BF7\u8F93\u5165${A}`), _(!U);
|
|
3206
3212
|
});
|
|
3207
|
-
}) &&
|
|
3213
|
+
}) && n("onSearch", L());
|
|
3208
3214
|
}
|
|
3209
3215
|
return (k, _) => {
|
|
3210
3216
|
const M = g("icon-refresh"), U = g("a-button"), A = g("a-select"), O = g("a-form-item"), D = g("icon-plus-circle"), R = g("icon-delete"), te = g("a-space"), ve = g("a-input-group"), ye = g("icon-search"), re = g("a-form");
|
|
@@ -3219,7 +3225,7 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3219
3225
|
align: "start"
|
|
3220
3226
|
}, {
|
|
3221
3227
|
default: c(() => [
|
|
3222
|
-
|
|
3228
|
+
o.readonly ? K("", !0) : (p(), x(U, {
|
|
3223
3229
|
key: 0,
|
|
3224
3230
|
type: "outline",
|
|
3225
3231
|
class: "arco-btn-light",
|
|
@@ -3251,14 +3257,14 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3251
3257
|
default: c(() => [
|
|
3252
3258
|
d(te, { size: 1 }, {
|
|
3253
3259
|
default: c(() => [
|
|
3254
|
-
|
|
3260
|
+
o.readonly ? (p(), P("div", {
|
|
3255
3261
|
key: 1,
|
|
3256
|
-
style: ie({ width:
|
|
3262
|
+
style: ie({ width: o.labelWidth })
|
|
3257
3263
|
}, X(ee.label), 5)) : (p(), x(A, {
|
|
3258
3264
|
key: 0,
|
|
3259
3265
|
"model-value": ee.name,
|
|
3260
3266
|
options: C.value,
|
|
3261
|
-
style: ie({ width:
|
|
3267
|
+
style: ie({ width: o.labelWidth }),
|
|
3262
3268
|
placeholder: u("fieldName"),
|
|
3263
3269
|
"allow-search": "",
|
|
3264
3270
|
size: f.value,
|
|
@@ -3277,7 +3283,7 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3277
3283
|
modelValue: r.value[ee.name],
|
|
3278
3284
|
"onUpdate:modelValue": (ce) => r.value[ee.name] = ce,
|
|
3279
3285
|
size: f.value,
|
|
3280
|
-
style: { width:
|
|
3286
|
+
style: { width: o.inputWidth },
|
|
3281
3287
|
autocomplete: "off",
|
|
3282
3288
|
readonly: !ee.name,
|
|
3283
3289
|
"allow-clear": ""
|
|
@@ -3288,7 +3294,7 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3288
3294
|
]),
|
|
3289
3295
|
_: 2
|
|
3290
3296
|
}, 1032, ["field", "label", "required", "rules"]),
|
|
3291
|
-
|
|
3297
|
+
o.readonly ? K("", !0) : (p(), P(ue, { key: 2 }, [
|
|
3292
3298
|
N ? (p(), x(U, {
|
|
3293
3299
|
key: 1,
|
|
3294
3300
|
type: "primary",
|
|
@@ -3326,7 +3332,7 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3326
3332
|
default: c(() => [
|
|
3327
3333
|
d(U, {
|
|
3328
3334
|
type: "primary",
|
|
3329
|
-
loading:
|
|
3335
|
+
loading: o.loading,
|
|
3330
3336
|
title: u("search"),
|
|
3331
3337
|
size: f.value,
|
|
3332
3338
|
onClick: _[4] || (_[4] = (ee) => Y())
|
|
@@ -3358,11 +3364,11 @@ const nl = { class: "u-flex u-flex--start" }, ul = { class: "u-flex__item" }, ll
|
|
|
3358
3364
|
}
|
|
3359
3365
|
});
|
|
3360
3366
|
function Ji(e, t) {
|
|
3361
|
-
const
|
|
3367
|
+
const n = typeof e == "function", o = n ? e() : e, u = q(o), a = q({});
|
|
3362
3368
|
return u.value.forEach((l) => {
|
|
3363
3369
|
l.show !== !1 && (a.value[l.name] = lt(l).defaultValue);
|
|
3364
|
-
}), t &&
|
|
3365
|
-
u.value =
|
|
3370
|
+
}), t && n && ae(t, () => {
|
|
3371
|
+
u.value = n ? e() : e;
|
|
3366
3372
|
}), [u, a];
|
|
3367
3373
|
}
|
|
3368
3374
|
const il = {
|
|
@@ -3400,7 +3406,7 @@ const il = {
|
|
|
3400
3406
|
},
|
|
3401
3407
|
emits: ["update:modelValue"],
|
|
3402
3408
|
setup(e, { emit: t }) {
|
|
3403
|
-
const
|
|
3409
|
+
const n = e, o = t, u = q();
|
|
3404
3410
|
let a;
|
|
3405
3411
|
const l = () => {
|
|
3406
3412
|
var m, f;
|
|
@@ -3421,8 +3427,8 @@ const il = {
|
|
|
3421
3427
|
};
|
|
3422
3428
|
}
|
|
3423
3429
|
return Ue(() => {
|
|
3424
|
-
u.value && !a && (a = new Ho(u.value, { modules: { toolbar: i() }, theme: "snow" }), a.root.innerHTML =
|
|
3425
|
-
|
|
3430
|
+
u.value && !a && (a = new Ho(u.value, { modules: { toolbar: i() }, theme: "snow" }), a.root.innerHTML = n.modelValue, a.on("text-change", () => {
|
|
3431
|
+
o("update:modelValue", l());
|
|
3426
3432
|
}));
|
|
3427
3433
|
}), Et(() => {
|
|
3428
3434
|
a = null;
|
|
@@ -3438,20 +3444,22 @@ const Yi = /* @__PURE__ */ J({
|
|
|
3438
3444
|
useErrData: {}
|
|
3439
3445
|
},
|
|
3440
3446
|
setup(e) {
|
|
3441
|
-
const t = e, { useErrData:
|
|
3442
|
-
return Ct(uo,
|
|
3447
|
+
const t = e, { useErrData: n } = Re(t), o = Yt({ useErrData: n });
|
|
3448
|
+
return Ct(uo, o), (u, a) => Z(u.$slots, "default");
|
|
3443
3449
|
}
|
|
3444
3450
|
});
|
|
3445
|
-
function st(e, t,
|
|
3446
|
-
const
|
|
3447
|
-
return
|
|
3448
|
-
|
|
3451
|
+
function st(e, t, n) {
|
|
3452
|
+
const o = { ...e.componentAttr };
|
|
3453
|
+
return typeof e.type != "string" && !("modelValue" in o) && (o.modelValue = (u) => {
|
|
3454
|
+
var a;
|
|
3455
|
+
return (a = u.getModel(u.model)) != null ? a : e.defaultValue;
|
|
3456
|
+
}, o.updateModelValue = (u) => (a) => u.setModel(u.model, a)), Object.entries(o).forEach(([u, a]) => {
|
|
3449
3457
|
if (typeof a == "function")
|
|
3450
3458
|
try {
|
|
3451
|
-
|
|
3459
|
+
o[u] = a(t, n);
|
|
3452
3460
|
} catch {
|
|
3453
3461
|
}
|
|
3454
|
-
}),
|
|
3462
|
+
}), o;
|
|
3455
3463
|
}
|
|
3456
3464
|
function yo(e) {
|
|
3457
3465
|
return e ? typeof e == "string" ? e.split(",") : [...e] : [];
|
|
@@ -3475,24 +3483,24 @@ const ho = /* @__PURE__ */ J({
|
|
|
3475
3483
|
grid: { default: void 0 }
|
|
3476
3484
|
},
|
|
3477
3485
|
emits: ["update:modelValue", "submit", "error"],
|
|
3478
|
-
setup(e, { expose: t, emit:
|
|
3479
|
-
const
|
|
3486
|
+
setup(e, { expose: t, emit: n }) {
|
|
3487
|
+
const o = e;
|
|
3480
3488
|
function u(A) {
|
|
3481
3489
|
const O = { ...A };
|
|
3482
|
-
return
|
|
3490
|
+
return o.config.forEach((D) => {
|
|
3483
3491
|
D.dotNotation && D.model && (O[D.model] = yo(O[D.model]));
|
|
3484
3492
|
}), O;
|
|
3485
3493
|
}
|
|
3486
3494
|
function a(A) {
|
|
3487
3495
|
const O = { ...A };
|
|
3488
|
-
return
|
|
3496
|
+
return o.config.forEach((D) => {
|
|
3489
3497
|
D.dotNotation && D.model && (O[D.model] = bo(O[D.model]));
|
|
3490
3498
|
}), O;
|
|
3491
3499
|
}
|
|
3492
|
-
const l =
|
|
3500
|
+
const l = n, i = q(), m = (A) => typeof A == "string" && ["a-input", "a-textarea"].includes(A) ? { autocomplete: "new-password" } : null;
|
|
3493
3501
|
function f(A) {
|
|
3494
3502
|
return Object.fromEntries(
|
|
3495
|
-
Object.values(
|
|
3503
|
+
Object.values(o.config).filter((O) => O.model).map((O) => {
|
|
3496
3504
|
var D;
|
|
3497
3505
|
return [O.model, A ? A(O) : (D = O.defaultValue) != null ? D : null];
|
|
3498
3506
|
})
|
|
@@ -3503,7 +3511,7 @@ const ho = /* @__PURE__ */ J({
|
|
|
3503
3511
|
var O, D;
|
|
3504
3512
|
return (D = (O = A == null ? void 0 : A.options) == null ? void 0 : O.options) != null ? D : [];
|
|
3505
3513
|
})
|
|
3506
|
-
), [E] = je(f((A) => (A == null ? void 0 : A.show) !== !1)), [w, B] = je(u({ ...f(), ...
|
|
3514
|
+
), [E] = je(f((A) => (A == null ? void 0 : A.show) !== !1)), [w, B] = je(u({ ...f(), ...o.modelValue }), i);
|
|
3507
3515
|
function $(A) {
|
|
3508
3516
|
return A.model ? E.value[A.model] : A.show !== !1;
|
|
3509
3517
|
}
|
|
@@ -3541,7 +3549,7 @@ const ho = /* @__PURE__ */ J({
|
|
|
3541
3549
|
E.value[R] = O;
|
|
3542
3550
|
});
|
|
3543
3551
|
}
|
|
3544
|
-
}, C = (A) => ({ ...b, model: A.model, ...A.events, getFormItem: () => A }), z = ({ options: A }) =>
|
|
3552
|
+
}, C = (A) => ({ ...b, model: A.model, ...A.events, getFormItem: () => A }), z = ({ options: A }) => o.disabled || !!(A != null && A.disabled), S = (A) => {
|
|
3545
3553
|
const { options: O, rules: D, name: R } = A;
|
|
3546
3554
|
return typeof D == "function" ? D({ ...A }, C(A)) : D || (O != null && O.required ? [{ required: !0, message: `\u8BF7\u8F93\u5165${R}` }] : []);
|
|
3547
3555
|
}, { setModel: L, setModelOption: Y } = b;
|
|
@@ -3549,7 +3557,7 @@ const ho = /* @__PURE__ */ J({
|
|
|
3549
3557
|
return (O) => L(A, O);
|
|
3550
3558
|
}
|
|
3551
3559
|
function _() {
|
|
3552
|
-
|
|
3560
|
+
o.config.forEach(async (A) => {
|
|
3553
3561
|
var O;
|
|
3554
3562
|
if (typeof ((O = A == null ? void 0 : A.events) == null ? void 0 : O.onMounted) == "function") {
|
|
3555
3563
|
const D = await A.events.onMounted(C(A));
|
|
@@ -3562,13 +3570,13 @@ const ho = /* @__PURE__ */ J({
|
|
|
3562
3570
|
typeof ((D = O.events) == null ? void 0 : D.onChange) == "function" && await O.events.onChange(A, C(O));
|
|
3563
3571
|
}
|
|
3564
3572
|
ae(
|
|
3565
|
-
() =>
|
|
3573
|
+
() => o.modelValue,
|
|
3566
3574
|
() => {
|
|
3567
|
-
w.value = u(
|
|
3575
|
+
w.value = u(o.modelValue);
|
|
3568
3576
|
},
|
|
3569
3577
|
{ deep: !1, immediate: !0 }
|
|
3570
3578
|
), ae(
|
|
3571
|
-
() =>
|
|
3579
|
+
() => o.config,
|
|
3572
3580
|
() => {
|
|
3573
3581
|
E.value = f((A) => (A == null ? void 0 : A.show) !== !1);
|
|
3574
3582
|
}
|
|
@@ -3600,25 +3608,25 @@ const ho = /* @__PURE__ */ J({
|
|
|
3600
3608
|
ref_key: "formRef",
|
|
3601
3609
|
ref: i,
|
|
3602
3610
|
model: F(w),
|
|
3603
|
-
"label-col-props": { flex:
|
|
3611
|
+
"label-col-props": { flex: o.labelWidth },
|
|
3604
3612
|
"label-col-style": { paddingRight: "8px" },
|
|
3605
|
-
disabled:
|
|
3606
|
-
"label-align":
|
|
3613
|
+
disabled: o.disabled,
|
|
3614
|
+
"label-align": o.labelAlign,
|
|
3607
3615
|
class: "orc-form"
|
|
3608
|
-
},
|
|
3616
|
+
}, o.formAttr, { size: "small" }), {
|
|
3609
3617
|
default: c(() => [
|
|
3610
3618
|
d(te, {
|
|
3611
|
-
gutter:
|
|
3619
|
+
gutter: o.gutter
|
|
3612
3620
|
}, {
|
|
3613
3621
|
default: c(() => [
|
|
3614
|
-
(p(!0), P(ue, null, ge(
|
|
3622
|
+
(p(!0), P(ue, null, ge(o.config, (N, ce) => {
|
|
3615
3623
|
var De, be;
|
|
3616
3624
|
return p(), P(ue, { key: ce }, [
|
|
3617
3625
|
$(N) ? (p(), x(R, I({
|
|
3618
3626
|
key: 0,
|
|
3619
3627
|
ref_for: !0
|
|
3620
|
-
},
|
|
3621
|
-
span: ((De = N.options) == null ? void 0 : De.span) ||
|
|
3628
|
+
}, o.grid, {
|
|
3629
|
+
span: ((De = N.options) == null ? void 0 : De.span) || o.span,
|
|
3622
3630
|
offset: (be = N.options) == null ? void 0 : be.offset
|
|
3623
3631
|
}), {
|
|
3624
3632
|
default: c(() => {
|
|
@@ -3633,8 +3641,8 @@ const ho = /* @__PURE__ */ J({
|
|
|
3633
3641
|
disabled: z(N),
|
|
3634
3642
|
help: (fe = N.options) == null ? void 0 : fe.help,
|
|
3635
3643
|
tooltip: (de = N.options) == null ? void 0 : de.tooltip,
|
|
3636
|
-
"label-col-flex":
|
|
3637
|
-
"asterisk-position":
|
|
3644
|
+
"label-col-flex": o.labelWidth,
|
|
3645
|
+
"asterisk-position": o.labelAlign === "right" ? "start" : "end"
|
|
3638
3646
|
}, { ref_for: !0 }, N.itemAttr), {
|
|
3639
3647
|
default: c(() => [
|
|
3640
3648
|
Z(A.$slots, N.model, I({
|
|
@@ -3675,13 +3683,13 @@ const ho = /* @__PURE__ */ J({
|
|
|
3675
3683
|
_: 3
|
|
3676
3684
|
}, 8, ["gutter"]),
|
|
3677
3685
|
Z(A.$slots, "default", { onSubmit: U }, () => [
|
|
3678
|
-
|
|
3686
|
+
o.hideSubmit ? K("", !0) : (p(), x(D, { key: 0 }, {
|
|
3679
3687
|
default: c(() => [
|
|
3680
3688
|
d(re, null, {
|
|
3681
3689
|
default: c(() => [
|
|
3682
3690
|
d(ye, {
|
|
3683
3691
|
type: "primary",
|
|
3684
|
-
loading:
|
|
3692
|
+
loading: o.loading,
|
|
3685
3693
|
onClick: O[0] || (O[0] = (N) => U())
|
|
3686
3694
|
}, {
|
|
3687
3695
|
icon: c(() => [
|
|
@@ -3721,11 +3729,11 @@ const ho = /* @__PURE__ */ J({
|
|
|
3721
3729
|
modalAttrs: {}
|
|
3722
3730
|
},
|
|
3723
3731
|
emits: ["update:modelValue", "submit", "error"],
|
|
3724
|
-
setup(e, { expose: t, emit:
|
|
3725
|
-
const
|
|
3732
|
+
setup(e, { expose: t, emit: n }) {
|
|
3733
|
+
const o = e, u = n, [a, l] = je({}), i = () => l({ visible: !0, loading: !1 }), m = () => l({ visible: !1 }), f = Po(), r = G(() => {
|
|
3726
3734
|
const B = co(f, ["class", "style"]);
|
|
3727
|
-
return
|
|
3728
|
-
}), h = G(() => ro(
|
|
3735
|
+
return o.isView ? B : { ...B, disabled: o.disabled, type: "primary", size: o.size, ...o.buttonAttrs, onClick: i };
|
|
3736
|
+
}), h = G(() => ro(o, ["buttonAttrs", "modalAttrs", "title"])), E = q();
|
|
3729
3737
|
async function w() {
|
|
3730
3738
|
const [B, $] = await E.value.onSubmit();
|
|
3731
3739
|
B || u("submit", {
|
|
@@ -3746,31 +3754,31 @@ const ho = /* @__PURE__ */ J({
|
|
|
3746
3754
|
onSubmit: w
|
|
3747
3755
|
}), (B, $) => {
|
|
3748
3756
|
const y = g("a-button"), v = g("a-modal");
|
|
3749
|
-
return p(), x(ke(
|
|
3757
|
+
return p(), x(ke(o.isView ? "div" : F(Io)), Ve(rt(r.value)), at({
|
|
3750
3758
|
default: c(() => [
|
|
3751
3759
|
Z(B.$slots, "default", {
|
|
3752
3760
|
onSubmit: w,
|
|
3753
3761
|
onShow: i
|
|
3754
3762
|
}, () => [
|
|
3755
|
-
T(X(
|
|
3763
|
+
T(X(o.title), 1)
|
|
3756
3764
|
]),
|
|
3757
3765
|
(p(), x(eo, { to: "body" }, [
|
|
3758
3766
|
d(v, I({
|
|
3759
3767
|
visible: F(a).visible,
|
|
3760
|
-
title:
|
|
3768
|
+
title: o.title,
|
|
3761
3769
|
"title-align": "start",
|
|
3762
3770
|
"mask-closable": !1,
|
|
3763
3771
|
class: "orc-form--modal",
|
|
3764
3772
|
"body-style": { minHeight: "280px" },
|
|
3765
3773
|
"unmount-on-close": ""
|
|
3766
|
-
},
|
|
3774
|
+
}, o.modalAttrs, { onCancel: m }), {
|
|
3767
3775
|
footer: c(() => [
|
|
3768
3776
|
Z(B.$slots, "footer", {
|
|
3769
3777
|
onShow: i,
|
|
3770
3778
|
onHide: m
|
|
3771
3779
|
}, () => [
|
|
3772
3780
|
d(y, {
|
|
3773
|
-
size:
|
|
3781
|
+
size: o.size,
|
|
3774
3782
|
onClick: m
|
|
3775
3783
|
}, {
|
|
3776
3784
|
default: c(() => $[2] || ($[2] = [
|
|
@@ -3781,7 +3789,7 @@ const ho = /* @__PURE__ */ J({
|
|
|
3781
3789
|
}, 8, ["size"]),
|
|
3782
3790
|
d(y, {
|
|
3783
3791
|
type: "primary",
|
|
3784
|
-
size:
|
|
3792
|
+
size: o.size,
|
|
3785
3793
|
loading: F(a).loading,
|
|
3786
3794
|
onClick: w
|
|
3787
3795
|
}, {
|
|
@@ -3815,7 +3823,7 @@ const ho = /* @__PURE__ */ J({
|
|
|
3815
3823
|
]),
|
|
3816
3824
|
_: 2
|
|
3817
3825
|
}, [
|
|
3818
|
-
!
|
|
3826
|
+
!o.isView && B.$slots.icon ? {
|
|
3819
3827
|
name: "icon",
|
|
3820
3828
|
fn: c(() => [
|
|
3821
3829
|
Z(B.$slots, "icon")
|
|
@@ -3828,7 +3836,7 @@ const ho = /* @__PURE__ */ J({
|
|
|
3828
3836
|
}), al = /* @__PURE__ */ J({
|
|
3829
3837
|
__name: "space",
|
|
3830
3838
|
setup(e) {
|
|
3831
|
-
return Ct(Rt, { ...Ft(Rt), error: !1 }), (t,
|
|
3839
|
+
return Ct(Rt, { ...Ft(Rt), error: !1 }), (t, n) => (p(), P("div", null, [
|
|
3832
3840
|
Z(t.$slots, "default")
|
|
3833
3841
|
]));
|
|
3834
3842
|
}
|
|
@@ -3850,30 +3858,30 @@ const ho = /* @__PURE__ */ J({
|
|
|
3850
3858
|
emits: ["reset", "cellClick", "update:selectedKeys"],
|
|
3851
3859
|
setup(e, { emit: t }) {
|
|
3852
3860
|
var $;
|
|
3853
|
-
const
|
|
3861
|
+
const n = e, o = t, u = Xe(($ = n.selectedKeys) != null ? $ : []), a = Xe([]);
|
|
3854
3862
|
function l() {
|
|
3855
3863
|
var y;
|
|
3856
|
-
return (y =
|
|
3864
|
+
return (y = n.options) != null ? y : [];
|
|
3857
3865
|
}
|
|
3858
3866
|
function i() {
|
|
3859
3867
|
l().forEach(async (y) => {
|
|
3860
3868
|
var v;
|
|
3861
3869
|
if (typeof ((v = y == null ? void 0 : y.events) == null ? void 0 : v.onMounted) == "function") {
|
|
3862
|
-
const b = await y.events.onMounted(
|
|
3870
|
+
const b = await y.events.onMounted(n.utils);
|
|
3863
3871
|
b && y.model && (a.value = b);
|
|
3864
3872
|
}
|
|
3865
3873
|
});
|
|
3866
3874
|
}
|
|
3867
3875
|
function m() {
|
|
3868
3876
|
var y;
|
|
3869
|
-
return (y =
|
|
3877
|
+
return (y = n.modelValue) != null ? y : [];
|
|
3870
3878
|
}
|
|
3871
3879
|
function f(y) {
|
|
3872
|
-
typeof
|
|
3880
|
+
typeof n.updateModelValue == "function" && n.updateModelValue(y);
|
|
3873
3881
|
}
|
|
3874
3882
|
const r = (y) => {
|
|
3875
3883
|
var v;
|
|
3876
|
-
return
|
|
3884
|
+
return n.disabled || !!((v = y == null ? void 0 : y.options) != null && v.disabled);
|
|
3877
3885
|
}, h = () => {
|
|
3878
3886
|
const y = l().reduce((b, C) => {
|
|
3879
3887
|
var z;
|
|
@@ -3882,11 +3890,11 @@ const ho = /* @__PURE__ */ J({
|
|
|
3882
3890
|
v.push(y), f(v);
|
|
3883
3891
|
}, E = () => {
|
|
3884
3892
|
const y = "_X_ROW_KEY", v = m();
|
|
3885
|
-
f([...v].filter((b) => !u.value.includes(b[y]))), u.value = [],
|
|
3893
|
+
f([...v].filter((b) => !u.value.includes(b[y]))), u.value = [], o("update:selectedKeys", u.value);
|
|
3886
3894
|
};
|
|
3887
3895
|
async function w(y, v) {
|
|
3888
3896
|
var b;
|
|
3889
|
-
typeof ((b = v.events) == null ? void 0 : b.onChange) == "function" && await v.events.onChange(y,
|
|
3897
|
+
typeof ((b = v.events) == null ? void 0 : b.onChange) == "function" && await v.events.onChange(y, n.utils);
|
|
3890
3898
|
}
|
|
3891
3899
|
async function B(y, v, b) {
|
|
3892
3900
|
if (v) {
|
|
@@ -3905,35 +3913,35 @@ const ho = /* @__PURE__ */ J({
|
|
|
3905
3913
|
"selected-keys": u.value,
|
|
3906
3914
|
"onUpdate:selectedKeys": [
|
|
3907
3915
|
v[2] || (v[2] = (S) => u.value = S),
|
|
3908
|
-
v[5] || (v[5] = (S) =>
|
|
3916
|
+
v[5] || (v[5] = (S) => o("update:selectedKeys", S))
|
|
3909
3917
|
],
|
|
3910
3918
|
class: "orc-vxe--static",
|
|
3911
3919
|
data: m(),
|
|
3912
|
-
height:
|
|
3920
|
+
height: n.height,
|
|
3913
3921
|
option: {
|
|
3914
|
-
rowKey:
|
|
3922
|
+
rowKey: n.rowKey,
|
|
3915
3923
|
scrollX: { enabled: !0 },
|
|
3916
3924
|
scrollY: { enabled: !0 },
|
|
3917
3925
|
columns: [],
|
|
3918
|
-
...
|
|
3926
|
+
...n.tableOptions
|
|
3919
3927
|
},
|
|
3920
3928
|
"hide-setting": "",
|
|
3921
3929
|
"hide-pagination": "",
|
|
3922
|
-
onCellClick: v[3] || (v[3] = (S) =>
|
|
3923
|
-
onOnReset: v[4] || (v[4] = (S) =>
|
|
3930
|
+
onCellClick: v[3] || (v[3] = (S) => o("cellClick", S)),
|
|
3931
|
+
onOnReset: v[4] || (v[4] = (S) => o("reset"))
|
|
3924
3932
|
}, {
|
|
3925
3933
|
columns: c(() => [
|
|
3926
|
-
|
|
3934
|
+
n.hideTools !== !0 ? (p(), x(z, {
|
|
3927
3935
|
key: 0,
|
|
3928
3936
|
type: "checkbox",
|
|
3929
3937
|
width: "28"
|
|
3930
3938
|
})) : K("", !0),
|
|
3931
|
-
|
|
3939
|
+
n.hideSeq !== !0 ? (p(), x(z, {
|
|
3932
3940
|
key: 1,
|
|
3933
3941
|
type: "seq",
|
|
3934
3942
|
title: "\u5E8F",
|
|
3935
3943
|
width: "28",
|
|
3936
|
-
align:
|
|
3944
|
+
align: n.hideTools === !0 ? "center" : "left",
|
|
3937
3945
|
"show-overflow": ""
|
|
3938
3946
|
}, null, 8, ["align"])) : K("", !0),
|
|
3939
3947
|
(p(!0), P(ue, null, ge(l(), (S, L) => {
|
|
@@ -3958,12 +3966,12 @@ const ho = /* @__PURE__ */ J({
|
|
|
3958
3966
|
!S.type && S.model ? (p(), P("span", I({
|
|
3959
3967
|
key: 0,
|
|
3960
3968
|
ref_for: !0
|
|
3961
|
-
}, F(st)(S,
|
|
3969
|
+
}, F(st)(S, n.utils, k)), X(typeof S.format == "function" ? S.format(k.row[S.model], k.row) : k.row[S.model]), 17)) : (p(), x(ke(S.type), I({
|
|
3962
3970
|
key: 1,
|
|
3963
3971
|
size: "mini"
|
|
3964
3972
|
}, { ref_for: !0 }, {
|
|
3965
3973
|
...S.model ? { "model-value": k.row[S.model], options: a.value } : {},
|
|
3966
|
-
...F(st)(S,
|
|
3974
|
+
...F(st)(S, n.utils, k)
|
|
3967
3975
|
}, {
|
|
3968
3976
|
disabled: r(S),
|
|
3969
3977
|
"onUpdate:modelValue": (_) => B(k, S.model, _)
|
|
@@ -3983,7 +3991,7 @@ const ho = /* @__PURE__ */ J({
|
|
|
3983
3991
|
default: c(() => [
|
|
3984
3992
|
d(C, { size: "mini" }, {
|
|
3985
3993
|
default: c(() => [
|
|
3986
|
-
|
|
3994
|
+
n.hideTools !== !0 ? Z(y.$slots, "default", { key: 0 }, () => [
|
|
3987
3995
|
d(b, {
|
|
3988
3996
|
disabled: r(),
|
|
3989
3997
|
onClick: v[0] || (v[0] = (S) => h())
|
|
@@ -4034,16 +4042,16 @@ const dl = /* @__PURE__ */ J({
|
|
|
4034
4042
|
},
|
|
4035
4043
|
emits: ["update:modelValue", "change"],
|
|
4036
4044
|
setup(e, { emit: t }) {
|
|
4037
|
-
const
|
|
4045
|
+
const n = e, { mergedDisabled: o, eventHandlers: u } = Wo(), a = G(() => {
|
|
4038
4046
|
var b;
|
|
4039
|
-
return (b =
|
|
4047
|
+
return (b = n.disabled) != null ? b : o.value;
|
|
4040
4048
|
}), l = t, [i, m] = je({ visible: !1, keyword: "" });
|
|
4041
4049
|
function f() {
|
|
4042
4050
|
a.value || m({ visible: !0 });
|
|
4043
4051
|
}
|
|
4044
|
-
const r = () => m({ visible: !1 }), { tableRef: h, selectedKeys: E, tableOptions: w } = yn(
|
|
4052
|
+
const r = () => m({ visible: !1 }), { tableRef: h, selectedKeys: E, tableOptions: w } = yn(n.options);
|
|
4045
4053
|
function B(b) {
|
|
4046
|
-
const C = { [
|
|
4054
|
+
const C = { [n.keyword]: i.value.keyword, page: b };
|
|
4047
4055
|
return typeof (w == null ? void 0 : w.resolvePage) == "function" && w.resolvePage(C) ? w.resolvePage(C) : C;
|
|
4048
4056
|
}
|
|
4049
4057
|
function $() {
|
|
@@ -4054,25 +4062,25 @@ const dl = /* @__PURE__ */ J({
|
|
|
4054
4062
|
var S, L;
|
|
4055
4063
|
const C = b.map((Y) => {
|
|
4056
4064
|
var k;
|
|
4057
|
-
return Y[(k =
|
|
4065
|
+
return Y[(k = n.nameKey) != null ? k : "name"];
|
|
4058
4066
|
}), z = bo(C);
|
|
4059
4067
|
l("update:modelValue", z), l("change", { name: z, data: [...b] }), (L = (S = u.value) == null ? void 0 : S.onChange) == null || L.call(S), r();
|
|
4060
4068
|
}
|
|
4061
4069
|
function v({ row: b }) {
|
|
4062
|
-
|
|
4070
|
+
n.options.selectedType === "radio" && y([b]);
|
|
4063
4071
|
}
|
|
4064
4072
|
return (b, C) => {
|
|
4065
4073
|
const z = g("a-input-search"), S = g("a-button");
|
|
4066
4074
|
return p(), x(al, null, {
|
|
4067
4075
|
default: c(() => [
|
|
4068
4076
|
Z(b.$slots, "default", {
|
|
4069
|
-
value:
|
|
4077
|
+
value: n.modelValue,
|
|
4070
4078
|
disabled: a.value,
|
|
4071
4079
|
onShow: f
|
|
4072
4080
|
}, () => [
|
|
4073
4081
|
d(z, {
|
|
4074
|
-
size:
|
|
4075
|
-
"model-value":
|
|
4082
|
+
size: n.size,
|
|
4083
|
+
"model-value": n.modelValue,
|
|
4076
4084
|
readonly: "",
|
|
4077
4085
|
style: { cursor: "pointer" },
|
|
4078
4086
|
onClick: f
|
|
@@ -4084,18 +4092,18 @@ const dl = /* @__PURE__ */ J({
|
|
|
4084
4092
|
title: b.title,
|
|
4085
4093
|
"title-align": "start",
|
|
4086
4094
|
"mask-closable": !1,
|
|
4087
|
-
size:
|
|
4095
|
+
size: n.size,
|
|
4088
4096
|
"body-style": { padding: "0 0 12px 0" },
|
|
4089
4097
|
width: 750,
|
|
4090
4098
|
footer: !0,
|
|
4091
4099
|
"unmount-on-close": ""
|
|
4092
|
-
},
|
|
4100
|
+
}, n.modalAttrs, {
|
|
4093
4101
|
onCancel: r,
|
|
4094
4102
|
onClose: r
|
|
4095
4103
|
}), {
|
|
4096
4104
|
footer: c(() => [
|
|
4097
4105
|
d(S, {
|
|
4098
|
-
size:
|
|
4106
|
+
size: n.size,
|
|
4099
4107
|
onClick: C[2] || (C[2] = (L) => r())
|
|
4100
4108
|
}, {
|
|
4101
4109
|
default: c(() => C[4] || (C[4] = [
|
|
@@ -4106,7 +4114,7 @@ const dl = /* @__PURE__ */ J({
|
|
|
4106
4114
|
}, 8, ["size"]),
|
|
4107
4115
|
d(S, {
|
|
4108
4116
|
type: "primary",
|
|
4109
|
-
size:
|
|
4117
|
+
size: n.size,
|
|
4110
4118
|
disabled: !F(E).length,
|
|
4111
4119
|
onClick: C[3] || (C[3] = (L) => y(F(h).getSelection()))
|
|
4112
4120
|
}, {
|
|
@@ -4125,23 +4133,23 @@ const dl = /* @__PURE__ */ J({
|
|
|
4125
4133
|
ref: h,
|
|
4126
4134
|
"selected-keys": F(E),
|
|
4127
4135
|
"onUpdate:selectedKeys": C[1] || (C[1] = (Y) => At(E) ? E.value = Y : null),
|
|
4128
|
-
data: (L =
|
|
4136
|
+
data: (L = n.tableData) != null ? L : [],
|
|
4129
4137
|
"hide-setting": "",
|
|
4130
4138
|
option: { ...F(w), resolvePage: B },
|
|
4131
4139
|
height: 330,
|
|
4132
|
-
size:
|
|
4133
|
-
"hide-pagination": !
|
|
4134
|
-
},
|
|
4140
|
+
size: n.size,
|
|
4141
|
+
"hide-pagination": !n.pagination
|
|
4142
|
+
}, n.tableAttrs, { onCellDblclick: v }), {
|
|
4135
4143
|
default: c(() => [
|
|
4136
|
-
|
|
4144
|
+
n.pagination ? (p(), x(z, I({
|
|
4137
4145
|
key: 0,
|
|
4138
4146
|
modelValue: F(i).keyword,
|
|
4139
4147
|
"onUpdate:modelValue": C[0] || (C[0] = (Y) => F(i).keyword = Y),
|
|
4140
4148
|
style: { width: "192px" },
|
|
4141
4149
|
placeholder: "\u6A21\u7CCA\u641C\u7D22",
|
|
4142
4150
|
"allow-clear": "",
|
|
4143
|
-
size:
|
|
4144
|
-
},
|
|
4151
|
+
size: n.size
|
|
4152
|
+
}, n.inputAttrs, { onSearch: $ }), null, 16, ["modelValue", "size"])) : K("", !0)
|
|
4145
4153
|
]),
|
|
4146
4154
|
_: 1
|
|
4147
4155
|
}, 16, ["selected-keys", "data", "option", "size", "hide-pagination"])
|
|
@@ -4167,7 +4175,7 @@ const Xi = Fo(rl), Zi = Fo(dl), es = /* @__PURE__ */ J({
|
|
|
4167
4175
|
formProps: {}
|
|
4168
4176
|
},
|
|
4169
4177
|
setup(e) {
|
|
4170
|
-
return (t,
|
|
4178
|
+
return (t, n) => (p(), P("div", {
|
|
4171
4179
|
style: ie(t.isShow ? { display: "block" } : { position: "absolute", clip: "rect(0px, 0px, 0px, 0px)", height: "0px", overflow: "auto" })
|
|
4172
4180
|
}, [
|
|
4173
4181
|
s("div", I({
|
|
@@ -4370,9 +4378,9 @@ const Xi = Fo(rl), Zi = Fo(dl), es = /* @__PURE__ */ J({
|
|
|
4370
4378
|
}
|
|
4371
4379
|
}, cl = "//at.alicdn.com/t/c/font_4872361_n3qs21vht0f.js";
|
|
4372
4380
|
function Eo(e) {
|
|
4373
|
-
var
|
|
4381
|
+
var n;
|
|
4374
4382
|
const t = "icon-danhangshuru";
|
|
4375
|
-
return ((
|
|
4383
|
+
return ((n = [
|
|
4376
4384
|
{ tid: "text", type: t },
|
|
4377
4385
|
{ tid: "number", type: "icon-shuzishuru" },
|
|
4378
4386
|
{ tid: "table", type: "icon-24gl-table" },
|
|
@@ -4385,7 +4393,7 @@ function Eo(e) {
|
|
|
4385
4393
|
{ tid: "barcode", type: "icon-bar-code" },
|
|
4386
4394
|
{ tid: "qrcode", type: "icon-qrcode" },
|
|
4387
4395
|
{ tid: "object", type: "icon-qrcode" }
|
|
4388
|
-
].find((
|
|
4396
|
+
].find((o) => o.tid === e)) == null ? void 0 : n.type) || t;
|
|
4389
4397
|
}
|
|
4390
4398
|
const pl = () => new Promise((e) => {
|
|
4391
4399
|
const t = Uo.addFromIconFontCn({ src: `https:${cl}` });
|
|
@@ -4397,15 +4405,15 @@ const pl = () => new Promise((e) => {
|
|
|
4397
4405
|
__name: "card",
|
|
4398
4406
|
props: { title: String, isFirst: Boolean, show: { type: Boolean, default: !0 } },
|
|
4399
4407
|
setup(e) {
|
|
4400
|
-
const t = e,
|
|
4401
|
-
|
|
4408
|
+
const t = e, n = Xt(t.show), o = () => {
|
|
4409
|
+
n.value = !n.value;
|
|
4402
4410
|
};
|
|
4403
4411
|
return (u, a) => {
|
|
4404
4412
|
const l = g("icon-down"), i = g("icon-right");
|
|
4405
4413
|
return p(), P("div", fl, [
|
|
4406
4414
|
s("div", {
|
|
4407
4415
|
class: "u-card__hd u-aside__hd",
|
|
4408
|
-
style: ie([{ borderBottomWidth:
|
|
4416
|
+
style: ie([{ borderBottomWidth: n.value ? "0px" : "1px" }, { height: "36px", "line-height": "36px", "border-bottom-color": "var(--color-neutral-2)" }])
|
|
4409
4417
|
}, [
|
|
4410
4418
|
s("div", null, [
|
|
4411
4419
|
Z(u.$slots, "title", {}, () => [
|
|
@@ -4414,9 +4422,9 @@ const pl = () => new Promise((e) => {
|
|
|
4414
4422
|
]),
|
|
4415
4423
|
s("span", {
|
|
4416
4424
|
style: { cursor: "pointer" },
|
|
4417
|
-
onClick: a[0] || (a[0] = (m) =>
|
|
4425
|
+
onClick: a[0] || (a[0] = (m) => o())
|
|
4418
4426
|
}, [
|
|
4419
|
-
|
|
4427
|
+
n.value ? (p(), x(l, { key: 0 })) : (p(), x(i, { key: 1 }))
|
|
4420
4428
|
])
|
|
4421
4429
|
], 4),
|
|
4422
4430
|
d(Zt, null, {
|
|
@@ -4424,7 +4432,7 @@ const pl = () => new Promise((e) => {
|
|
|
4424
4432
|
to(s("div", ml, [
|
|
4425
4433
|
Z(u.$slots, "default")
|
|
4426
4434
|
], 512), [
|
|
4427
|
-
[oo,
|
|
4435
|
+
[oo, n.value]
|
|
4428
4436
|
])
|
|
4429
4437
|
]),
|
|
4430
4438
|
_: 3
|
|
@@ -4443,14 +4451,14 @@ const pl = () => new Promise((e) => {
|
|
|
4443
4451
|
topOffset: { default: -24 }
|
|
4444
4452
|
},
|
|
4445
4453
|
setup(e, { expose: t }) {
|
|
4446
|
-
const
|
|
4454
|
+
const n = e, o = n.mainContainer;
|
|
4447
4455
|
let u = null, a = null;
|
|
4448
4456
|
function l() {
|
|
4449
4457
|
u == null || u.destroy(), a == null || a.destroy(), u = null, a = null;
|
|
4450
4458
|
}
|
|
4451
4459
|
const i = Qe.debounce(f, 1e3 / 30);
|
|
4452
4460
|
function m() {
|
|
4453
|
-
if (!
|
|
4461
|
+
if (!n.show) {
|
|
4454
4462
|
l();
|
|
4455
4463
|
return;
|
|
4456
4464
|
}
|
|
@@ -4460,7 +4468,7 @@ const pl = () => new Promise((e) => {
|
|
|
4460
4468
|
textColor: "#999999",
|
|
4461
4469
|
displayDragPos: !0,
|
|
4462
4470
|
dragPosFormat: (E) => `${E}px`
|
|
4463
|
-
}, h = document.querySelector(
|
|
4471
|
+
}, h = document.querySelector(o);
|
|
4464
4472
|
!h || (u = new Tt(h, {
|
|
4465
4473
|
...r,
|
|
4466
4474
|
type: "horizontal",
|
|
@@ -4476,24 +4484,24 @@ const pl = () => new Promise((e) => {
|
|
|
4476
4484
|
function f() {
|
|
4477
4485
|
var r, h, E, w, B, $;
|
|
4478
4486
|
if (u && a) {
|
|
4479
|
-
const y = Math.min(2, Math.max(0.5,
|
|
4487
|
+
const y = Math.min(2, Math.max(0.5, n.zoom * 1));
|
|
4480
4488
|
u.zoom = y, a.zoom = y;
|
|
4481
4489
|
let v = 50;
|
|
4482
|
-
if (y > 1.2 && (v = 25), y < 0.8 && (v = 100), u.unit = v, a.unit = v, u && a &&
|
|
4483
|
-
const b = document.querySelector(
|
|
4490
|
+
if (y > 1.2 && (v = 25), y < 0.8 && (v = 100), u.unit = v, a.unit = v, u && a && n.warpContainer) {
|
|
4491
|
+
const b = document.querySelector(n.warpContainer);
|
|
4484
4492
|
if (!b)
|
|
4485
4493
|
return;
|
|
4486
|
-
const C =
|
|
4494
|
+
const C = n.leftOffset + ((r = b == null ? void 0 : b.offsetLeft) != null ? r : 0) - ((h = b.scrollLeft) != null ? h : 0), z = n.topOffset + ((E = b == null ? void 0 : b.offsetTop) != null ? E : 0) - ((w = b.scrollTop) != null ? w : 0);
|
|
4487
4495
|
u.scroll(-C / y), u.scrollGuides(-z / y), a.scroll(-z / y);
|
|
4488
|
-
const S = ($ = (B = document.querySelector(`${
|
|
4496
|
+
const S = ($ = (B = document.querySelector(`${o} .${a.className}`)) == null ? void 0 : B.clientWidth) != null ? $ : 30;
|
|
4489
4497
|
a.scrollGuides(-(C - S) / y);
|
|
4490
4498
|
}
|
|
4491
4499
|
}
|
|
4492
4500
|
}
|
|
4493
|
-
return ae(() =>
|
|
4494
|
-
m(), window.addEventListener("resize", i, !1), We(
|
|
4501
|
+
return ae(() => n.show, m), ae(() => n.zoom, i), Ue(() => {
|
|
4502
|
+
m(), window.addEventListener("resize", i, !1), We(n.warpContainer).on("scroll", i);
|
|
4495
4503
|
}), Et(() => {
|
|
4496
|
-
window.removeEventListener("resize", i, !1), We(
|
|
4504
|
+
window.removeEventListener("resize", i, !1), We(n.warpContainer).off("scroll", i);
|
|
4497
4505
|
}), t({ onResize: i }), (r, h) => (p(), P("div"));
|
|
4498
4506
|
}
|
|
4499
4507
|
});
|
|
@@ -4503,11 +4511,11 @@ const gl = {
|
|
|
4503
4511
|
}, vl = /* @__PURE__ */ J({
|
|
4504
4512
|
__name: "preview",
|
|
4505
4513
|
setup(e, { expose: t }) {
|
|
4506
|
-
const
|
|
4507
|
-
|
|
4514
|
+
const n = q(!1), o = q(!0), u = q(!1), a = q(0), l = q({}), i = q({}), m = () => {
|
|
4515
|
+
n.value = !1;
|
|
4508
4516
|
}, f = (E, w, B = "210") => {
|
|
4509
|
-
|
|
4510
|
-
We("#preview_content_design").html(E.getHtml(w)),
|
|
4517
|
+
n.value = !0, o.value = !0, a.value = E.editingPanel ? E.editingPanel.width : Number(B), l.value = E, i.value = w, setTimeout(() => {
|
|
4518
|
+
We("#preview_content_design").html(E.getHtml(w)), o.value = !1;
|
|
4511
4519
|
}, 500);
|
|
4512
4520
|
}, r = () => {
|
|
4513
4521
|
var E;
|
|
@@ -4528,7 +4536,7 @@ const gl = {
|
|
|
4528
4536
|
const B = g("a-spin"), $ = g("icon-printer"), y = g("a-button"), v = g("icon-download"), b = g("ASpace"), C = g("AModal");
|
|
4529
4537
|
return p(), x(C, {
|
|
4530
4538
|
title: "\u6253\u5370\u9884\u89C8",
|
|
4531
|
-
visible:
|
|
4539
|
+
visible: n.value,
|
|
4532
4540
|
"body-style": { padding: 0, height: "100%" },
|
|
4533
4541
|
"mask-closable": !1,
|
|
4534
4542
|
width: Math.max(a.value, 210) + "mm",
|
|
@@ -4595,7 +4603,7 @@ const gl = {
|
|
|
4595
4603
|
default: c(() => [
|
|
4596
4604
|
d(B, {
|
|
4597
4605
|
class: "u-main",
|
|
4598
|
-
loading:
|
|
4606
|
+
loading: o.value,
|
|
4599
4607
|
style: { width: "100%", "min-height": "100%", display: "block" }
|
|
4600
4608
|
}, {
|
|
4601
4609
|
default: c(() => [
|
|
@@ -4618,19 +4626,19 @@ const gl = {
|
|
|
4618
4626
|
}, hl = { class: "u-flex__item" }, Fl = { style: { color: "var(--color-border-4)" } }, El = /* @__PURE__ */ J({
|
|
4619
4627
|
__name: "kbd",
|
|
4620
4628
|
setup(e, { expose: t }) {
|
|
4621
|
-
const
|
|
4622
|
-
|
|
4629
|
+
const n = q(!1), o = q(210), u = q({}), a = q({}), { version: l } = Te, i = () => {
|
|
4630
|
+
n.value = !1;
|
|
4623
4631
|
};
|
|
4624
4632
|
return t({ show: (f, r) => {
|
|
4625
|
-
|
|
4633
|
+
n.value = !0, u.value = f, a.value = r;
|
|
4626
4634
|
}, hideModal: i }), (f, r) => {
|
|
4627
4635
|
const h = g("icon-lock"), E = g("icon-to-top"), w = g("icon-to-bottom"), B = g("ACard"), $ = g("a-spin"), y = g("a-button"), v = g("AModal");
|
|
4628
4636
|
return p(), x(v, {
|
|
4629
4637
|
title: "\u5E2E\u52A9\u6587\u6863",
|
|
4630
|
-
visible:
|
|
4638
|
+
visible: n.value,
|
|
4631
4639
|
"body-style": { padding: 0, height: "100%" },
|
|
4632
4640
|
"mask-closable": !1,
|
|
4633
|
-
width: Math.max(
|
|
4641
|
+
width: Math.max(o.value, 210) + "mm",
|
|
4634
4642
|
footer: !1,
|
|
4635
4643
|
fullscreen: "",
|
|
4636
4644
|
onCancel: i
|
|
@@ -4664,7 +4672,7 @@ const gl = {
|
|
|
4664
4672
|
}, {
|
|
4665
4673
|
default: c(() => [
|
|
4666
4674
|
s("div", {
|
|
4667
|
-
style: ie([{ width:
|
|
4675
|
+
style: ie([{ width: o.value + "mm", overflow: "hidden" }, { margin: "0 auto" }])
|
|
4668
4676
|
}, [
|
|
4669
4677
|
d(B, null, {
|
|
4670
4678
|
default: c(() => [
|
|
@@ -4942,56 +4950,56 @@ function Cl(e) {
|
|
|
4942
4950
|
clearPaper() {
|
|
4943
4951
|
try {
|
|
4944
4952
|
e == null || e.clear();
|
|
4945
|
-
} catch (
|
|
4946
|
-
console.error("Failed to clear paper:",
|
|
4953
|
+
} catch (n) {
|
|
4954
|
+
console.error("Failed to clear paper:", n);
|
|
4947
4955
|
}
|
|
4948
4956
|
},
|
|
4949
|
-
toPdf(
|
|
4950
|
-
e == null || e.toPdf(
|
|
4957
|
+
toPdf(n, o = "\u5BFC\u51FAPDF") {
|
|
4958
|
+
e == null || e.toPdf(n, o);
|
|
4951
4959
|
},
|
|
4952
|
-
toPrint(
|
|
4953
|
-
e == null || e.print(
|
|
4960
|
+
toPrint(n) {
|
|
4961
|
+
e == null || e.print(n);
|
|
4954
4962
|
},
|
|
4955
|
-
updateJson(
|
|
4963
|
+
updateJson(n) {
|
|
4956
4964
|
if (e)
|
|
4957
4965
|
try {
|
|
4958
|
-
e.update(JSON.parse(
|
|
4959
|
-
} catch (
|
|
4960
|
-
console.error("Failed to update template with JSON:",
|
|
4966
|
+
e.update(JSON.parse(n));
|
|
4967
|
+
} catch (o) {
|
|
4968
|
+
console.error("Failed to update template with JSON:", o);
|
|
4961
4969
|
}
|
|
4962
4970
|
},
|
|
4963
4971
|
exportJson() {
|
|
4964
4972
|
return e ? JSON.stringify(e.getJson() || {}) : "";
|
|
4965
4973
|
},
|
|
4966
|
-
setElsAlign(
|
|
4967
|
-
|
|
4974
|
+
setElsAlign(n) {
|
|
4975
|
+
n && (e == null || e.setElsAlign(n));
|
|
4968
4976
|
},
|
|
4969
|
-
setElsSpace(
|
|
4970
|
-
e == null || e.setElsSpace(
|
|
4977
|
+
setElsSpace(n = !0, o = 10) {
|
|
4978
|
+
e == null || e.setElsSpace(o, n);
|
|
4971
4979
|
},
|
|
4972
4980
|
setEleSelectByField() {
|
|
4973
4981
|
e == null || e.selectElementsByField(["name"]);
|
|
4974
4982
|
},
|
|
4975
4983
|
getSelectEls() {
|
|
4976
|
-
var
|
|
4977
|
-
return (
|
|
4984
|
+
var n;
|
|
4985
|
+
return (n = e == null ? void 0 : e.getSelectEls()) != null ? n : [];
|
|
4978
4986
|
},
|
|
4979
|
-
updateOption(
|
|
4980
|
-
e == null || e.updateOption(
|
|
4987
|
+
updateOption(n, o) {
|
|
4988
|
+
e == null || e.updateOption(n, o);
|
|
4981
4989
|
}
|
|
4982
4990
|
};
|
|
4983
4991
|
}
|
|
4984
4992
|
function Al(e, t) {
|
|
4985
4993
|
var u;
|
|
4986
|
-
const
|
|
4987
|
-
if (!e || !
|
|
4994
|
+
const n = (u = Se) == null ? void 0 : u.event;
|
|
4995
|
+
if (!e || !n || !t)
|
|
4988
4996
|
return;
|
|
4989
|
-
const
|
|
4997
|
+
const o = {
|
|
4990
4998
|
onData: `hiprintTemplateDataChanged_${e.id}`,
|
|
4991
4999
|
onSetting: `BuildCustomOptionSettingEventKey_${e.id}`,
|
|
4992
5000
|
onSelect: `PrintElementSelectEventKey_${e.id}`
|
|
4993
5001
|
};
|
|
4994
|
-
Object.keys(t).forEach((a) =>
|
|
5002
|
+
Object.keys(t).forEach((a) => n.on(o[a], t[a]));
|
|
4995
5003
|
}
|
|
4996
5004
|
const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex" }, kl = { class: "u-flex__item" }, xl = { class: "u-flex" }, Dl = { class: "u-flex" }, $l = { class: "u-flex__item" }, Sl = {
|
|
4997
5005
|
key: 0,
|
|
@@ -5033,7 +5041,7 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5033
5041
|
setZoom: {}
|
|
5034
5042
|
},
|
|
5035
5043
|
setup(e) {
|
|
5036
|
-
const t = e,
|
|
5044
|
+
const t = e, n = q(null), o = G(() => Cl(t.tpl));
|
|
5037
5045
|
function u() {
|
|
5038
5046
|
return t.tpl ? t.tpl.getSelectEls() : [];
|
|
5039
5047
|
}
|
|
@@ -5043,10 +5051,10 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5043
5051
|
modalClass: "comp-hiprint-toolbar",
|
|
5044
5052
|
bodyStyle: { padding: "12px 24px" },
|
|
5045
5053
|
unmountOnClose: !0
|
|
5046
|
-
}, l = () => u().length, i = () => Boolean(l() &&
|
|
5054
|
+
}, l = () => u().length, i = () => Boolean(l() && n.value);
|
|
5047
5055
|
function m() {
|
|
5048
5056
|
var k, _;
|
|
5049
|
-
return i() ? String((_ = (k =
|
|
5057
|
+
return i() ? String((_ = (k = n.value) == null ? void 0 : k.printElementType) == null ? void 0 : _.type) === "text" : !1;
|
|
5050
5058
|
}
|
|
5051
5059
|
function f(k = !1) {
|
|
5052
5060
|
var M, U, A, O, D, R, te, ve, ye;
|
|
@@ -5062,23 +5070,23 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5062
5070
|
const r = () => {
|
|
5063
5071
|
const k = u();
|
|
5064
5072
|
if (!k.length) {
|
|
5065
|
-
|
|
5073
|
+
n.value = null;
|
|
5066
5074
|
return;
|
|
5067
5075
|
}
|
|
5068
|
-
|
|
5076
|
+
n.value = k.find((_) => _.id === t.selectedId) || k[k.length - 1] || null;
|
|
5069
5077
|
};
|
|
5070
5078
|
function h(k, _, M = !0) {
|
|
5071
|
-
|
|
5079
|
+
o.value.updateOption(k, _), M && r();
|
|
5072
5080
|
}
|
|
5073
5081
|
function E(k, _) {
|
|
5074
5082
|
var A;
|
|
5075
|
-
const M = { shape: "square", size: "small" }, U = (A =
|
|
5083
|
+
const M = { shape: "square", size: "small" }, U = (A = n.value) == null ? void 0 : A.options;
|
|
5076
5084
|
return k && U && U[k] === _ ? { ...M, style: { color: "rgb(var(--primary-6))" } } : M;
|
|
5077
5085
|
}
|
|
5078
5086
|
ae(() => t.updateTime, r);
|
|
5079
5087
|
function w() {
|
|
5080
5088
|
var _, M;
|
|
5081
|
-
const k = ((M = (_ =
|
|
5089
|
+
const k = ((M = (_ = n.value) == null ? void 0 : _.options) == null ? void 0 : M.draggable) === !1;
|
|
5082
5090
|
h("draggable", k);
|
|
5083
5091
|
}
|
|
5084
5092
|
function B() {
|
|
@@ -5140,7 +5148,7 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5140
5148
|
var M, U, A, O;
|
|
5141
5149
|
if (!m())
|
|
5142
5150
|
return;
|
|
5143
|
-
const k = (A = (U = (M =
|
|
5151
|
+
const k = (A = (U = (M = n.value) == null ? void 0 : M.options) == null ? void 0 : U.format) != null ? A : "[]";
|
|
5144
5152
|
y.value.visible = !0;
|
|
5145
5153
|
function _(D = []) {
|
|
5146
5154
|
return D.filter((R) => R.field && R.type !== "table").map((R) => {
|
|
@@ -5163,8 +5171,8 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5163
5171
|
return p(), P("div", wl, [
|
|
5164
5172
|
s("div", Bl, [
|
|
5165
5173
|
Z(k.$slots, "left", {
|
|
5166
|
-
tools:
|
|
5167
|
-
options:
|
|
5174
|
+
tools: o.value,
|
|
5175
|
+
options: n.value
|
|
5168
5176
|
})
|
|
5169
5177
|
]),
|
|
5170
5178
|
s("div", kl, [
|
|
@@ -5221,7 +5229,7 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5221
5229
|
_: 1
|
|
5222
5230
|
}, 16),
|
|
5223
5231
|
d(M, I({ title: "\u6C34\u5E73\u7B49\u5206" }, E(), {
|
|
5224
|
-
onClick: _[6] || (_[6] = (Q) =>
|
|
5232
|
+
onClick: _[6] || (_[6] = (Q) => o.value.setElsSpace(!0, f()))
|
|
5225
5233
|
}), {
|
|
5226
5234
|
icon: c(() => [
|
|
5227
5235
|
d(F(se), { type: "icon-v-lineSpacing" })
|
|
@@ -5229,7 +5237,7 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5229
5237
|
_: 1
|
|
5230
5238
|
}, 16),
|
|
5231
5239
|
d(M, I({ title: "\u5782\u76F4\u7B49\u5206" }, E(), {
|
|
5232
|
-
onClick: _[7] || (_[7] = (Q) =>
|
|
5240
|
+
onClick: _[7] || (_[7] = (Q) => o.value.setElsSpace(!1, f(!0)))
|
|
5233
5241
|
}), {
|
|
5234
5242
|
icon: c(() => [
|
|
5235
5243
|
d(F(se), { type: "icon-24gl-lineSpacing" })
|
|
@@ -5371,8 +5379,8 @@ const wl = { class: "comp-hiprint-toolbar u-flex u-w" }, Bl = { class: "u-flex"
|
|
|
5371
5379
|
]),
|
|
5372
5380
|
s("div", xl, [
|
|
5373
5381
|
Z(k.$slots, "right", {
|
|
5374
|
-
tools:
|
|
5375
|
-
options:
|
|
5382
|
+
tools: o.value,
|
|
5383
|
+
options: n.value
|
|
5376
5384
|
})
|
|
5377
5385
|
]),
|
|
5378
5386
|
d(Ce, I({
|
|
@@ -5581,14 +5589,14 @@ const Yl = { class: "comp-toolbar-ext__ul" }, Xl = ["onClick"], Zl = { class: "c
|
|
|
5581
5589
|
},
|
|
5582
5590
|
setup(e) {
|
|
5583
5591
|
const t = e;
|
|
5584
|
-
function
|
|
5592
|
+
function n() {
|
|
5585
5593
|
var i;
|
|
5586
5594
|
if (typeof ((i = t.tpl) == null ? void 0 : i.update) == "function")
|
|
5587
5595
|
return t.tpl;
|
|
5588
5596
|
throw new Error("[hi-print]: mounted error");
|
|
5589
5597
|
}
|
|
5590
|
-
const
|
|
5591
|
-
const i =
|
|
5598
|
+
const o = G(() => {
|
|
5599
|
+
const i = n();
|
|
5592
5600
|
return i.updateTime = t.updateTime, [...i.getPanel().printElements].map((m) => {
|
|
5593
5601
|
var f, r, h, E;
|
|
5594
5602
|
return {
|
|
@@ -5600,18 +5608,18 @@ const Yl = { class: "comp-toolbar-ext__ul" }, Xl = ["onClick"], Zl = { class: "c
|
|
|
5600
5608
|
};
|
|
5601
5609
|
});
|
|
5602
5610
|
}), u = G(() => {
|
|
5603
|
-
const i =
|
|
5611
|
+
const i = n();
|
|
5604
5612
|
return i.updateTime = t.updateTime, i.historyList;
|
|
5605
5613
|
});
|
|
5606
5614
|
function a(i, m) {
|
|
5607
|
-
const f =
|
|
5615
|
+
const f = n(), r = [...f.getPanel().printElements].find((E) => E.id === i.id);
|
|
5608
5616
|
if (!r)
|
|
5609
5617
|
return;
|
|
5610
5618
|
const h = r == null ? void 0 : r.designTarget;
|
|
5611
5619
|
m === "click" && f.selectElementsId(r.id), m === "mouseover" && f.hoverElementsId(r.id), m === "mouseout" && f.hoverElementsId(r.id, !0), h.focus();
|
|
5612
5620
|
}
|
|
5613
5621
|
function l(i) {
|
|
5614
|
-
|
|
5622
|
+
n().update(i.json);
|
|
5615
5623
|
}
|
|
5616
5624
|
return (i, m) => {
|
|
5617
5625
|
const f = g("icon-history"), r = g("AButton"), h = g("icon-drag-arrow"), E = g("icon-expand"), w = g("icon-file"), B = g("a-popover"), $ = g("icon-folder"), y = g("icon-lock"), v = g("AButtonGroup");
|
|
@@ -5654,7 +5662,7 @@ const Yl = { class: "comp-toolbar-ext__ul" }, Xl = ["onClick"], Zl = { class: "c
|
|
|
5654
5662
|
}, {
|
|
5655
5663
|
content: c(() => [
|
|
5656
5664
|
s("ul", Zl, [
|
|
5657
|
-
(p(!0), P(ue, null, ge(
|
|
5665
|
+
(p(!0), P(ue, null, ge(o.value, (b, C) => (p(), P("li", {
|
|
5658
5666
|
key: C,
|
|
5659
5667
|
onClick: (z) => a(b, "click"),
|
|
5660
5668
|
onMouseover: (z) => a(b, "mouseover"),
|
|
@@ -5746,11 +5754,11 @@ function Co(e) {
|
|
|
5746
5754
|
}
|
|
5747
5755
|
const Ao = "\u901A\u7528\u63A7\u4EF6", Ye = "defaultModule", oi = () => {
|
|
5748
5756
|
const e = Co(Ye);
|
|
5749
|
-
return { list: e, addElementTypes: (
|
|
5750
|
-
|
|
5757
|
+
return { list: e, addElementTypes: (n) => {
|
|
5758
|
+
n.removePrintElementTypes(Ye), n.addPrintElementTypes(Ye, [new Te.PrintElementTypeGroup(Ao, e)]);
|
|
5751
5759
|
} };
|
|
5752
5760
|
}, wo = "\u6570\u636E\u63A7\u4EF6", it = "dataModule", ni = (e) => {
|
|
5753
|
-
const t = Co(it),
|
|
5761
|
+
const t = Co(it), n = Qt(e).map((u) => {
|
|
5754
5762
|
const { field: a } = u, l = t.find((r) => r.type === u.type) || t[0], { type: i, options: m } = l, f = {
|
|
5755
5763
|
...l,
|
|
5756
5764
|
tid: `${Ye}.${a}`,
|
|
@@ -5764,9 +5772,9 @@ const Ao = "\u901A\u7528\u63A7\u4EF6", Ye = "defaultModule", oi = () => {
|
|
|
5764
5772
|
return f;
|
|
5765
5773
|
});
|
|
5766
5774
|
return {
|
|
5767
|
-
list:
|
|
5775
|
+
list: n,
|
|
5768
5776
|
addElementTypes: (u) => {
|
|
5769
|
-
u.removePrintElementTypes(it), u.addPrintElementTypes(it, [new Te.PrintElementTypeGroup(wo,
|
|
5777
|
+
u.removePrintElementTypes(it), u.addPrintElementTypes(it, [new Te.PrintElementTypeGroup(wo, n)]);
|
|
5770
5778
|
}
|
|
5771
5779
|
};
|
|
5772
5780
|
}, ui = (e) => [
|
|
@@ -5802,8 +5810,8 @@ const Ao = "\u901A\u7528\u63A7\u4EF6", Ye = "defaultModule", oi = () => {
|
|
|
5802
5810
|
printData: { default: void 0 }
|
|
5803
5811
|
},
|
|
5804
5812
|
emits: ["onSave", "onChange"],
|
|
5805
|
-
setup(e, { expose: t, emit:
|
|
5806
|
-
const
|
|
5813
|
+
setup(e, { expose: t, emit: n }) {
|
|
5814
|
+
const o = q(!0), u = q(!0), a = e, l = n, i = (D, { slots: R }) => {
|
|
5807
5815
|
var re;
|
|
5808
5816
|
const te = (re = D.tid) != null ? re : `defaultModule.${D.type}`, ve = R.default ? R.default() : "", ye = R.icon ? R.icon() : Pt(se, { type: Eo(D.type) });
|
|
5809
5817
|
return Pt("a", { class: vi, tid: te }, [ye, ve]);
|
|
@@ -5816,7 +5824,7 @@ const Ao = "\u901A\u7528\u63A7\u4EF6", Ye = "defaultModule", oi = () => {
|
|
|
5816
5824
|
u.value = !u.value, r();
|
|
5817
5825
|
}
|
|
5818
5826
|
function E() {
|
|
5819
|
-
|
|
5827
|
+
o.value = !o.value, r();
|
|
5820
5828
|
}
|
|
5821
5829
|
let w;
|
|
5822
5830
|
const B = {
|
|
@@ -6144,7 +6152,7 @@ const Ao = "\u901A\u7528\u63A7\u4EF6", Ye = "defaultModule", oi = () => {
|
|
|
6144
6152
|
]),
|
|
6145
6153
|
s("div", {
|
|
6146
6154
|
class: "u-page__panel u-card",
|
|
6147
|
-
style: ie({ width:
|
|
6155
|
+
style: ie({ width: o.value ? "219px" : "0px" })
|
|
6148
6156
|
}, [
|
|
6149
6157
|
R[17] || (R[17] = s("div", { class: "u-card__hd u-aside__hd" }, [
|
|
6150
6158
|
s("strong", { style: { "font-size": "14px" } }, "\u5C5E\u6027\u914D\u7F6E")
|
|
@@ -6164,12 +6172,12 @@ const Ao = "\u901A\u7528\u63A7\u4EF6", Ye = "defaultModule", oi = () => {
|
|
|
6164
6172
|
type: "secondary",
|
|
6165
6173
|
status: "normal",
|
|
6166
6174
|
size: "mini",
|
|
6167
|
-
style: ie([{ "z-index": "999" }, { borderRightWidth:
|
|
6175
|
+
style: ie([{ "z-index": "999" }, { borderRightWidth: o.value ? "0" : "1px" }]),
|
|
6168
6176
|
class: "arco-btn-light u-page__arrow",
|
|
6169
6177
|
onClick: R[1] || (R[1] = (be) => E())
|
|
6170
6178
|
}, {
|
|
6171
6179
|
icon: c(() => [
|
|
6172
|
-
|
|
6180
|
+
o.value ? (p(), x(ye, { key: 0 })) : (p(), x(re, { key: 1 }))
|
|
6173
6181
|
]),
|
|
6174
6182
|
_: 1
|
|
6175
6183
|
}, 8, ["style"])
|