sy-form-designer 1.0.52 → 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-tWhOaVm4.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,8 +1,8 @@
1
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-C47Hnvnt.js";
3
- import { p as ge } from "./index-H7hJuW8u.js";
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-CJHA71Og.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",
@@ -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-9ofPMlvx.js"), "./libs/panels/settings.vue": () => import("./settings-tWhOaVm4.js"), "./libs/panels/widgets.vue": () => import("./widgets-DpTPhRWQ.js") }), Er = /* @__PURE__ */ Object.assign({ "./libs/designer.vue": () => import("./designer-C_bJfFMh.js") }), go = /* @__PURE__ */ Object.assign({ "./libs/extensions/file-upload/index.vue": () => import("./index-BZJ5XSlR.js"), "./libs/extensions/image-view/index.vue": () => import("./index-DWYaW2hS.js"), "./libs/extensions/picture-upload/index.vue": () => import("./index-C2B5pQX5.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-C47Hnvnt.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-H7hJuW8u.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;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { B as a } from "./index-H7hJuW8u.js";
2
+ import { B as a } from "./index-BO9UMJxn.js";
3
3
  export {
4
4
  a as default
5
5
  };