sy-form-designer 1.0.51 → 1.0.53

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.
@@ -1,5 +1,5 @@
1
1
  import { mergeModels as Q, useModel as X, ref as a, computed as Y, onMounted as Z, provide as S, resolveComponent as n, createElementBlock as U, openBlock as _, createVNode as o, withCtx as l, createElementVNode as c, createTextVNode as s, createBlock as J, createCommentVNode as h, Fragment as ee, renderList as oe } from "vue";
2
- import le from "./settings-Dcc-2Qp-.js";
2
+ import le from "./settings-lM0nln5g.js";
3
3
  import { _ as te } from "./index-C1OyATSu.js";
4
4
  const ne = { class: "form-designer" }, ae = { class: "toolbar-container" }, de = {
5
5
  class: "right-toolbar",
@@ -1,13 +1,13 @@
1
- import { useAttrs as ae, ref as x, computed as re, inject as de, watch as I, resolveComponent as B, createElementBlock as c, openBlock as r, createElementVNode as f, createCommentVNode as h, createBlock as E, createVNode as v, mergeProps as ue, unref as y, withCtx as N, normalizeStyle as O, normalizeClass as ce, Fragment as m, renderList as fe, createTextVNode as p, toDisplayString as k, withDirectives as U, withModifiers as j, vShow as C } from "vue";
2
- import { u as he } from "./ossHook-DkzdDU5y.js";
3
- import { p as ge } from "./index-CmT4m7do.js";
1
+ import { useAttrs as se, ref as x, computed as re, inject as de, watch as I, resolveComponent as U, createElementBlock as c, openBlock as r, createElementVNode as f, createCommentVNode as h, createBlock as E, createVNode as v, mergeProps as ue, unref as y, withCtx as N, normalizeStyle as O, normalizeClass as ce, Fragment as m, renderList as fe, createTextVNode as p, toDisplayString as k, withDirectives as B, withModifiers as j, vShow as C } from "vue";
2
+ import { u as he } from "./ossHook-4u7hcaiA.js";
3
+ import { p as ge } from "./index-BO9UMJxn.js";
4
4
  import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- import { E as L } from "./index-B8Nw_06z.js";
5
+ import { E as L } from "./index-DJviRN11.js";
6
6
  const me = { class: "component-upload-image" }, pe = { style: { display: "flex", width: "100%" } }, ye = {
7
7
  key: 0,
8
8
  class: "relative rounded overflow-hidden flex justify-center items-center",
9
9
  style: { width: "120px", height: "96px", "margin-top": "8px" }
10
- }, we = { class: "absolute" }, xe = ["onClick"], ke = { class: "relative overflow-hidden flex flex-col justify-center items-center w-full h-full select-none outline-none" }, Me = ["src"], be = ["viewBox"], Be = ["transform"], Ue = ["xlink:href", "width", "height"], je = { class: "photo-operations" }, Ce = { class: "absolute top-0 right-0 w-full flex justify-end gap-1" }, Se = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, Pe = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, De = { class: "absolute bottom-0 w-full flex justify-center gap-1" }, Fe = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, ze = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, Te = ["onClick"], Ve = {
10
+ }, we = { class: "absolute" }, xe = ["onClick"], ke = { class: "relative overflow-hidden flex flex-col justify-center items-center w-full h-full select-none outline-none" }, Me = ["src"], be = ["viewBox"], Ue = ["transform"], Be = ["xlink:href", "width", "height"], je = { class: "photo-operations" }, Ce = { class: "absolute top-0 right-0 w-full flex justify-end gap-1" }, Se = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, Fe = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, Pe = { class: "absolute bottom-0 w-full flex justify-center gap-1" }, De = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, ze = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, Te = ["onClick"], Ve = {
11
11
  key: 0,
12
12
  class: "el-upload__tip"
13
13
  }, qe = { style: { color: "#f56c6c" } }, Ie = { style: { color: "#f56c6c" } }, Ee = {
@@ -40,12 +40,12 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
40
40
  },
41
41
  // 拖入回调
42
42
  onDrop: {
43
- default: (i) => {
43
+ default: (o) => {
44
44
  }
45
45
  },
46
46
  // 拖入回调
47
47
  onBackPool: {
48
- default: (i) => {
48
+ default: (o) => {
49
49
  }
50
50
  },
51
51
  // 默认背景图
@@ -85,6 +85,11 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
85
85
  type: Array,
86
86
  default: () => []
87
87
  },
88
+ // 图片处理 compress, face
89
+ endUploadFlow: {
90
+ type: Array,
91
+ default: () => []
92
+ },
88
93
  oss: {
89
94
  type: Object,
90
95
  default: () => ({
@@ -92,24 +97,25 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
92
97
  })
93
98
  }
94
99
  },
95
- setup(i, { expose: $, emit: _ }) {
96
- const u = i, A = ae(), R = _;
100
+ setup(o, { expose: $, emit: A }) {
101
+ const d = o, _ = se(), R = A;
97
102
  x(0), x([]);
98
- const a = x([]), J = re(
99
- () => u.isShowTip && (u.fileType || u.fileMaxSize)
100
- ), H = de("request"), [M, Y] = he("", a, {
103
+ const s = x([]), J = re(
104
+ () => d.isShowTip && (d.fileType || d.fileMaxSize)
105
+ ), H = de("request"), [M, Y] = he("", s, {
101
106
  request: H,
102
- fileType: u.fileType,
103
- signatureUrl: u.oss.signatureUrl,
104
- requireMd5: u.md5.requireMd5,
105
- addFileMd5Url: u.md5.addFileMd5Url,
106
- queryFileMd5Url: u.md5.queryFileMd5Url,
107
- beginUploadFlow: u.beginUploadFlow
108
- }), S = x(!1), P = x([]), G = () => {
107
+ fileType: d.fileType,
108
+ signatureUrl: d.oss.signatureUrl,
109
+ requireMd5: d.md5.requireMd5,
110
+ addFileMd5Url: d.md5.addFileMd5Url,
111
+ queryFileMd5Url: d.md5.queryFileMd5Url,
112
+ beginUploadFlow: d.beginUploadFlow,
113
+ endUploadFlow: d.endUploadFlow
114
+ }), S = x(!1), F = x([]), G = () => {
109
115
  S.value = !1;
110
116
  };
111
117
  function K() {
112
- L.error(`上传文件数量不能超过 ${u.limit} 个!`);
118
+ L.error(`上传文件数量不能超过 ${d.limit} 个!`);
113
119
  }
114
120
  function Q() {
115
121
  L.error("上传图片失败");
@@ -117,8 +123,8 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
117
123
  function W(e, l) {
118
124
  let n = "";
119
125
  l = l || ",";
120
- for (let s in e)
121
- e[s].url !== void 0 && e[s].url.indexOf("blob:") !== 0 && (n += e[s].url + l);
126
+ for (let a in e)
127
+ e[a].url !== void 0 && e[a].url.indexOf("blob:") !== 0 && (n += e[a].url + l);
122
128
  return n != "" ? n.substr(0, n.length - 1) : "";
123
129
  }
124
130
  function X(e) {
@@ -130,127 +136,127 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
130
136
  }, 0);
131
137
  }
132
138
  function ee(e) {
133
- console.log("drop"), e.preventDefault(), u.onDrop && u.onDrop(e);
139
+ console.log("drop"), e.preventDefault(), d.onDrop && d.onDrop(e);
134
140
  }
135
141
  function te(e) {
136
- u.onBackPool && u.onBackPool(e);
142
+ d.onBackPool && d.onBackPool(e);
137
143
  }
138
- function ie(e) {
144
+ function oe(e) {
139
145
  T(e);
140
146
  }
141
- function oe(e) {
142
- P.value = [], P.value.push({ src: e.url, desc: "" }), S.value = !0;
147
+ function ie(e) {
148
+ F.value = [], F.value.push({ src: e.url, desc: "" }), S.value = !0;
143
149
  }
144
150
  function b(e, l) {
145
151
  let n = [];
146
- for (let s = 0; s < e.length; s++) {
147
- n[s] = [];
148
- for (let o = 0; o < l[0].length; o++) {
152
+ for (let a = 0; a < e.length; a++) {
153
+ n[a] = [];
154
+ for (let i = 0; i < l[0].length; i++) {
149
155
  let g = 0;
150
156
  for (let t = 0; t < e[0].length; t++)
151
- g += e[s][t] * l[t][o];
152
- n[s][o] = g;
157
+ g += e[a][t] * l[t][i];
158
+ n[a][i] = g;
153
159
  }
154
160
  }
155
161
  return n;
156
162
  }
157
- function F(e, l) {
158
- let n = e.hd = e.hd || 0, s = e.vd = e.vd || 0, o = e.deg = e.deg || 0, g = e.viewBox, t = e.matrix;
163
+ function D(e, l) {
164
+ let n = e.hd = e.hd || 0, a = e.vd = e.vd || 0, i = e.deg = e.deg || 0, g = e.viewBox, t = e.matrix;
159
165
  if (l == "rotateleft") {
160
- o += 90;
161
- let d = [
166
+ i += 90;
167
+ let u = [
162
168
  [Math.cos(90 * (Math.PI / 180)), -Math.sin(90 * (Math.PI / 180))],
163
169
  [Math.sin(90 * (Math.PI / 180)), Math.cos(90 * (Math.PI / 180))],
164
170
  [0, 0]
165
171
  ];
166
- t = b(t, d), e.viewBox = z(e.hd != n, e.vd != s, 90, g);
172
+ t = b(t, u), e.viewBox = z(e.hd != n, e.vd != a, 90, g);
167
173
  } else if (l == "rotateright") {
168
- o -= 90;
169
- let d = [
174
+ i -= 90;
175
+ let u = [
170
176
  [Math.cos(-90 * (Math.PI / 180)), -Math.sin(-90 * (Math.PI / 180))],
171
177
  [Math.sin(-90 * (Math.PI / 180)), Math.cos(-90 * (Math.PI / 180))],
172
178
  [0, 0]
173
179
  ];
174
- t = b(t, d), e.viewBox = z(e.hd != n, e.vd != s, -90, g);
180
+ t = b(t, u), e.viewBox = z(e.hd != n, e.vd != a, -90, g);
175
181
  } else l == "fliphorizontal" ? (n = n ? 0 : 1, t = b(t, [
176
182
  [-1, 0],
177
183
  [0, 1],
178
184
  [0, 0]
179
- ])) : l == "flipvertical" && (s = s ? 0 : 1, t = b(t, [
185
+ ])) : l == "flipvertical" && (a = a ? 0 : 1, t = b(t, [
180
186
  [1, 0],
181
187
  [0, -1],
182
188
  [0, 0]
183
189
  ]));
184
- e.matrix = t, e.deg = o, e.hd = n, e.vd = s;
190
+ e.matrix = t, e.deg = i, e.hd = n, e.vd = a;
185
191
  }
186
- function z(e, l, n, s) {
187
- let o = JSON.parse(JSON.stringify(s));
188
- const [g, t, d, w] = s;
189
- if (e == !0 && (o[0] = o[0] == 0 - d ? 0 : 0 - d), l == !0 && (o[1] = o[1] == 0 - w ? 0 : 0 - w), n) {
190
- let se = n / 90 % 4;
191
- for (let q = 0; q < Math.abs(se); q++)
192
- if (o[2] = w, o[3] = d, n > 0) {
193
- let D = o[1];
194
- o[1] = o[0] == 0 - d ? 0 : 0 - d, o[0] = D;
192
+ function z(e, l, n, a) {
193
+ let i = JSON.parse(JSON.stringify(a));
194
+ const [g, t, u, w] = a;
195
+ if (e == !0 && (i[0] = i[0] == 0 - u ? 0 : 0 - u), l == !0 && (i[1] = i[1] == 0 - w ? 0 : 0 - w), n) {
196
+ let ae = n / 90 % 4;
197
+ for (let q = 0; q < Math.abs(ae); q++)
198
+ if (i[2] = w, i[3] = u, n > 0) {
199
+ let P = i[1];
200
+ i[1] = i[0] == 0 - u ? 0 : 0 - u, i[0] = P;
195
201
  } else {
196
- let D = o[1];
197
- o[1] = o[0], o[0] = D == 0 - w ? 0 : 0 - w;
202
+ let P = i[1];
203
+ i[1] = i[0], i[0] = P == 0 - w ? 0 : 0 - w;
198
204
  }
199
205
  }
200
- return o;
206
+ return i;
201
207
  }
202
208
  const le = (e) => {
203
- a.value.push(e);
209
+ s.value.push(e);
204
210
  }, T = (e) => {
205
- a.value.indexOf(e) != -1 && a.value.splice(a.value.indexOf(e), 1);
211
+ s.value.indexOf(e) != -1 && s.value.splice(s.value.indexOf(e), 1);
206
212
  }, V = () => {
207
- (a.value.length == 0 || a.value.every((e) => e.status == "success")) && R("update:modelValue", Array.isArray(u.modelValue) ? a.value : W(a.value));
213
+ (s.value.length == 0 || s.value.every((e) => e.status == "success")) && R("update:modelValue", Array.isArray(d.modelValue) ? s.value : W(s.value));
208
214
  };
209
215
  function ne(e, l, n) {
210
216
  l.url = l.response.fileName, V();
211
217
  }
212
- return I(() => u.modelValue, (e) => {
218
+ return I(() => d.modelValue, (e) => {
213
219
  if (e)
214
220
  M.init(e);
215
221
  else
216
- return a.value = [];
217
- }, { deep: !0, immediate: !0 }), I(() => a.value.length, () => {
222
+ return s.value = [];
223
+ }, { deep: !0, immediate: !0 }), I(() => s.value.length, () => {
218
224
  console.log("imageupload filelist changed....."), V();
219
225
  }), $({
220
226
  pushFile: le,
221
227
  removeFile: T
222
228
  }), (e, l) => {
223
- const n = B("el-icon"), s = B("el-upload"), o = B("sy-svg-icon"), g = B("sy-image-view");
229
+ const n = U("el-icon"), a = U("el-upload"), i = U("sy-svg-icon"), g = U("sy-image-view");
224
230
  return r(), c("div", me, [
225
231
  f("div", pe, [
226
- v(s, ue({
227
- multiple: i.multipleSelect,
232
+ v(a, ue({
233
+ multiple: o.multipleSelect,
228
234
  ref: "imageUpload",
229
235
  "show-file-list": !1,
230
- "file-list": a.value,
231
- "onUpdate:fileList": l[0] || (l[0] = (t) => a.value = t),
236
+ "file-list": s.value,
237
+ "onUpdate:fileList": l[0] || (l[0] = (t) => s.value = t),
232
238
  "http-request": y(M).onHttpRequest,
233
239
  "list-type": "picture-card",
234
- limit: i.limit,
240
+ limit: o.limit,
235
241
  "on-success": ne,
236
242
  "on-change": y(M).onChange,
237
243
  "before-upload": y(M).onBeforeUpload,
238
244
  "on-error": Q,
239
245
  "on-exceed": K,
240
- class: { hidden: a.value.length >= i.limit, disabled: i.disabled },
241
- style: "width:" + (a.value.length >= i.limit ? "auto" : i.size.width) + ";height:" + (a.value.length >= i.limit ? "auto" : i.size.height) + ";"
242
- }, y(A), {
246
+ class: { hidden: s.value.length >= o.limit, disabled: o.disabled },
247
+ style: "width:" + (s.value.length >= o.limit ? "auto" : o.size.width) + ";height:" + (s.value.length >= o.limit ? "auto" : o.size.height) + ";"
248
+ }, y(_), {
243
249
  onDragenter: X,
244
250
  onDragover: Z,
245
251
  onDrop: ee,
246
252
  "auto-upload": !0,
247
- disabled: i.disabled
253
+ disabled: o.disabled
248
254
  }), {
249
255
  default: N(() => [
250
256
  f("div", {
251
- style: O([{ "background-position": "center", "background-repeat": "no-repeat", width: "100%", height: "100%", display: "flex", "justify-content": "center", "align-items": "center" }, i.defaultBg && i.defaultBg != "" ? "background-image:url(" + i.defaultBg + ");" : ""])
257
+ style: O([{ "background-position": "center", "background-repeat": "no-repeat", width: "100%", height: "100%", display: "flex", "justify-content": "center", "align-items": "center" }, o.defaultBg && o.defaultBg != "" ? "background-image:url(" + o.defaultBg + ");" : ""])
252
258
  }, [
253
- !i.defaultBg || i.defaultBg == "" ? (r(), E(n, {
259
+ !o.defaultBg || o.defaultBg == "" ? (r(), E(n, {
254
260
  key: 0,
255
261
  class: "avatar-uploader-icon"
256
262
  }, {
@@ -263,17 +269,17 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
263
269
  ]),
264
270
  _: 1
265
271
  }, 16, ["multiple", "file-list", "http-request", "limit", "on-change", "before-upload", "class", "style", "disabled"]),
266
- a.value.length > 0 ? (r(), c("div", {
272
+ s.value.length > 0 ? (r(), c("div", {
267
273
  key: 0,
268
- class: ce(["flex flex-wrap gap-2", { disabled: i.disabled, "ml-2": a.value.length < i.limit }])
274
+ class: ce(["flex flex-wrap gap-2", { disabled: o.disabled, "ml-2": s.value.length < o.limit }])
269
275
  }, [
270
- (r(!0), c(m, null, fe(a.value, (t) => (r(), c("div", {
276
+ (r(!0), c(m, null, fe(s.value, (t) => (r(), c("div", {
271
277
  key: t.uid,
272
278
  class: "el-upload--picture-card",
273
- style: O("width:" + i.size.width + ";height:" + i.size.height + ";")
279
+ style: O("width:" + o.size.width + ";height:" + o.size.height + ";")
274
280
  }, [
275
281
  t.status == "ready" || t.status == "uploading" || t.loading ? (r(), c("div", ye, [
276
- v(o, {
282
+ v(i, {
277
283
  "class-name": "icon-down",
278
284
  "icon-class": "down"
279
285
  }),
@@ -292,11 +298,11 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
292
298
  t.status == "success" && !t.loading ? (r(), c(m, { key: 1 }, [
293
299
  t.loadError ? h("", !0) : (r(), c("div", {
294
300
  key: 0,
295
- onClick: (d) => oe(t),
301
+ onClick: (u) => ie(t),
296
302
  class: "w-full h-full relative rounded overflow-hidden file-item"
297
303
  }, [
298
304
  f("div", ke, [
299
- i.view == "img" ? (r(), c("img", {
305
+ o.view == "img" ? (r(), c("img", {
300
306
  key: 0,
301
307
  style: { width: "100%" },
302
308
  src: t.objUrl,
@@ -320,56 +326,56 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
320
326
  y: "0",
321
327
  width: t.width,
322
328
  height: t.height
323
- }, null, 8, Ue)
324
- ], 8, Be)
329
+ }, null, 8, Be)
330
+ ], 8, Ue)
325
331
  ], 8, be))
326
332
  ]),
327
333
  f("div", je, [
328
334
  f("div", Ce, [
329
- U(f("div", Se, [
330
- v(o, {
335
+ B(f("div", Se, [
336
+ v(i, {
331
337
  "class-name": "icon-photo",
332
338
  "icon-class": "right-arrow",
333
- onClick: j((d) => te(t), ["stop"])
339
+ onClick: j((u) => te(t), ["stop"])
334
340
  }, null, 8, ["onClick"])
335
341
  ], 512), [
336
- [C, i.operations.back]
342
+ [C, o.operations.back]
337
343
  ]),
338
- U(f("div", Pe, [
339
- v(o, {
344
+ B(f("div", Fe, [
345
+ v(i, {
340
346
  "class-name": "icon-photo ",
341
347
  "icon-class": "close",
342
- onClick: j((d) => ie(t), ["stop"])
348
+ onClick: j((u) => oe(t), ["stop"])
343
349
  }, null, 8, ["onClick"])
344
350
  ], 512), [
345
- [C, !i.operations.back]
351
+ [C, !o.operations.back]
346
352
  ])
347
353
  ]),
348
- f("div", De, [
349
- U(f("div", Fe, [
350
- v(o, {
354
+ f("div", Pe, [
355
+ B(f("div", De, [
356
+ v(i, {
351
357
  "class-name": "icon-photo",
352
358
  "icon-class": "right-arrow",
353
- onClick: j((d) => F(t, "rotateleft"), ["stop"])
359
+ onClick: j((u) => D(t, "rotateleft"), ["stop"])
354
360
  }, null, 8, ["onClick"])
355
361
  ], 512), [
356
- [C, i.operations.rotateLeft]
362
+ [C, o.operations.rotateLeft]
357
363
  ]),
358
- U(f("div", ze, [
359
- v(o, {
364
+ B(f("div", ze, [
365
+ v(i, {
360
366
  "class-name": "icon-photo",
361
367
  "icon-class": "right-arrow",
362
- onClick: j((d) => F(t, "rotateright"), ["stop"])
368
+ onClick: j((u) => D(t, "rotateright"), ["stop"])
363
369
  }, null, 8, ["onClick"])
364
370
  ], 512), [
365
- [C, i.operations.rotateRight]
371
+ [C, o.operations.rotateRight]
366
372
  ])
367
373
  ])
368
374
  ])
369
375
  ], 8, xe)),
370
376
  t.loadError ? (r(), c("div", {
371
377
  key: 1,
372
- onClick: (d) => {
378
+ onClick: (u) => {
373
379
  t.loadError = !1, y(Y)(t);
374
380
  },
375
381
  class: "w-full h-full relative rounded overflow-hidden file-item"
@@ -382,25 +388,25 @@ const me = { class: "component-upload-image" }, pe = { style: { display: "flex",
382
388
  ]),
383
389
  J.value ? (r(), c("div", Ve, [
384
390
  l[4] || (l[4] = p(" 请上传 ")),
385
- i.fileMaxSize ? (r(), c(m, { key: 0 }, [
391
+ o.fileMaxSize ? (r(), c(m, { key: 0 }, [
386
392
  l[2] || (l[2] = p(" 大小不超过 ")),
387
- f("b", qe, k(i.fileMaxSize) + "MB", 1)
393
+ f("b", qe, k(o.fileMaxSize) + "MB", 1)
388
394
  ], 64)) : h("", !0),
389
- i.fileType ? (r(), c(m, { key: 1 }, [
395
+ o.fileType ? (r(), c(m, { key: 1 }, [
390
396
  l[3] || (l[3] = p(" 格式为 ")),
391
- f("b", Ie, k(i.fileType.join("/")), 1)
397
+ f("b", Ie, k(o.fileType.join("/")), 1)
392
398
  ], 64)) : h("", !0),
393
399
  l[5] || (l[5] = p(" 的文件 "))
394
400
  ])) : h("", !0),
395
401
  S.value ? (r(), E(g, {
396
402
  key: 1,
397
- urls: P.value,
403
+ urls: F.value,
398
404
  onClose: G
399
405
  }, null, 8, ["urls"])) : h("", !0)
400
406
  ]);
401
407
  };
402
408
  }
403
- }, Ae = /* @__PURE__ */ ve(Ee, [["__scopeId", "data-v-bcf7ad59"]]);
409
+ }, _e = /* @__PURE__ */ ve(Ee, [["__scopeId", "data-v-bffbac1a"]]);
404
410
  export {
405
- Ae as default
411
+ _e as default
406
412
  };
@@ -4502,7 +4502,7 @@ function po(e, t) {
4502
4502
  getFieldInfo: u
4503
4503
  };
4504
4504
  }
4505
- const Eo = /* @__PURE__ */ Object.assign({ "./libs/panels/render.jsx": () => import("./render-BlJUFFn9.js"), "./libs/panels/settings.vue": () => import("./settings-Dcc-2Qp-.js"), "./libs/panels/widgets.vue": () => import("./widgets-DMHGE2lN.js") }), Er = /* @__PURE__ */ Object.assign({ "./libs/designer.vue": () => import("./designer-DSWBS81X.js") }), go = /* @__PURE__ */ Object.assign({ "./libs/extensions/file-upload/index.vue": () => import("./index-KKRmAbFf.js"), "./libs/extensions/image-view/index.vue": () => import("./index-DWYaW2hS.js"), "./libs/extensions/picture-upload/index.vue": () => import("./index-CDLmRhCQ.js"), "./libs/extensions/svg-icon/index.vue": () => import("./index-BFhlK9cb.js"), "./libs/extensions/tooth-selector/index.vue": () => import("./index-BoOIQKIO.js") }), ho = /* @__PURE__ */ Object.assign({ "./libs/condition-editor/index.vue": () => import("./index-DmjTLesN.js") }), vo = (e) => {
4505
+ const Eo = /* @__PURE__ */ Object.assign({ "./libs/panels/render.jsx": () => import("./render-CCvXb0_d.js"), "./libs/panels/settings.vue": () => import("./settings-lM0nln5g.js"), "./libs/panels/widgets.vue": () => import("./widgets-CLCucuSm.js") }), Er = /* @__PURE__ */ Object.assign({ "./libs/designer.vue": () => import("./designer-CZEtWyJj.js") }), go = /* @__PURE__ */ Object.assign({ "./libs/extensions/file-upload/index.vue": () => import("./index-BVwiR6jJ.js"), "./libs/extensions/image-view/index.vue": () => import("./index-DWYaW2hS.js"), "./libs/extensions/picture-upload/index.vue": () => import("./index-BD0zLIJh.js"), "./libs/extensions/svg-icon/index.vue": () => import("./index-BFhlK9cb.js"), "./libs/extensions/tooth-selector/index.vue": () => import("./index-BoOIQKIO.js") }), ho = /* @__PURE__ */ Object.assign({ "./libs/condition-editor/index.vue": () => import("./index-DmjTLesN.js") }), vo = (e) => {
4506
4506
  for (const [t, n] of Object.entries(Eo)) {
4507
4507
  const r = t.slice(t.lastIndexOf("/") + 1, t.lastIndexOf("."));
4508
4508
  e.component("sy-" + r, ze(n));
@@ -1,5 +1,5 @@
1
- import { useAttrs as N, ref as c, computed as j, inject as L, watch as M, resolveComponent as m, createElementBlock as f, openBlock as u, createVNode as U, mergeProps as z, unref as o, withCtx as y, createCommentVNode as g, createTextVNode as d, Fragment as b, createElementVNode as p, toDisplayString as h, renderSlot as A, createBlock as O } from "vue";
2
- import { u as _ } from "./ossHook-DkzdDU5y.js";
1
+ import { useAttrs as N, ref as c, computed as j, inject as A, watch as U, resolveComponent as m, createElementBlock as f, openBlock as n, createVNode as w, mergeProps as L, unref as o, withCtx as y, createCommentVNode as g, createTextVNode as a, Fragment as b, createElementVNode as p, toDisplayString as M, renderSlot as z, createBlock as O } from "vue";
2
+ import { u as _ } from "./ossHook-4u7hcaiA.js";
3
3
  const C = { class: "w-full" }, D = { class: "flex justify-center" }, E = {
4
4
  key: 0,
5
5
  class: "el-upload__tip font-bold"
@@ -68,94 +68,100 @@ const C = { class: "w-full" }, D = { class: "flex justify-center" }, E = {
68
68
  default: () => ({
69
69
  signatureUrl: ""
70
70
  })
71
+ },
72
+ // 处理上传后
73
+ endUploadFlow: {
74
+ type: Array,
75
+ default: () => []
71
76
  }
72
77
  },
73
- setup(r, { emit: w }) {
74
- const l = r, v = N(), S = w;
78
+ setup(r, { emit: h }) {
79
+ const l = r, v = N(), S = h;
75
80
  c(0), c([]);
76
81
  const i = c([]), q = j(
77
82
  () => l.isShowTip && (l.fileType || l.fileMaxSize)
78
- ), T = L("request"), [s] = _("", i, {
83
+ ), T = A("request"), [s] = _("", i, {
79
84
  request: T,
80
85
  fileType: l.fileType,
81
86
  signatureUrl: l.oss.signatureUrl,
82
87
  requireMd5: l.md5.requireMd5,
83
88
  addFileMd5Url: l.md5.addFileMd5Url,
84
- queryFileMd5Url: l.md5.queryFileMd5Url
89
+ queryFileMd5Url: l.md5.queryFileMd5Url,
90
+ endUploadFlow: l.endUploadFlow
85
91
  });
86
- function k(t, e) {
87
- let n = "";
92
+ function F(t, e) {
93
+ let d = "";
88
94
  e = e || ",";
89
- for (let a in t)
90
- t[a].url !== void 0 && t[a].url.indexOf("blob:") !== 0 && (n += t[a].url + e);
91
- return n != "" ? n.substr(0, n.length - 1) : "";
95
+ for (let u in t)
96
+ t[u].url !== void 0 && t[u].url.indexOf("blob:") !== 0 && (d += t[u].url + e);
97
+ return d != "" ? d.substr(0, d.length - 1) : "";
92
98
  }
93
99
  const x = () => {
94
- (i.value.length == 0 || i.value.every((t) => t.status == "success")) && S("update:modelValue", Array.isArray(l.modelValue) ? i.value : k(i.value));
100
+ (i.value.length == 0 || i.value.every((t) => t.status == "success")) && S("update:modelValue", Array.isArray(l.modelValue) ? i.value : F(i.value));
95
101
  };
96
- function V(t, e, n) {
102
+ function k(t, e, d) {
97
103
  e.url = e.response.fileName, x();
98
104
  }
99
- return M(() => l.modelValue, (t) => {
105
+ return U(() => l.modelValue, (t) => {
100
106
  if (t)
101
107
  s.init(t);
102
108
  else
103
109
  return i.value = [];
104
- }, { deep: !0, immediate: !0 }), M(() => i.value.length, () => {
110
+ }, { deep: !0, immediate: !0 }), U(() => i.value.length, () => {
105
111
  console.log("fileupload filelist changed....."), x();
106
112
  }), (t, e) => {
107
- const n = m("sy-svg-icon"), a = m("el-button"), B = m("el-upload");
108
- return u(), f("div", C, [
109
- U(B, z({
113
+ const d = m("sy-svg-icon"), u = m("el-button"), V = m("el-upload");
114
+ return n(), f("div", C, [
115
+ w(V, L({
110
116
  class: "upload-file",
111
117
  drag: r.drag,
112
118
  multiple: "",
113
119
  "http-request": o(s).onHttpRequest,
114
- "on-success": V,
120
+ "on-success": k,
115
121
  "on-change": o(s).onChange,
116
122
  "before-upload": o(s).onBeforeUpload,
117
123
  "file-list": o(s).fileList,
118
- "onUpdate:fileList": e[0] || (e[0] = (F) => o(s).fileList = F),
124
+ "onUpdate:fileList": e[0] || (e[0] = (B) => o(s).fileList = B),
119
125
  "on-preview": o(s).previewDownload
120
126
  }, o(v)), {
121
127
  default: y(() => [
122
- A(t.$slots, "default", {}, () => [
123
- r.drag ? (u(), f(b, { key: 0 }, [
128
+ z(t.$slots, "default", {}, () => [
129
+ r.drag ? (n(), f(b, { key: 0 }, [
124
130
  p("div", D, [
125
- U(n, {
131
+ w(d, {
126
132
  "icon-class": "upload",
127
133
  "class-name": "",
128
134
  style: { width: "3rem", height: "3rem", color: "var(--el-color-primary)" }
129
135
  })
130
136
  ]),
131
137
  e[1] || (e[1] = p("div", { class: "el-upload__text" }, [
132
- d(" 将文件拖拽入这里或 "),
138
+ a(" 将文件拖拽入这里或 "),
133
139
  p("em", null, "点击上传")
134
140
  ], -1))
135
- ], 64)) : (u(), O(a, {
141
+ ], 64)) : (n(), O(u, {
136
142
  key: 1,
137
143
  type: "primary",
138
144
  disabled: o(v).disabled
139
145
  }, {
140
146
  default: y(() => e[2] || (e[2] = [
141
- d("点击上传")
147
+ a("点击上传")
142
148
  ])),
143
149
  _: 1
144
150
  }, 8, ["disabled"]))
145
151
  ])
146
152
  ]),
147
153
  tip: y(() => [
148
- q.value ? (u(), f("div", E, [
149
- e[5] || (e[5] = d(" 请上传 ")),
150
- r.fileMaxSize ? (u(), f(b, { key: 0 }, [
151
- e[3] || (e[3] = d(" 大小不超过 ")),
152
- p("b", R, h(r.fileMaxSize) + "MB", 1)
154
+ q.value ? (n(), f("div", E, [
155
+ e[5] || (e[5] = a(" 请上传 ")),
156
+ r.fileMaxSize ? (n(), f(b, { key: 0 }, [
157
+ e[3] || (e[3] = a(" 大小不超过 ")),
158
+ p("b", R, M(r.fileMaxSize) + "MB", 1)
153
159
  ], 64)) : g("", !0),
154
- r.fileType ? (u(), f(b, { key: 1 }, [
155
- e[4] || (e[4] = d(" 格式为 ")),
156
- p("b", H, h(r.fileType.join("/")), 1)
160
+ r.fileType ? (n(), f(b, { key: 1 }, [
161
+ e[4] || (e[4] = a(" 格式为 ")),
162
+ p("b", H, M(r.fileType.join("/")), 1)
157
163
  ], 64)) : g("", !0),
158
- e[6] || (e[6] = d(" 的文件 "))
164
+ e[6] || (e[6] = a(" 的文件 "))
159
165
  ])) : g("", !0)
160
166
  ]),
161
167
  _: 3
@@ -1,5 +1,5 @@
1
1
  import { getCurrentInstance as B, inject as z, ref as O, computed as d, unref as l, watch as W, isRef as ct, warn as ut, provide as dt, defineComponent as $, createElementBlock as U, openBlock as T, mergeProps as pt, renderSlot as L, normalizeClass as I, createVNode as se, Transition as je, withCtx as H, withDirectives as Me, createElementVNode as re, normalizeStyle as De, createTextVNode as ft, toDisplayString as Fe, vShow as Ae, shallowReactive as gt, onMounted as mt, createBlock as F, createCommentVNode as R, resolveDynamicComponent as yt, Fragment as ht, withModifiers as vt, isVNode as Be, render as ge } from "vue";
2
- import { i as bt, n as _t, r as Le, t as ke, d as Y, e as Ct, f as Ot, g as Z, h as N, j as Ve, k as me, l as J, m as wt, o as St, q as Tt, s as It, w as xt, v as Nt, x as Et, y as $t, z as Pt, A as ye } from "./index-CmT4m7do.js";
2
+ import { i as bt, n as _t, r as Le, t as ke, d as Y, e as Ct, f as Ot, g as Z, h as N, j as Ve, k as me, l as J, m as wt, o as St, q as Tt, s as It, w as xt, v as Nt, x as Et, y as $t, z as Pt, A as ye } from "./index-BO9UMJxn.js";
3
3
  const Ke = Symbol(), G = "el", zt = "is-", x = (e, n, t, o, r) => {
4
4
  let s = `${e}-${n}`;
5
5
  return t && (s += `-${t}`), o && (s += `__${o}`), r && (s += `--${r}`), s;