super-page-runtime 2.3.36 → 2.3.37-cdn1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/es/components/runtime/utils/events/standard-event.js +1 -1
  2. package/dist/es/components/runtime/utils/events/validator-util.js +230 -189
  3. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +1 -1
  4. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +2 -2
  5. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
  6. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +26 -26
  7. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +3 -1
  8. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +17 -12
  9. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +69 -66
  10. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +36 -33
  11. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +36 -36
  12. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +45 -45
  13. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +61 -61
  14. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +35 -35
  15. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +58 -58
  16. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +19 -19
  17. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +59 -59
  18. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +26 -26
  20. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +27 -27
  21. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +49 -49
  22. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
  23. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +111 -111
  24. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +1 -1
  25. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +88 -88
  26. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +5 -5
  27. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +1 -1
  28. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +19 -19
  29. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +102 -90
  30. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +6 -3
  31. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +1 -1
  32. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +41 -20
  33. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +26 -18
  35. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  36. package/dist/es/components/runtime/views/super-page.vue2.js +9 -3
  37. package/dist/es/style.css +168 -160
  38. package/package.json +2 -2
@@ -1,82 +1,82 @@
1
- import { defineComponent as e, ref as t, computed as l, watch as o, onUnmounted as n, onMounted as u, nextTick as a, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as f, normalizeClass as p, unref as c, withCtx as g, createVNode as v, createElementBlock as d, Fragment as m, renderList as h, createTextVNode as y, toDisplayString as b, createCommentVNode as C } from "vue";
2
- import { setVariableValue as x, getVariableValue as k, getOptionDatasFromPage as _, autoSetAfterSelect as S, queryOptionDatasources as R } from "../../../../utils/page-helper-util.js";
3
- import { getFormModelFields as j } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent as T, handleAfterInitEvent as I } from "../../../../utils/events/event-util.js";
5
- import { $t as q } from "../../../../utils/i18n-util.js";
6
- import { addRequiredClassUtil as V } from "../../../../utils/common-util.js";
7
- const w = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: w2 }) {
8
- const z = e2, O = t(null), D = z.pageContext.entity ? z.pageContext.entity : {};
9
- let E = j(z.pageContext, z.configure);
10
- const M = l({ get() {
11
- let e3 = k(D, E);
1
+ import { defineComponent as e, ref as t, computed as l, watch as o, onUnmounted as n, onMounted as a, nextTick as u, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as f, normalizeClass as p, unref as c, createSlots as g, withCtx as v, createVNode as d, createElementBlock as m, Fragment as h, renderList as b, createTextVNode as y, toDisplayString as C, createElementVNode as x } from "vue";
2
+ import { setVariableValue as k, getVariableValue as _, getOptionDatasFromPage as S, autoSetAfterSelect as R, queryOptionDatasources as j } from "../../../../utils/page-helper-util.js";
3
+ import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
4
+ import { handleFormEvent as I, handleAfterInitEvent as q } from "../../../../utils/events/event-util.js";
5
+ import { $t as V } from "../../../../utils/i18n-util.js";
6
+ import { addRequiredClassUtil as w } from "../../../../utils/common-util.js";
7
+ const z = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
8
+ const O = e2, D = t(null), E = O.pageContext.entity ? O.pageContext.entity : {};
9
+ let M = T(O.pageContext, O.configure);
10
+ const P = l({ get() {
11
+ let e3 = _(E, M);
12
12
  return null != e3 && (e3 += ""), e3;
13
13
  }, set(e3) {
14
- x(D, E, e3), null != e3 && (O.value = "");
15
- } }), P = z.configure.runtime ? z.configure.runtime : {}, W = P.style, F = P.class, U = P.headerStyle, $ = P.titleExceedStyle, A = t(P.props ? P.props : {}), B = t(A.value.options ? A.value.options : []), G = _(z.pageContext, z.configure);
16
- G.length > 0 && (B.value = G);
17
- const H = z.configure.props && z.configure.props.dataOrigin ? z.configure.props.dataOrigin : {}, J = H.optionValueSetType;
18
- let K = [];
19
- if (("dynamicData" == J || "dataTable" == J || "service" == J) && H.autoSets) for (let e3 of H.autoSets) e3.source && K.push(e3);
20
- z.configure && z.configure.props && z.configure.props.base && z.configure.props.base.optionProp && K.push({ source: "label", target: z.configure.props.base.optionProp }), A.value.changeMethod = function(e3) {
21
- if (K.length > 0) {
14
+ k(E, M, e3), null != e3 && (D.value = "");
15
+ } }), W = O.configure.runtime ? O.configure.runtime : {}, F = W.style, U = W.class, $ = W.headerStyle, A = W.titleExceedStyle, B = t(W.props ? W.props : {}), G = t(B.value.options ? B.value.options : []), H = S(O.pageContext, O.configure);
16
+ H.length > 0 && (G.value = H);
17
+ const J = O.configure.props && O.configure.props.dataOrigin ? O.configure.props.dataOrigin : {}, K = J.optionValueSetType;
18
+ let L = [];
19
+ if (("dynamicData" == K || "dataTable" == K || "service" == K) && J.autoSets) for (let e3 of J.autoSets) e3.source && L.push(e3);
20
+ O.configure && O.configure.props && O.configure.props.base && O.configure.props.base.optionProp && L.push({ source: "label", target: O.configure.props.base.optionProp }), B.value.changeMethod = function(e3) {
21
+ if (L.length > 0) {
22
22
  let t2 = null;
23
- B.value && null != e3 && null != e3 && (t2 = B.value.filter((t3) => e3 === t3.value)), S(z.configure, z.pageContext, K, t2);
23
+ G.value && null != e3 && null != e3 && (t2 = G.value.filter((t3) => e3 === t3.value)), R(O.configure, O.pageContext, L, t2);
24
24
  }
25
- T(e3, z.pageContext, z.configure, "change");
25
+ I(e3, O.pageContext, O.configure, "change");
26
26
  };
27
- const L = A.value.monitorFields, N = [];
28
- if (L) {
27
+ const N = B.value.monitorFields, Q = [];
28
+ if (N) {
29
29
  const e3 = [];
30
- for (let t2 of L) if (t2.startsWith("${")) {
30
+ for (let t2 of N) if (t2.startsWith("${")) {
31
31
  t2 = t2.substring(2, t2.length - 1);
32
32
  const l2 = t2.split(".");
33
- "page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (N.push(l2), e3.includes(l2[0]) || e3.push(l2[0]));
33
+ "page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (Q.push(l2), e3.includes(l2[0]) || e3.push(l2[0]));
34
34
  }
35
- for (let t2 of e3) o(D[t2], () => {
36
- ee();
35
+ for (let t2 of e3) o(E[t2], () => {
36
+ te();
37
37
  });
38
38
  }
39
- function Q() {
39
+ function X() {
40
40
  let e3 = "";
41
- for (let t2 of N) e3 += "_" + k(D, t2);
41
+ for (let t2 of Q) e3 += "_" + _(E, t2);
42
42
  return e3;
43
43
  }
44
- let X = Q(), Y = false;
45
- const Z = A.value.optionconfigInfo ? A.value.optionconfigInfo : {};
46
- function ee() {
47
- Y && clearTimeout(Y), Y = setTimeout(function() {
48
- const e3 = Q();
49
- e3 != X && (X = e3, R(z.pageContext, Z, void 0).then((e4) => {
44
+ let Y = X(), Z = false;
45
+ const ee = B.value.optionconfigInfo ? B.value.optionconfigInfo : {};
46
+ function te() {
47
+ Z && clearTimeout(Z), Z = setTimeout(function() {
48
+ const e3 = X();
49
+ e3 != Y && (Y = e3, j(O.pageContext, ee, void 0).then((e4) => {
50
50
  }));
51
51
  }, 200);
52
52
  }
53
53
  n(() => {
54
- Y && clearTimeout(Y);
54
+ Z && clearTimeout(Z);
55
55
  });
56
- const te = t(null), le = t(null), oe = t(null);
57
- return u(() => {
58
- a(() => {
59
- const e3 = M.value;
60
- I(e3, z.pageContext, z.configure, { formItemRef: te.value, componentRef: le.value, titleRef: oe.value, value: e3, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
56
+ const le = t(null), oe = t(null), ne = t(null);
57
+ return a(() => {
58
+ u(() => {
59
+ const e3 = P.value;
60
+ q(e3, O.pageContext, O.configure, { formItemRef: le.value, componentRef: oe.value, titleRef: ne.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
61
61
  });
62
- }), w2({ updateOptions: function(e3) {
63
- B.value = e3 || [];
62
+ }), z2({ updateOptions: function(e3) {
63
+ G.value = e3 || [];
64
64
  }, addRequiredClass: function() {
65
- O.value = V();
65
+ D.value = w();
66
66
  }, getSelectItemsTitle: function() {
67
- let e3 = k(D, E);
67
+ let e3 = _(E, M);
68
68
  if (null == e3) return "";
69
69
  if (e3 = String(e3), null != e3 && "" !== e3 && e3.length > 0) {
70
70
  let t2 = "";
71
- return B.value.length > 0 ? (B.value.forEach((l2) => {
71
+ return G.value.length > 0 ? (G.value.forEach((l2) => {
72
72
  l2.value === e3 && (t2 = t2 + l2.label + ",");
73
73
  }), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
74
74
  }
75
75
  } }), (t2, l2) => {
76
- const o2 = i("el-radio"), n2 = i("el-radio-group"), u2 = i("el-form-item");
77
- return s(), r(u2, { ref_key: "formItemRef", ref: te, required: A.value.required, class: p(c(F) + (O.value ? " " + O.value : "")), "label-width": A.value.labelWidth, style: f(c(W)) }, { label: g(() => [A.value.tittleShow ? (s(), d("div", { key: 0, ref_key: "titleRef", ref: oe, style: f({ ...c(U), ...c($) }) }, b(c(q)(A.value.title)), 5)) : C("", true)]), default: g(() => [v(n2, { ref_key: "componentRef", ref: le, disabled: "disabled" === A.value.state, size: A.value.size, onChange: A.value.changeMethod, modelValue: M.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => M.value = e3) }, { default: g(() => [(s(true), d(m, null, h(B.value, (t3) => (s(), r(o2, { key: t3.value, label: t3.value, onClick: (l3) => c(T)(t3.value, e2.pageContext, e2.configure, "click", { values: M.value }) }, { default: g(() => [y(b(t3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
76
+ const o2 = i("el-radio"), n2 = i("el-radio-group"), a2 = i("el-form-item");
77
+ return s(), r(a2, { ref_key: "formItemRef", ref: le, required: B.value.required, class: p(c(U) + (D.value ? " " + D.value : "")), "label-width": B.value.labelWidth, style: f(c(F)) }, g({ default: v(() => [d(n2, { ref_key: "componentRef", ref: oe, disabled: "disabled" === B.value.state, size: B.value.size, onChange: B.value.changeMethod, modelValue: P.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => P.value = e3) }, { default: v(() => [(s(true), m(h, null, b(G.value, (t3) => (s(), r(o2, { key: t3.value, label: t3.value, onClick: (l3) => c(I)(t3.value, e2.pageContext, e2.configure, "click", { values: P.value }) }, { default: v(() => [y(C(t3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 2 }, [B.value.tittleShow ? { name: "label", fn: v(() => [x("div", { ref_key: "titleRef", ref: ne, style: f({ ...c($), ...c(A) }), class: "amb-form-item-label" }, C(c(V)(B.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
78
78
  };
79
79
  } });
80
80
  export {
81
- w as default
81
+ z as default
82
82
  };
@@ -2,7 +2,7 @@ import t from "./richtext-runtime.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
- const r = e(t, [["__scopeId", "data-v-7f659782"]]);
5
+ const r = e(t, [["__scopeId", "data-v-faf97d0c"]]);
6
6
  export {
7
7
  r as default
8
8
  };
@@ -1,136 +1,136 @@
1
- import { defineComponent as e, ref as t, watch as n, onMounted as l, nextTick as o, onBeforeUnmount as i, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as p, normalizeStyle as f, normalizeClass as m, unref as v, withCtx as g, createElementVNode as h, toDisplayString as b } from "vue";
2
- import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
3
- import { getSizeConfig as x, formatVariableValue as k, getVariableValue as w, setVariableValue as C } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as q, handleFormEvent as T } from "../../../../utils/events/event-util.js";
5
- import S from "agilebuilder-ui/src/utils/request";
6
- import { $t as E } from "../../../../utils/i18n-util.js";
7
- import { getBaseUrl as A, addRequiredClassUtil as L } from "../../../../utils/common-util.js";
8
- import H from "quill";
1
+ import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as o, onBeforeUnmount as i, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as p, normalizeStyle as f, normalizeClass as m, unref as v, createSlots as g, withCtx as h, createElementVNode as b, toDisplayString as y } from "vue";
2
+ import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
+ import { getSizeConfig as k, formatVariableValue as w, getVariableValue as C, setVariableValue as q } from "../../../../utils/page-helper-util.js";
4
+ import { handleAfterInitEvent as T, handleFormEvent as S } from "../../../../utils/events/event-util.js";
5
+ import E from "agilebuilder-ui/src/utils/request";
6
+ import { $t as A } from "../../../../utils/i18n-util.js";
7
+ import { getBaseUrl as L, addRequiredClassUtil as H } from "../../../../utils/common-util.js";
8
+ import M from "quill";
9
9
  import "quill/dist/quill.snow.css";
10
- import { ElMessage as M } from "element-plus";
11
- const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext-statusbar" }, j = { class: "word-count" }, V = { key: 0, class: "upload-loading" }, $ = ["innerHTML"], z = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
12
- const B = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], F = H.import("attributors/style/size");
13
- F.whitelist = B, H.register(F, true);
14
- const U = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], D = H.import("attributors/style/font");
15
- D.whitelist = U, H.register(D, true);
16
- const W = e2, P = t(""), G = W.pageContext.entity ? W.pageContext.entity : {}, I = y(W.pageContext, W.configure), K = W.configure.runtime ? W.configure.runtime : {}, O = K.style, Y = K.class, J = K.headerStyle, Q = K.titleExceedStyle, X = t(K.props ? K.props : {});
17
- let Z = x(W.pageContext, W.configure);
18
- Z && Z.fixHeight && (O.height || (O.height = Z.fixHeight + "px"));
19
- let ee = X.value.value;
20
- const te = k(W.pageContext, ee), ne = t(null);
21
- let le = null;
22
- const oe = t(false), ie = t(0), ae = t(false), re = t(false), ue = t("");
23
- let se = null, ce = X.value.state;
24
- function de(e3) {
10
+ import { ElMessage as N } from "element-plus";
11
+ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext-statusbar" }, V = { class: "word-count" }, $ = { key: 0, class: "upload-loading" }, z = ["innerHTML"], B = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
12
+ const F = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], U = M.import("attributors/style/size");
13
+ U.whitelist = F, M.register(U, true);
14
+ const D = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], W = M.import("attributors/style/font");
15
+ W.whitelist = D, M.register(W, true);
16
+ const P = e2, G = t(""), I = P.pageContext.entity ? P.pageContext.entity : {}, K = x(P.pageContext, P.configure), O = P.configure.runtime ? P.configure.runtime : {}, Y = O.style, J = O.class, Q = O.headerStyle, X = O.titleExceedStyle, Z = t(O.props ? O.props : {});
17
+ let ee = k(P.pageContext, P.configure);
18
+ ee && ee.fixHeight && (Y.height || (Y.height = ee.fixHeight + "px"));
19
+ let te = Z.value.value;
20
+ const le = w(P.pageContext, te), ne = t(null);
21
+ let oe = null;
22
+ const ie = t(false), ae = t(0), re = t(false), ue = t(false), se = t("");
23
+ let ce = null, de = Z.value.state;
24
+ function pe(e3) {
25
25
  return "readonly" == e3 || "disabled" == e3;
26
26
  }
27
- const pe = de(ce), fe = t({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: B }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: U }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: pe ? "" : X.value.placeholder, readOnly: pe });
28
- function me() {
29
- if (!(le == null ? void 0 : le.container)) return;
30
- const e3 = le.container.parentNode;
27
+ const fe = pe(de), me = t({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: F }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: D }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: fe ? "" : Z.value.placeholder, readOnly: fe });
28
+ function ve() {
29
+ if (!(oe == null ? void 0 : oe.container)) return;
30
+ const e3 = oe.container.parentNode;
31
31
  if (!e3) return;
32
- const t2 = e3.getBoundingClientRect(), n2 = le.container.getBoundingClientRect();
33
- let l2 = t2.height - (n2.top - t2.top);
34
- l2 -= 24, le.container.style.height = Math.max(l2, 100) + "px";
32
+ const t2 = e3.getBoundingClientRect(), l2 = oe.container.getBoundingClientRect();
33
+ let n2 = t2.height - (l2.top - t2.top);
34
+ n2 -= 24, oe.container.style.height = Math.max(n2, 100) + "px";
35
35
  }
36
- n(X.value, () => {
37
- const e3 = X.value.state;
38
- if (null != e3 && e3 !== ce) {
39
- ce = e3;
40
- const t2 = de(ce);
41
- le && (le.enable(!t2), le.root.dataset.placeholder = t2 ? "" : X.value.placeholder);
36
+ l(Z.value, () => {
37
+ const e3 = Z.value.state;
38
+ if (null != e3 && e3 !== de) {
39
+ de = e3;
40
+ const t2 = pe(de);
41
+ oe && (oe.enable(!t2), oe.root.dataset.placeholder = t2 ? "" : Z.value.placeholder);
42
42
  }
43
43
  });
44
- const ve = t([]), ge = t(false), he = t(null), be = t(null), ye = t(null);
45
- let xe = null;
46
- function ke(e3) {
44
+ const ge = t([]), he = t(false), be = t(null), ye = t(null), xe = t(null);
45
+ let ke = null;
46
+ function we(e3) {
47
47
  const t2 = e3.match(/serverPath=([^&"]+)/);
48
48
  return t2 ? t2[1] : "";
49
49
  }
50
- function we(e3) {
51
- if (!le) return;
50
+ function Ce(e3) {
51
+ if (!oe) return;
52
52
  const t2 = function(e4) {
53
53
  let t3 = e4.replace(/<img data-uuid="(.*?)"/g, (e5, t4) => {
54
- const n3 = ke(t4), l2 = W.pageContext.backendUrl;
55
- return `<img src="${A(l2, W.pageContext.isTest)}/common/fs-upload/download?serverPath=${n3}&isShowWatermark=false" data-uuid="${n3}"`;
54
+ const l3 = we(t4), n2 = P.pageContext.backendUrl;
55
+ return `<img src="${L(n2, P.pageContext.isTest)}/common/fs-upload/download?serverPath=${l3}&isShowWatermark=false" data-uuid="${l3}"`;
56
56
  });
57
57
  return t3 = t3.replace(/\t/g, "    "), t3 = t3.replace(/ {2}/g, "  "), t3;
58
- }(e3), n2 = le.clipboard.convertHTML(t2);
59
- le.setContents(n2.ops), o(() => {
60
- if (!le) return;
61
- le.root.querySelectorAll("img").forEach((e4) => {
58
+ }(e3), l2 = oe.clipboard.convertHTML(t2);
59
+ oe.setContents(l2.ops), o(() => {
60
+ if (!oe) return;
61
+ oe.root.querySelectorAll("img").forEach((e4) => {
62
62
  if (!e4.getAttribute("data-uuid")) {
63
- const t3 = ke(e4.src);
63
+ const t3 = we(e4.src);
64
64
  e4.setAttribute("data-uuid", t3);
65
65
  }
66
66
  });
67
67
  });
68
68
  }
69
- const Ce = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
70
- function qe() {
71
- oe.value = !oe.value, o(() => {
72
- !oe.value && (le == null ? void 0 : le.container) && (le.container.style.height = ""), me();
73
- });
74
- }
69
+ const qe = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
75
70
  function Te() {
76
- le && (ue.value = le.root.innerHTML, re.value = true);
71
+ ie.value = !ie.value, o(() => {
72
+ !ie.value && (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ve();
73
+ });
77
74
  }
78
75
  function Se() {
79
- if (!le) return void (ie.value = 0);
80
- const e3 = le.getText().trim();
81
- ie.value = e3.length;
76
+ oe && (se.value = oe.root.innerHTML, ue.value = true);
82
77
  }
83
78
  function Ee() {
84
- M.error({ message: "图片上传失败,请重试", duration: 3e3 });
79
+ if (!oe) return void (ae.value = 0);
80
+ const e3 = oe.getText().trim();
81
+ ae.value = e3.length;
85
82
  }
86
- function Ae(e3) {
87
- "Escape" === e3.key && oe.value && (oe.value = false, o(() => {
88
- (le == null ? void 0 : le.container) && (le.container.style.height = ""), me();
89
- }));
83
+ function Ae() {
84
+ N.error({ message: "图片上传失败,请重试", duration: 3e3 });
90
85
  }
91
86
  function Le(e3) {
92
- var _a;
93
- le && (null !== e3.relatedTarget && ((_a = ne.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || T(le.root.innerHTML, W.pageContext, W.configure, "change", { entity: G }));
87
+ "Escape" === e3.key && ie.value && (ie.value = false, o(() => {
88
+ (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ve();
89
+ }));
94
90
  }
95
91
  function He(e3) {
92
+ var _a;
93
+ oe && (null !== e3.relatedTarget && ((_a = ne.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || S(oe.root.innerHTML, P.pageContext, P.configure, "change", { entity: I }));
94
+ }
95
+ function Me(e3) {
96
96
  if ("img" === e3.target.localName) {
97
- ve.value = [];
97
+ ge.value = [];
98
98
  let t2 = e3.target.src;
99
- ve.value.push(t2), ge.value = true;
99
+ ge.value.push(t2), he.value = true;
100
100
  }
101
101
  }
102
- function Me(e3) {
102
+ function Ne(e3) {
103
103
  const t2 = new FormData();
104
104
  t2.append("file", e3);
105
- const n2 = W.pageContext.backendUrl, l2 = A(n2, W.pageContext.isTest);
106
- return S.post(l2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
105
+ const l2 = P.pageContext.backendUrl, n2 = L(l2, P.pageContext.isTest);
106
+ return E.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
107
107
  }
108
- function Ne(e3, t2) {
109
- const n2 = e3.split(","), l2 = n2[0].match(/:(.*?);/), o2 = l2 ? l2[1] : "image/png", i2 = atob(n2[1]);
108
+ function Re(e3, t2) {
109
+ const l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/), o2 = n2 ? n2[1] : "image/png", i2 = atob(l2[1]);
110
110
  let a2 = i2.length;
111
111
  const r2 = new Uint8Array(a2);
112
112
  for (; a2--; ) r2[a2] = i2.charCodeAt(a2);
113
113
  return new File([r2], t2, { type: o2 });
114
114
  }
115
- return l(() => {
115
+ return n(() => {
116
116
  var _a;
117
- ne.value && (le = new H(ne.value, fe.value), le.root.style.fontSize = "16px", function() {
117
+ ne.value && (oe = new M(ne.value, me.value), oe.root.style.fontSize = "16px", function() {
118
118
  var _a2, _b;
119
119
  const e3 = (_b = (_a2 = ne.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
120
120
  if (!e3) return;
121
121
  e3.querySelectorAll("button").forEach((e4) => {
122
122
  const t2 = e4.className.match(/ql-([\w-]+)/);
123
123
  if (t2) {
124
- const n2 = t2[1], l2 = `${n2}[value="${e4.value}"]`;
125
- Ce[l2] ? e4.setAttribute("data-tooltip", Ce[l2]) : Ce[n2] && e4.setAttribute("data-tooltip", Ce[n2]);
124
+ const l2 = t2[1], n2 = `${l2}[value="${e4.value}"]`;
125
+ qe[n2] ? e4.setAttribute("data-tooltip", qe[n2]) : qe[l2] && e4.setAttribute("data-tooltip", qe[l2]);
126
126
  }
127
127
  }), e3.querySelectorAll(".ql-picker").forEach((e4) => {
128
128
  const t2 = e4.className.match(/ql-(\w+)/);
129
129
  if (t2) {
130
- const n2 = t2[1];
131
- if (Ce[n2]) {
130
+ const l2 = t2[1];
131
+ if (qe[l2]) {
132
132
  const t3 = e4.querySelector(".ql-picker-label");
133
- t3 && t3.setAttribute("data-tooltip", Ce[n2]);
133
+ t3 && t3.setAttribute("data-tooltip", qe[l2]);
134
134
  }
135
135
  }
136
136
  });
@@ -140,11 +140,11 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
140
140
  e3 && e3.addEventListener("mousedown", (e4) => {
141
141
  e4.preventDefault();
142
142
  });
143
- }(), we(te), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", Le), le.on("text-change", async function(e3) {
144
- if (!le) return;
145
- const t2 = le.root.getElementsByTagName("img");
143
+ }(), Ce(le), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", He), oe.on("text-change", async function(e3) {
144
+ if (!oe) return;
145
+ const t2 = oe.root.getElementsByTagName("img");
146
146
  for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
147
- const t3 = ke(e4.src);
147
+ const t3 = we(e4.src);
148
148
  e4.setAttribute("data-uuid", t3);
149
149
  }
150
150
  if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
@@ -153,47 +153,47 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
153
153
  const t4 = e4.image;
154
154
  if (!t4.startsWith("data:image")) continue;
155
155
  try {
156
- ae.value = true;
157
- const e5 = Ne(t4, "image.png"), n2 = await Me(e5);
158
- if (!le) return;
159
- const l2 = le.root.getElementsByTagName("img");
160
- for (const e6 of l2) e6.src === t4 && (e6.width = 300, e6.src = n2.url, e6.setAttribute("data-uuid", n2.uuid));
156
+ re.value = true;
157
+ const e5 = Re(t4, "image.png"), l2 = await Ne(e5);
158
+ if (!oe) return;
159
+ const n2 = oe.root.getElementsByTagName("img");
160
+ for (const e6 of n2) e6.src === t4 && (e6.width = 300, e6.src = l2.url, e6.setAttribute("data-uuid", l2.uuid));
161
161
  } catch (e5) {
162
- console.error("上传图片失败", e5), Ee();
162
+ console.error("上传图片失败", e5), Ae();
163
163
  } finally {
164
- ae.value = false;
164
+ re.value = false;
165
165
  }
166
166
  }
167
167
  }
168
168
  !function() {
169
- se && clearTimeout(se);
170
- se = setTimeout(() => {
171
- if (!le) return;
172
- const e4 = le.root.innerHTML;
173
- C(G, I, e4), e4 && (P.value = "");
169
+ ce && clearTimeout(ce);
170
+ ce = setTimeout(() => {
171
+ if (!oe) return;
172
+ const e4 = oe.root.innerHTML;
173
+ q(I, K, e4), e4 && (G.value = "");
174
174
  }, 300);
175
- }(), Se();
176
- }), Se(), xe = le.container, xe.addEventListener("click", He), me(), o(() => {
177
- const e3 = w(G, I);
178
- q(e3, W.pageContext, W.configure, { formItemRef: he.value, componentRef: be.value, titleRef: ye.value, value: e3, entity: W.pageContext.entity.data, pageData: W.pageContext.entity.page });
175
+ }(), Ee();
176
+ }), Ee(), ke = oe.container, ke.addEventListener("click", Me), ve(), o(() => {
177
+ const e3 = C(I, K);
178
+ T(e3, P.pageContext, P.configure, { formItemRef: be.value, componentRef: ye.value, titleRef: xe.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
179
179
  }));
180
- }), l(() => {
181
- document.addEventListener("keydown", Ae);
180
+ }), n(() => {
181
+ document.addEventListener("keydown", Le);
182
182
  }), i(() => {
183
- document.removeEventListener("keydown", Ae), se && clearTimeout(se), ne.value && ne.value.removeEventListener("focusout", Le), xe && xe.removeEventListener("click", He);
184
- }), z2({ addRequiredClass: function() {
185
- P.value = L();
183
+ document.removeEventListener("keydown", Le), ce && clearTimeout(ce), ne.value && ne.value.removeEventListener("focusout", He), ke && ke.removeEventListener("click", Me);
184
+ }), B2({ addRequiredClass: function() {
185
+ G.value = H();
186
186
  }, setContent: function(e3) {
187
- we(e3), Se();
187
+ Ce(e3), Ee();
188
188
  }, getContent: function() {
189
- return le ? le.root.innerHTML : "";
189
+ return oe ? oe.root.innerHTML : "";
190
190
  } }), (e3, t2) => {
191
- const n2 = a("View"), l2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), y2 = a("el-form-item"), x2 = a("el-image-viewer"), k2 = a("el-dialog");
192
- return u(), r(s, null, [c(y2, { required: X.value.required, class: m(v(Y) + (P.value ? " " + P.value : "")), "label-width": X.value.labelWidth, style: f(v(O)) }, { label: g(() => [X.value.tittleShow ? (u(), r("div", { key: 0, style: f({ ...v(J), ...v(Q) }) }, b(v(E)(X.value.title)), 5)) : p("", true)]), default: g(() => [h("div", { class: m(["richtext-wrapper", { "is-fullscreen": oe.value }]) }, [h("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), h("div", N, [h("button", { type: "button", class: "toolbar-btn", onClick: Te, title: "预览" }, [c(l2, null, { default: g(() => [c(n2)]), _: 1 })]), h("button", { type: "button", class: "toolbar-btn", onClick: qe, title: oe.value ? "退出全屏" : "全屏编辑" }, [oe.value ? (u(), d(l2, { key: 1 }, { default: g(() => [c(i2)]), _: 1 })) : (u(), d(l2, { key: 0 }, { default: g(() => [c(o2)]), _: 1 }))], 8, R)]), h("div", _, [h("span", j, "字数:" + b(ie.value), 1)]), ae.value ? (u(), r("div", V, [...t2[2] || (t2[2] = [h("div", { class: "loading-spinner" }, null, -1), h("span", null, "图片上传中...", -1)])])) : p("", true)], 2)]), _: 1 }, 8, ["required", "class", "label-width", "style"]), ge.value ? (u(), d(x2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
193
- ge.value = false;
194
- }), "url-list": ve.value }, null, 8, ["url-list"])) : p("", true), c(k2, { modelValue: re.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => re.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: g(() => [h("div", { class: "richtext-preview-content ql-editor", innerHTML: ue.value }, null, 8, $)]), _: 1 }, 8, ["modelValue"])], 64);
191
+ const l2 = a("View"), n2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), x2 = a("el-form-item"), k2 = a("el-image-viewer"), w2 = a("el-dialog");
192
+ return u(), r(s, null, [c(x2, { required: Z.value.required, class: m(v(J) + (G.value ? " " + G.value : "")), "label-width": Z.value.labelWidth, style: f(v(Y)) }, g({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": ie.value }]) }, [b("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), b("div", R, [b("button", { type: "button", class: "toolbar-btn", onClick: Se, title: "预览" }, [c(n2, null, { default: h(() => [c(l2)]), _: 1 })]), b("button", { type: "button", class: "toolbar-btn", onClick: Te, title: ie.value ? "退出全屏" : "全屏编辑" }, [ie.value ? (u(), d(n2, { key: 1 }, { default: h(() => [c(i2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: h(() => [c(o2)]), _: 1 }))], 8, _)]), b("div", j, [b("span", V, "字数:" + y(ae.value), 1)]), re.value ? (u(), r("div", $, [...t2[2] || (t2[2] = [b("div", { class: "loading-spinner" }, null, -1), b("span", null, "图片上传中...", -1)])])) : p("", true)], 2)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: h(() => [b("div", { style: f({ ...v(Q), ...v(X) }), class: "amb-form-item-label" }, y(v(A)(Z.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]), he.value ? (u(), d(k2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
193
+ he.value = false;
194
+ }), "url-list": ge.value }, null, 8, ["url-list"])) : p("", true), c(w2, { modelValue: ue.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ue.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: h(() => [b("div", { class: "richtext-preview-content ql-editor", innerHTML: se.value }, null, 8, z)]), _: 1 }, 8, ["modelValue"])], 64);
195
195
  };
196
196
  } });
197
197
  export {
198
- z as default
198
+ B as default
199
199
  };
@@ -1,7 +1,7 @@
1
1
  import e from "./select-runtime.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = t(e, [["__scopeId", "data-v-68808d47"]]);
4
+ const r = t(e, [["__scopeId", "data-v-f0e9b5f0"]]);
5
5
  export {
6
6
  r as default
7
7
  };