super-page-runtime 2.3.16 → 2.3.17-sit2

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 (76) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +66 -61
  2. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +2 -1
  3. package/dist/es/components/runtime/utils/charts/chart-util.js +5 -5
  4. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  5. package/dist/es/components/runtime/utils/events/print-label.js +25 -26
  6. package/dist/es/components/runtime/utils/events/standard-event.js +19 -19
  7. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  8. package/dist/es/components/runtime/utils/events/validator-util.js +173 -167
  9. package/dist/es/components/runtime/utils/page-init-util.js +129 -100
  10. package/dist/es/components/runtime/utils/page-store.js +10 -10
  11. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  12. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
  13. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
  14. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
  15. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
  16. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
  17. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +1 -1
  18. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +2 -2
  19. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  20. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  21. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
  22. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +1 -1
  23. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +2 -2
  24. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
  25. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +2 -2
  26. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +1 -1
  27. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +2 -2
  28. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +1 -1
  29. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +2 -2
  30. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +93 -98
  31. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -4
  32. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  33. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
  35. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
  36. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
  37. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
  38. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
  39. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
  40. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +1 -1
  41. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
  42. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  43. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +8 -8
  44. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +72 -72
  45. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
  46. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
  47. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +33 -19
  48. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
  49. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
  50. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +37 -37
  51. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
  52. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
  53. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +4 -4
  54. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
  55. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +37 -38
  56. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +4 -1
  57. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +21 -22
  58. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -4
  59. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +27 -18
  60. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -1
  61. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +167 -94
  62. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +25 -25
  63. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
  64. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
  65. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
  66. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
  67. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
  68. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +74 -58
  69. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
  70. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
  71. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  72. package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
  73. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  74. package/dist/es/components/runtime/views/super-page.vue2.js +73 -74
  75. package/dist/es/style.css +379 -84
  76. package/package.json +2 -2
@@ -1,35 +1,34 @@
1
- import { defineComponent as e, ref as t, computed as l, onMounted as u, nextTick as a, resolveComponent as n, createElementBlock as i, createBlock as o, openBlock as s, normalizeStyle as p, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, withCtx as y, createCommentVNode as g, createTextVNode as x } from "vue";
2
- import { getFormModelFields as d } from "../../../../utils/page-init-util.js";
3
- import { getVariableValue as m, formatValueByType as h } from "../../../../utils/page-helper-util.js";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as u, createElementBlock as i, createBlock as o, openBlock as s, normalizeStyle as p, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, withCtx as y, createCommentVNode as g, createTextVNode as m } from "vue";
2
+ import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
+ import { getVariableValue as d, formatValueByType as h } from "../../../../utils/page-helper-util.js";
4
4
  import { SuperIcon as k } from "agilebuilder-ui";
5
5
  import { getCustomFunc as w, handleAfterInitEvent as T, handleFormEvent as C } from "../../../../utils/events/event-util.js";
6
6
  import { $t as _ } from "../../../../utils/i18n-util.js";
7
- const I = { style: { width: "100%", "text-align": "center", "font-weight": "700", "font-size": "24px", "margin-bottom": "20px" } }, b = { style: { overflow: "hidden", "white-space": "nowrap" } }, V = ["title"], j = e({ __name: "label-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
7
+ const I = { style: { width: "100%", "text-align": "center", "font-weight": "700", "font-size": "24px" } }, b = { style: { overflow: "hidden", "white-space": "nowrap" } }, V = ["title"], j = e({ __name: "label-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
8
8
  const R = e2, S = R.pageContext.entity ? R.pageContext.entity : {};
9
- let P = d(R.pageContext, R.configure);
10
- const q = R.configure.runtime ? R.configure.runtime : {}, O = q.style, z = q.class, D = q.headerStyle, E = q.appendClass, F = q.appendStyle, W = q.titleExceedStyle, A = t(q.props ? q.props : {}), B = t(A.value.options ? A.value.options : []), G = A.value.formatType;
11
- A.value;
12
- const H = l(() => {
13
- let e3 = m(S, P);
14
- if (G) if (A.value.hasOptions) {
9
+ let P = x(R.pageContext, R.configure);
10
+ const q = R.configure.runtime ? R.configure.runtime : {}, O = q.style, A = q.class, z = q.headerStyle, D = q.appendClass, E = q.appendStyle, F = q.titleExceedStyle, N = t(q.props ? q.props : {});
11
+ const W = t(N.value.options ? N.value.options : []), B = N.value.formatType, G = l(() => {
12
+ let e3 = d(S, P);
13
+ if (B) if (N.value.hasOptions) {
15
14
  let t2 = null;
16
- B.value && (t2 = B.value.filter((t3) => t3.value == e3)), t2 && t2.length > 0 && (e3 = t2[0].label);
17
- } else if ("custom" === G) {
18
- const t2 = w(R.pageContext, A.value.formatFunc);
15
+ W.value && (t2 = W.value.filter((t3) => t3.value == e3)), t2 && t2.length > 0 && (e3 = t2[0].label);
16
+ } else if ("custom" === B) {
17
+ const t2 = w(R.pageContext, N.value.formatFunc);
19
18
  t2 && (e3 = t2.apply(t2, [{ pageContext: R.pageContext, configureObj: R.configure, value: e3 }]));
20
- } else e3 = h(e3, G, A.value);
19
+ } else e3 = h(e3, B, N.value);
21
20
  return e3 = null == e3 ? "" : e3, e3;
22
- }), J = t(null), K = t(null), L = t(null);
23
- return u(() => {
21
+ }), H = t(null), J = t(null), K = t(null);
22
+ return n(() => {
24
23
  a(() => {
25
- const e3 = H.value;
26
- T(e3, R.pageContext, R.configure, { formItemRef: J.value, componentRef: K.value, titleRef: L.value, value: e3, entity: R.pageContext.entity.data, pageData: R.pageContext.entity.page });
24
+ const e3 = G.value;
25
+ T(e3, R.pageContext, R.configure, { formItemRef: H.value, componentRef: J.value, titleRef: K.value, value: e3, entity: R.pageContext.entity.data, pageData: R.pageContext.entity.page });
27
26
  });
28
27
  }), j2({ updateOptions: function(e3) {
29
- B.value = e3 || [];
30
- } }), (t2, l2) => {
31
- const u2 = n("el-form-item");
32
- return A.value.whetherTittle ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: p(f(O)) }, [c("div", I, v(A.value.title), 1)], 6)) : A.value.tittleShow ? (s(), o(u2, { key: 1, ref_key: "formItemRef", ref: J, required: !!A.value.required, class: r(f(z)), "label-width": A.value.labelWidth, style: p(f(O)) }, { label: y(() => [A.value.tittleShow ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: L, style: p({ ...f(D), ...f(W) }) }, v(f(_)(A.value.title)), 5)) : g("", true)]), default: y(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: K, onClick: l2[0] || (l2[0] = (t3) => f(C)(t3, e2.pageContext, e2.configure, "click")) }, [c("span", b, [A.value.preIconValue || A.value.preText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }), style: p(f(F)) }, [A.value.preIconType && A.value.preIconValue ? (s(), o(f(k), { key: 0, iconType: A.value.preIconType, iconValue: A.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), x(" " + v(f(_)(A.value.preText)), 1)], 6)) : g("", true), x("  " + v(H.value), 1)]), A.value.sufIconValue || A.value.sufText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }) }, [A.value.sufIconType && A.value.sufIconValue ? (s(), o(f(k), { key: 0, style: {}, iconType: A.value.sufIconType, iconValue: A.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), c("span", null, " " + v(f(_)(A.value.sufText)), 1)], 2)) : g("", true)], 512)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (s(), i("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: l2[1] || (l2[1] = (t3) => f(C)(t3, e2.pageContext, e2.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: H.value }, v(A.value.prefixIcon) + " " + v(H.value), 9, V), A.value.suffixTxt ? (s(), i("span", { key: 0, class: r(f(E)), style: p(f(F)) }, v(A.value.suffixTxt), 7)) : g("", true)]));
28
+ W.value = e3 || [];
29
+ } }), (e3, t2) => {
30
+ const l2 = u("el-form-item");
31
+ return N.value.whetherTittle ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: K, class: r(f(A)), style: p(f(O)) }, [c("div", I, v(N.value.title), 1)], 6)) : N.value.tittleShow ? (s(), o(l2, { key: 1, ref_key: "formItemRef", ref: H, required: !!N.value.required, class: r([f(A), N.value.contentAlign ? "form-item-align-" + N.value.contentAlign : "formNo" === N.value.showType ? "form-item-align-right" : ""]), "label-width": N.value.labelWidth, style: p(f(O)) }, { label: y(() => [N.value.tittleShow ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: K, style: p({ ...f(z), ...f(F) }) }, v(f(_)(N.value.title)), 5)) : g("", true)]), default: y(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: J, onClick: t2[0] || (t2[0] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", b, [N.value.preIconValue || N.value.preText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != N.value.iconPosition, "el-input-group__append": "outer" == N.value.iconPosition }), style: p(f(E)) }, [N.value.preIconType && N.value.preIconValue ? (s(), o(f(k), { key: 0, iconType: N.value.preIconType, iconValue: N.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + v(f(_)(N.value.preText)), 1)], 6)) : g("", true), m("  " + v(G.value), 1)]), N.value.sufIconValue || N.value.sufText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != N.value.iconPosition, "el-input-group__append": "outer" == N.value.iconPosition }) }, [N.value.sufIconType && N.value.sufIconValue ? (s(), o(f(k), { key: 0, style: {}, iconType: N.value.sufIconType, iconValue: N.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), c("span", null, " " + v(f(_)(N.value.sufText)), 1)], 2)) : g("", true)], 512)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (s(), i("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: t2[1] || (t2[1] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: G.value }, v(N.value.prefixIcon) + " " + v(G.value), 9, V), N.value.suffixTxt ? (s(), i("span", { key: 0, class: r(f(D)), style: p(f(E)) }, v(N.value.suffixTxt), 7)) : g("", true)]));
33
32
  };
34
33
  } });
35
34
  export {
@@ -5,7 +5,6 @@ import { handleAfterInitEvent as k, handleEvent as x } from "../../../../utils/e
5
5
  import { $t as C } from "../../../../utils/i18n-util.js";
6
6
  const _ = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
7
7
  const _2 = e2, h = y(_2.pageContext, _2.configure), R = _2.configure.runtime ? _2.configure.runtime : {}, j = R.style, w = R.class, I = R.headerStyle, S = t(R.props ? R.props : {});
8
- S.value;
9
8
  let $ = S.value.formatting;
10
9
  const D = _2.pageContext.entity ? _2.pageContext.entity : {}, V = l(() => {
11
10
  let e3 = b(D, h);
@@ -22,9 +21,9 @@ const _ = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} },
22
21
  const e3 = V.value;
23
22
  k(e3, _2.pageContext, _2.configure, { formItemRef: z.value, componentRef: A.value, titleRef: B.value, value: e3, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
24
23
  });
25
- }), (t2, l2) => {
26
- const n2 = i("el-link"), a2 = i("el-tooltip"), y2 = i("el-form-item");
27
- return o(), u(y2, { ref_key: "formItemRef", ref: z, class: s(p(w)), "label-width": S.value.labelWidth, style: r(p(j)) }, { label: f(() => [S.value.tittleShow ? (o(), g("div", { key: 0, ref_key: "titleRef", ref: B, style: r({ ...p(I) }) }, m(p(C)(S.value.title)), 5)) : v("", true)]), default: f(() => [c(a2, { disabled: !p(q), content: p(q) }, { default: f(() => [c(n2, { ref_key: "componentRef", ref: A, disabled: "disabled" === S.value.state, type: S.value.type, underline: S.value.underline, onClick: l2[0] || (l2[0] = (t3) => p(x)(t3, e2.pageContext, e2.configure, "click", { skipValidate: true })) }, { default: f(() => [d(m(V.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 1 }, 8, ["class", "label-width", "style"]);
24
+ }), (e3, t2) => {
25
+ const l2 = i("el-link"), n2 = i("el-tooltip"), a2 = i("el-form-item");
26
+ return o(), u(a2, { ref_key: "formItemRef", ref: z, class: s(p(w)), "label-width": S.value.labelWidth, style: r(p(j)) }, { label: f(() => [S.value.tittleShow ? (o(), g("div", { key: 0, ref_key: "titleRef", ref: B, style: r({ ...p(I) }) }, m(p(C)(S.value.title)), 5)) : v("", true)]), default: f(() => [c(n2, { disabled: !p(q), content: p(q) }, { default: f(() => [c(l2, { ref_key: "componentRef", ref: A, disabled: "disabled" === S.value.state, type: S.value.type, underline: S.value.underline, onClick: t2[0] || (t2[0] = (t3) => p(x)(t3, e3.pageContext, e3.configure, "click", { skipValidate: true })) }, { default: f(() => [d(m(V.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 1 }, 8, ["class", "label-width", "style"]);
28
27
  };
29
28
  } });
30
29
  export {
@@ -1,18 +1,18 @@
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 p, normalizeClass as f, unref as c, withCtx as g, createVNode as d, createElementBlock as v, Fragment as m, renderList as h, createTextVNode as y, toDisplayString as C, createCommentVNode as b } from "vue";
2
- import { setVariableValue as x, getVariableValue as k, getOptionDatasFromPage as _, autoSetAfterSelect as R, queryOptionDatasources as S } from "../../../../utils/page-helper-util.js";
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
3
  import { getFormModelFields as j } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent as T, handleAfterInitEvent as q } from "../../../../utils/events/event-util.js";
5
- import { $t as I } from "../../../../utils/i18n-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
6
  import { addRequiredClassUtil as V } from "../../../../utils/common-util.js";
7
7
  const w = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: w2 }) {
8
8
  const z = e2, O = t(null), D = z.pageContext.entity ? z.pageContext.entity : {};
9
- let M = j(z.pageContext, z.configure);
10
- const P = l({ get() {
11
- let e3 = k(D, M);
9
+ let E = j(z.pageContext, z.configure);
10
+ const M = l({ get() {
11
+ let e3 = k(D, E);
12
12
  return null != e3 && (e3 += ""), e3;
13
13
  }, set(e3) {
14
- x(D, M, e3), null != e3 && (O.value = "");
15
- } }), W = z.configure.runtime ? z.configure.runtime : {}, E = W.style, F = W.class, U = W.headerStyle, $ = W.titleExceedStyle, A = t(W.props ? W.props : {}), B = t(A.value.options ? A.value.options : []), G = _(z.pageContext, z.configure);
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
16
  G.length > 0 && (B.value = G);
17
17
  const H = z.configure.props && z.configure.props.dataOrigin ? z.configure.props.dataOrigin : {}, J = H.optionValueSetType;
18
18
  let K = [];
@@ -20,7 +20,7 @@ const w = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }
20
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
21
  if (K.length > 0) {
22
22
  let t2 = null;
23
- B.value && null != e3 && null != e3 && (t2 = B.value.filter((t3) => e3 === t3.value)), R(z.configure, z.pageContext, K, t2);
23
+ B.value && null != e3 && null != e3 && (t2 = B.value.filter((t3) => e3 === t3.value)), S(z.configure, z.pageContext, K, t2);
24
24
  }
25
25
  T(e3, z.pageContext, z.configure, "change");
26
26
  };
@@ -46,7 +46,7 @@ const w = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }
46
46
  function ee() {
47
47
  Y && clearTimeout(Y), Y = setTimeout(function() {
48
48
  const e3 = Q();
49
- e3 != X && (X = e3, S(z.pageContext, Z, void 0).then((e4) => {
49
+ e3 != X && (X = e3, R(z.pageContext, Z, void 0).then((e4) => {
50
50
  }));
51
51
  }, 200);
52
52
  }
@@ -54,18 +54,27 @@ const w = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }
54
54
  Y && clearTimeout(Y);
55
55
  });
56
56
  const te = t(null), le = t(null), oe = t(null);
57
- return a(() => {
58
- u(() => {
59
- const e3 = P.value;
60
- q(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 });
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 });
61
61
  });
62
62
  }), w2({ updateOptions: function(e3) {
63
63
  B.value = e3 || [];
64
64
  }, addRequiredClass: function() {
65
65
  O.value = V();
66
- } }), (t2, l2) => {
67
- const o2 = i("el-radio"), n2 = i("el-radio-group"), a2 = i("el-form-item");
68
- return s(), r(a2, { ref_key: "formItemRef", ref: te, required: A.value.required, class: f(c(F) + (O.value ? " " + O.value : "")), "label-width": A.value.labelWidth, style: p(c(E)) }, { label: g(() => [A.value.tittleShow ? (s(), v("div", { key: 0, ref_key: "titleRef", ref: oe, style: p({ ...c(U), ...c($) }) }, C(c(I)(A.value.title)), 5)) : b("", true)]), default: g(() => [d(n2, { ref_key: "componentRef", ref: le, disabled: "disabled" === A.value.state, size: A.value.size, onChange: A.value.changeMethod, modelValue: P.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => P.value = e3) }, { default: g(() => [(s(true), v(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: P.value }) }, { default: g(() => [y(C(t3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
66
+ }, getSelectItemsTitle: function() {
67
+ let e3 = k(D, E);
68
+ if (null == e3) return "";
69
+ if (e3 = String(e3), null != e3 && "" !== e3 && e3.length > 0) {
70
+ let t2 = "";
71
+ return B.value.length > 0 ? (B.value.forEach((l2) => {
72
+ l2.value === e3 && (t2 = t2 + l2.label + ",");
73
+ }), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
74
+ }
75
+ } }), (e3, t2) => {
76
+ const l2 = i("el-radio"), o2 = i("el-radio-group"), n2 = i("el-form-item");
77
+ return s(), r(n2, { 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(o2, { ref_key: "componentRef", ref: le, disabled: "disabled" === A.value.state, size: A.value.size, onChange: A.value.changeMethod, modelValue: M.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => M.value = e4) }, { default: g(() => [(s(true), d(m, null, h(B.value, (t3) => (s(), r(l2, { key: t3.value, label: t3.value, onClick: (l3) => c(T)(t3.value, e3.pageContext, e3.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"]);
69
78
  };
70
79
  } });
71
80
  export {
@@ -1,7 +1,8 @@
1
1
  import t from "./richtext-runtime.vue2.js";
2
2
  /* empty css */
3
+ /* empty css */
3
4
  import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = e(t, [["__scopeId", "data-v-aae764b5"]]);
5
+ const r = e(t, [["__scopeId", "data-v-fd10cc69"]]);
5
6
  export {
6
7
  r as default
7
8
  };
@@ -1,124 +1,197 @@
1
- import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as i, onBeforeUnmount as o, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as g, normalizeStyle as p, normalizeClass as m, unref as f, withCtx as h, createElementVNode as v, toDisplayString as y } from "vue";
2
- import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
- import { getSizeConfig as b, formatVariableValue as C, setVariableValue as w, getVariableValue as k } from "../../../../utils/page-helper-util.js";
4
- import q 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, 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";
5
9
  import "quill/dist/quill.snow.css";
6
- import { handleAfterInitEvent as T, handleFormEvent as E } from "../../../../utils/events/event-util.js";
7
- import A from "agilebuilder-ui/src/utils/request";
8
- import { $t as L } from "../../../../utils/i18n-util.js";
9
- import { getBaseUrl as R, addRequiredClassUtil as S } from "../../../../utils/common-util.js";
10
- const j = { style: { width: "100%", height: "100%" } }, H = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: H2 }) {
11
- const B = e2, N = t(null), _ = B.pageContext.entity ? B.pageContext.entity : {}, M = x(B.pageContext, B.configure), U = B.configure.runtime ? B.configure.runtime : {}, W = U.style, $ = U.class, z = U.headerStyle, D = U.titleExceedStyle, F = t(U.props ? U.props : {});
12
- let P = b(B.pageContext, B.configure);
13
- P && P.fixHeight && (W.height || (W.height = P.fixHeight + "px"));
14
- let I = F.value.value;
15
- const O = C(B.pageContext, I), G = t(null);
16
- let J = null;
17
- t(null);
18
- let K = F.value.state;
19
- function Q(e3) {
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), le = t(null);
21
+ let ne = 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) {
20
25
  return "readonly" == e3 || "disabled" == e3;
21
26
  }
22
- const V = Q(K), X = 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: ["small", false, "large", "huge"] }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: [] }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: V ? "" : F.value.placeholder, readOnly: V });
23
- l(F.value, () => {
24
- const e3 = F.value.state;
25
- if (null != e3 && e3 !== K) {
26
- K = e3;
27
- const t2 = Q(K);
28
- J && (J.enable(!t2), J.root.dataset.placeholder = t2 ? "" : F.value.placeholder);
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 (!(ne == null ? void 0 : ne.container)) return;
30
+ const e3 = ne.container.parentNode;
31
+ if (!e3) return;
32
+ const t2 = e3.getBoundingClientRect(), l2 = ne.container.getBoundingClientRect();
33
+ let n2 = t2.height - (l2.top - t2.top);
34
+ ne.container.style.height = Math.max(n2, 100) + "px";
35
+ }
36
+ l(X.value, () => {
37
+ const e3 = X.value.state;
38
+ if (null != e3 && e3 !== ce) {
39
+ ce = e3;
40
+ const t2 = de(ce);
41
+ ne && (ne.enable(!t2), ne.root.dataset.placeholder = t2 ? "" : X.value.placeholder);
29
42
  }
30
43
  });
31
- const Y = t([]), Z = t(false), ee = t(null), te = t(null), le = t(null);
32
- let ne;
33
- function ie(e3) {
44
+ const ve = t([]), ge = t(false), he = t(null), be = t(null), ye = t(null);
45
+ let xe = null;
46
+ function ke(e3) {
34
47
  const t2 = e3.match(/serverPath=([^&"]+)/);
35
48
  return t2 ? t2[1] : "";
36
49
  }
37
- function oe(e3) {
50
+ function we(e3) {
51
+ if (!ne) return;
52
+ const t2 = function(e4) {
53
+ let t3 = e4.replace(/<img data-uuid="(.*?)"/g, (e5, t4) => {
54
+ const l3 = ke(t4), n2 = W.pageContext.backendUrl;
55
+ return `<img src="${A(n2, W.pageContext.isTest)}/common/fs-upload/download?serverPath=${l3}&isShowWatermark=false" data-uuid="${l3}"`;
56
+ });
57
+ return t3 = t3.replace(/\t/g, "    "), t3 = t3.replace(/ {2}/g, "  "), t3;
58
+ }(e3), l2 = ne.clipboard.convertHTML(t2);
59
+ ne.setContents(l2.ops), o(() => {
60
+ if (!ne) return;
61
+ ne.root.querySelectorAll("img").forEach((e4) => {
62
+ if (!e4.getAttribute("data-uuid")) {
63
+ const t3 = ke(e4.src);
64
+ e4.setAttribute("data-uuid", t3);
65
+ }
66
+ });
67
+ });
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
+ me();
73
+ });
74
+ }
75
+ function Te() {
76
+ ne && (ue.value = ne.root.innerHTML, re.value = true);
77
+ }
78
+ function Se() {
79
+ if (!ne) return void (ie.value = 0);
80
+ const e3 = ne.getText().trim();
81
+ ie.value = e3.length;
82
+ }
83
+ function Ee() {
84
+ M.error({ message: "图片上传失败,请重试", duration: 3e3 });
85
+ }
86
+ function Ae(e3) {
87
+ "Escape" === e3.key && oe.value && (oe.value = false);
88
+ }
89
+ function Le(e3) {
38
90
  var _a;
39
- null !== e3.relatedTarget && ((_a = G.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || E(J.root.innerHTML, B.pageContext, B.configure, "change", { entity: _ });
91
+ ne && (null !== e3.relatedTarget && ((_a = le.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || T(ne.root.innerHTML, W.pageContext, W.configure, "change", { entity: G }));
40
92
  }
41
- function ae(e3) {
93
+ function He(e3) {
42
94
  if ("img" === e3.target.localName) {
43
- Y.value = [];
95
+ ve.value = [];
44
96
  let t2 = e3.target.src;
45
- Y.value.push(t2), Z.value = true;
97
+ ve.value.push(t2), ge.value = true;
46
98
  }
47
99
  }
48
- function re(e3) {
100
+ function Me(e3) {
49
101
  const t2 = new FormData();
50
102
  t2.append("file", e3);
51
- const l2 = B.pageContext.backendUrl, n2 = R(l2, B.pageContext.isTest);
52
- return A.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
103
+ const l2 = W.pageContext.backendUrl, n2 = A(l2, W.pageContext.isTest);
104
+ return S.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
53
105
  }
54
- function ue(e3, t2) {
55
- let l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/)[1], i2 = atob(l2[1]), o2 = i2.length, a2 = new Uint8Array(o2);
56
- for (; o2--; ) a2[o2] = i2.charCodeAt(o2);
57
- return new File([a2], t2, { type: n2 });
106
+ function Ne(e3, t2) {
107
+ const l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/), o2 = n2 ? n2[1] : "image/png", i2 = atob(l2[1]);
108
+ let a2 = i2.length;
109
+ const r2 = new Uint8Array(a2);
110
+ for (; a2--; ) r2[a2] = i2.charCodeAt(a2);
111
+ return new File([r2], t2, { type: o2 });
58
112
  }
59
113
  return n(() => {
60
114
  var _a;
61
- J = new q(G.value, X.value), J.root.style.fontSize = "16px";
62
- let e3 = O;
63
- e3 = e3.replace(/<img data-uuid="(.*?)"/g, (e4, t3) => {
64
- const l2 = ie(t3), n2 = B.pageContext.backendUrl;
65
- return `<img src="${R(n2, B.pageContext.isTest)}/common/fs-upload/download?serverPath=${l2}&isShowWatermark=false" data-uuid="${l2}"`;
66
- });
67
- const t2 = J.clipboard.convertHTML(e3);
68
- J.setContents(t2.ops), i(() => {
69
- J.root.querySelectorAll("img").forEach((e4) => {
70
- if (!e4.getAttribute("data-uuid")) {
71
- const t3 = ie(e4.src);
72
- e4.setAttribute("data-uuid", t3);
115
+ le.value && (ne = new H(le.value, fe.value), ne.root.style.fontSize = "16px", function() {
116
+ var _a2, _b;
117
+ const e3 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
118
+ if (!e3) return;
119
+ e3.querySelectorAll("button").forEach((e4) => {
120
+ const t2 = e4.className.match(/ql-([\w-]+)/);
121
+ if (t2) {
122
+ const l2 = t2[1], n2 = `${l2}[value="${e4.value}"]`;
123
+ Ce[n2] ? e4.setAttribute("data-tooltip", Ce[n2]) : Ce[l2] && e4.setAttribute("data-tooltip", Ce[l2]);
124
+ }
125
+ }), e3.querySelectorAll(".ql-picker").forEach((e4) => {
126
+ const t2 = e4.className.match(/ql-(\w+)/);
127
+ if (t2) {
128
+ const l2 = t2[1];
129
+ if (Ce[l2]) {
130
+ const t3 = e4.querySelector(".ql-picker-label");
131
+ t3 && t3.setAttribute("data-tooltip", Ce[l2]);
132
+ }
73
133
  }
74
134
  });
75
- }), (_a = G.value) == null ? void 0 : _a.addEventListener("focusout", oe), J.on("text-change", async function(e4, t3, l2) {
76
- const n2 = J.root.getElementsByTagName("img");
77
- for (let e5 of n2) if (!e5.getAttribute("data-uuid")) {
78
- const t4 = ie(e5.src);
79
- e5.setAttribute("data-uuid", t4);
135
+ }(), function() {
136
+ var _a2, _b;
137
+ const e3 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
138
+ e3 && e3.addEventListener("mousedown", (e4) => {
139
+ e4.preventDefault();
140
+ });
141
+ }(), we(te), (_a = le.value) == null ? void 0 : _a.addEventListener("focusout", Le), ne.on("text-change", async function(e3) {
142
+ if (!ne) return;
143
+ const t2 = ne.root.getElementsByTagName("img");
144
+ for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
145
+ const t3 = ke(e4.src);
146
+ e4.setAttribute("data-uuid", t3);
80
147
  }
81
- if (e4.ops && e4.ops.length > 0) for (let t4 = 0; t4 < e4.ops.length; t4++) {
82
- const l3 = e4.ops[t4];
83
- if (l3.insert && l3.insert.image) {
84
- const e5 = l3.insert.image;
85
- if (!e5.startsWith("data:image")) return;
86
- const t5 = ue(e5, "image.png");
87
- await re(t5).then((t6) => {
88
- if (!J) return;
89
- const l4 = J.root.getElementsByTagName("img");
90
- if (l4 && l4.length > 0) for (let n3 = 0; n3 < l4.length; n3++) {
91
- const i3 = l4[n3];
92
- i3.src === e5 && (i3.width = 300, i3.src = t6.url, i3.setAttribute("data-uuid", t6.uuid));
93
- }
94
- }).catch((e6) => {
95
- console.error(e6, "上传图片失败");
96
- });
148
+ if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
149
+ const e4 = t3.insert;
150
+ if (e4 == null ? void 0 : e4.image) {
151
+ const t4 = e4.image;
152
+ if (!t4.startsWith("data:image")) continue;
153
+ try {
154
+ ae.value = true;
155
+ const e5 = Ne(t4, "image.png"), l2 = await Me(e5);
156
+ if (!ne) return;
157
+ const n2 = ne.root.getElementsByTagName("img");
158
+ for (const e6 of n2) e6.src === t4 && (e6.width = 300, e6.src = l2.url, e6.setAttribute("data-uuid", l2.uuid));
159
+ } catch (e5) {
160
+ Ee();
161
+ } finally {
162
+ ae.value = false;
163
+ }
97
164
  }
98
165
  }
99
- const i2 = J.root.innerHTML;
100
- w(_, M, i2), null != i2 && "" !== i2 && (N.value = "");
101
- }), ne = J.container, ne.addEventListener("click", ae), function() {
102
- if (J && J.container) {
103
- const e4 = J.container.parentNode.getBoundingClientRect(), t3 = J.container.getBoundingClientRect();
104
- let l2 = e4.height - (t3.top - e4.top);
105
- l2 < 100 && (l2 = 100), J.container.style.height = l2 + "px";
106
- }
107
- }(), i(() => {
108
- const e4 = k(_, M);
109
- T(e4, B.pageContext, B.configure, { formItemRef: ee.value, componentRef: te.value, titleRef: le.value, value: e4, entity: B.pageContext.entity.data, pageData: B.pageContext.entity.page });
110
- });
111
- }), o(() => {
112
- G.value && G.value.removeEventListener("focusout", oe), ne && ne.removeEventListener("click", ae);
113
- }), H2({ addRequiredClass: function() {
114
- N.value = S();
166
+ !function() {
167
+ se && clearTimeout(se);
168
+ se = setTimeout(() => {
169
+ if (!ne) return;
170
+ const e4 = ne.root.innerHTML;
171
+ C(G, I, e4), e4 && (P.value = "");
172
+ }, 300);
173
+ }(), Se();
174
+ }), Se(), xe = ne.container, xe.addEventListener("click", He), me(), o(() => {
175
+ const e3 = w(G, I);
176
+ 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 });
177
+ }));
178
+ }), n(() => {
179
+ document.addEventListener("keydown", Ae);
180
+ }), i(() => {
181
+ document.removeEventListener("keydown", Ae), se && clearTimeout(se), le.value && le.value.removeEventListener("focusout", Le), xe && xe.removeEventListener("click", He);
182
+ }), z2({ addRequiredClass: function() {
183
+ P.value = L();
184
+ }, setContent: function(e3) {
185
+ we(e3), Se();
186
+ }, getContent: function() {
187
+ return ne ? ne.root.innerHTML : "";
115
188
  } }), (e3, t2) => {
116
- const l2 = a("el-form-item"), n2 = a("el-image-viewer");
117
- return u(), r(s, null, [c(l2, { required: F.value.required, class: m(f($) + (N.value ? " " + N.value : "")), "label-width": F.value.labelWidth, style: p(f(W)) }, { label: h(() => [F.value.tittleShow ? (u(), r("div", { key: 0, style: p({ ...f(z), ...f(D) }) }, y(f(L)(F.value.title)), 5)) : g("", true)]), default: h(() => [v("div", j, [v("div", { ref_key: "quillEditorRef", ref: G, style: { width: "100%" } }, null, 512)])]), _: 1 }, 8, ["required", "class", "label-width", "style"]), Z.value ? (u(), d(n2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
118
- Z.value = false;
119
- }), "url-list": Y.value }, null, 8, ["url-list"])) : g("", true)], 64);
189
+ const l2 = a("View"), n2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), y2 = a("el-form-item"), x2 = a("el-image-viewer"), k2 = a("el-dialog");
190
+ 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: le, style: { width: "100%" } }, null, 512), h("div", N, [h("button", { class: "toolbar-btn", onClick: Te, title: "预览" }, [c(n2, null, { default: g(() => [c(l2)]), _: 1 })]), h("button", { class: "toolbar-btn", onClick: qe, title: oe.value ? "退出全屏" : "全屏编辑" }, [oe.value ? (u(), d(n2, { key: 1 }, { default: g(() => [c(i2)]), _: 1 })) : (u(), d(n2, { 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] = () => {
191
+ ge.value = false;
192
+ }), "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);
120
193
  };
121
194
  } });
122
195
  export {
123
- H as default
196
+ z as default
124
197
  };
@@ -3,11 +3,11 @@ import { setVariableValue as _, getOptionDatasFromPage as w, queryOptionDatasour
3
3
  import { getFormModelFields as j } from "../../../../utils/page-init-util.js";
4
4
  import { handleFormEvent as A, handleAfterInitEvent as R } from "../../../../utils/events/event-util.js";
5
5
  import V from "../common/title-suffix-element.vue.js";
6
- import { $t as M } from "../../../../utils/i18n-util.js";
7
- import { addRequiredClassUtil as q } from "../../../../utils/common-util.js";
8
- import { CopyDocument as z } from "@element-plus/icons-vue";
9
- import E from "clipboard";
10
- import { ElMessage as I } from "element-plus";
6
+ import { $t as I } from "../../../../utils/i18n-util.js";
7
+ import { addRequiredClassUtil as M } from "../../../../utils/common-util.js";
8
+ import { CopyDocument as q } from "@element-plus/icons-vue";
9
+ import z from "clipboard";
10
+ import { ElMessage as E } from "element-plus";
11
11
  import { useI18n as P } from "vue-i18n";
12
12
  const D = { style: { "padding-left": "5px" } }, O = { style: { float: "left" } }, W = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, B = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
13
13
  const { t: F } = P(), U = e2, $ = t(null), G = U.pageContext.entity ? U.pageContext.entity : {};
@@ -83,26 +83,26 @@ const D = { style: { "padding-left": "5px" } }, O = { style: { float: "left" } }
83
83
  fe && clearTimeout(fe);
84
84
  });
85
85
  const ge = t(null), me = t(null), de = t(null);
86
+ function he() {
87
+ const e3 = ee();
88
+ if (null != e3 && "" !== e3 && e3.length > 0) {
89
+ let t2 = "";
90
+ return "string" == typeof e3 ? le.value.length > 0 ? le.value.forEach((l2) => {
91
+ l2.value === e3 && (t2 = l2.label);
92
+ }) : t2 = e3 : le.value.length > 0 ? (le.value.forEach((l2) => {
93
+ e3.forEach((e4) => {
94
+ l2.value === e4 && (t2 = t2 + l2.label + ",");
95
+ });
96
+ }), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
97
+ }
98
+ }
86
99
  return u(() => {
87
- const e3 = new E("#" + Z, { text: function() {
88
- return function() {
89
- const e4 = ee();
90
- if (null != e4 && "" !== e4 && e4.length > 0) {
91
- let t2 = "";
92
- return "string" == typeof e4 ? le.value.length > 0 ? le.value.forEach((l2) => {
93
- l2.value === e4 && (t2 = l2.label);
94
- }) : t2 = e4 : le.value.length > 0 ? (le.value.forEach((l2) => {
95
- e4.forEach((e5) => {
96
- l2.value === e5 && (t2 = t2 + l2.label + ",");
97
- });
98
- }), t2 = t2.slice(0, t2.length - 1)) : t2 = e4.join(","), t2;
99
- }
100
- }();
100
+ const e3 = new z("#" + Z, { text: function() {
101
+ return he();
101
102
  } });
102
103
  e3.on("success", () => {
103
- I({ showClose: true, type: "success", message: F("superPageRuntimeMessage.copySuccess") });
104
+ E({ showClose: true, type: "success", message: F("superPageRuntimeMessage.copySuccess") });
104
105
  }), e3.on("error", (e4) => {
105
- console.error("复制失败", e4);
106
106
  }), n(() => {
107
107
  const e4 = te.value;
108
108
  R(e4, U.pageContext, U.configure, { formItemRef: ge.value, componentRef: me.value, titleRef: de.value, value: e4, entity: U.pageContext.entity.data, pageData: U.pageContext.entity.page });
@@ -110,10 +110,10 @@ const D = { style: { "padding-left": "5px" } }, O = { style: { float: "left" } }
110
110
  }), B2({ updateOptions: function(e3) {
111
111
  le.value = e3 || [];
112
112
  }, addRequiredClass: function() {
113
- $.value = q();
114
- } }), (t2, l2) => {
115
- const o2 = r("el-icon"), a2 = r("el-option"), u2 = r("el-select"), n2 = r("el-popover"), _2 = r("el-form-item");
116
- return s(), i(_2, { ref_key: "formItemRef", ref: ge, required: !!X.value.required, class: c(f(L) + ($.value ? " " + $.value : "")), "label-width": X.value.labelWidth, style: p(f(K)) }, { label: v(() => [X.value.tittleShow ? (s(), d("div", { key: 0, ref_key: "titleRef", ref: de, style: p({ ...f(N), ...f(Q) }) }, [X.value.prefixType ? (s(), i(V, { key: 0, pageContext: e2.pageContext, property: X.value }, null, 8, ["pageContext", "property"])) : (s(), d(h, { key: 1 }, [C(b(f(M)(X.value.title)), 1)], 64))], 4)) : x("", true)]), default: v(() => [g(n2, { placement: "top", trigger: "hover" }, { reference: v(() => [g(u2, { ref_key: "componentRef", ref: me, style: { width: "100%" }, disabled: "disabled" === X.value.state, size: X.value.size, clearable: X.value.clearable, multiple: X.value.multiple, "collapse-tags": X.value.collapseTags, "collapse-tags-tooltip": X.value.collapseTagsTooltip, filterable: X.value.filterable, "allow-create": X.value.allowCreate, placeholder: X.value.placeholder, "remote-show-suffix": X.value.remoteShowSuffix, remote: X.value.remote, "remote-method": X.value.remoteMethod, loading: ae.value, onChange: X.value.changeMethod, modelValue: te.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => te.value = e3) }, { default: v(() => [(s(true), d(h, null, y(le.value, (t3) => (s(), i(a2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => f(A)(t3.value, e2.pageContext, e2.configure, "click", { values: te.value }) }, { default: v(() => [t3._description_ ? (s(), d(h, { key: 0 }, [m("span", O, b(t3.label), 1), m("span", W, b(t3._description_), 1)], 64)) : x("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), default: v(() => [m("span", D, [g(o2, { id: Z }, { default: v(() => [g(f(z))]), _: 1 })])]), _: 1 })]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
113
+ $.value = M();
114
+ }, getSelectItemsTitle: he }), (e3, t2) => {
115
+ const l2 = r("el-icon"), o2 = r("el-option"), a2 = r("el-select"), u2 = r("el-popover"), n2 = r("el-form-item");
116
+ return s(), i(n2, { ref_key: "formItemRef", ref: ge, required: !!X.value.required, class: c(f(L) + ($.value ? " " + $.value : "")), "label-width": X.value.labelWidth, style: p(f(K)) }, { label: v(() => [X.value.tittleShow ? (s(), d("div", { key: 0, ref_key: "titleRef", ref: de, style: p({ ...f(N), ...f(Q) }) }, [X.value.prefixType ? (s(), i(V, { key: 0, pageContext: e3.pageContext, property: X.value }, null, 8, ["pageContext", "property"])) : (s(), d(h, { key: 1 }, [C(b(f(I)(X.value.title)), 1)], 64))], 4)) : x("", true)]), default: v(() => [g(u2, { placement: "top", trigger: "hover" }, { reference: v(() => [g(a2, { ref_key: "componentRef", ref: me, style: { width: "100%" }, disabled: "disabled" === X.value.state, size: X.value.size, clearable: X.value.clearable, multiple: X.value.multiple, "collapse-tags": X.value.collapseTags, "collapse-tags-tooltip": X.value.collapseTagsTooltip, filterable: X.value.filterable, "allow-create": X.value.allowCreate, placeholder: X.value.placeholder, "remote-show-suffix": X.value.remoteShowSuffix, remote: X.value.remote, "remote-method": X.value.remoteMethod, loading: ae.value, onChange: X.value.changeMethod, modelValue: te.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => te.value = e4) }, { default: v(() => [(s(true), d(h, null, y(le.value, (t3) => (s(), i(o2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => f(A)(t3.value, e3.pageContext, e3.configure, "click", { values: te.value }) }, { default: v(() => [t3._description_ ? (s(), d(h, { key: 0 }, [m("span", O, b(t3.label), 1), m("span", W, b(t3._description_), 1)], 64)) : x("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), default: v(() => [m("span", D, [g(l2, { id: Z }, { default: v(() => [g(f(q))]), _: 1 })])]), _: 1 })]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
117
117
  };
118
118
  } });
119
119
  export {
@@ -9,7 +9,7 @@ const d = e({ __name: "separatelabel-runtime", props: { pageContext: {}, configu
9
9
  const e3 = y(v.configure.props.base.title);
10
10
  b(e3, v.pageContext, v.configure, { componentRef: x.value, value: e3, entity: v.pageContext.entity.data, pageData: v.pageContext.entity.page });
11
11
  });
12
- }), d2({}), (t2, i2) => (r(), n("div", { style: p(l(T)), class: a([l(V), "amb-widget-separatelabel"]), ref_key: "thisRef", ref: x }, [s("div", { class: "label", style: p(l(h)) }, [e2.configure.props.iconType && e2.configure.props.iconValue ? (r(), u(l(m), { key: 0, iconType: e2.configure.props.iconType, iconValue: e2.configure.props.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : c("", true), g(" " + f(l(y)(e2.configure.props.base.title)), 1)], 4)], 6));
12
+ }), d2({}), (e3, t2) => (r(), n("div", { style: p(l(T)), class: a([l(V), "amb-widget-separatelabel"]), ref_key: "thisRef", ref: x }, [s("div", { class: "label", style: p(l(h)) }, [e3.configure.props.iconType && e3.configure.props.iconValue ? (r(), u(l(m), { key: 0, iconType: e3.configure.props.iconType, iconValue: e3.configure.props.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : c("", true), g(" " + f(l(y)(e3.configure.props.base.title)), 1)], 4)], 6));
13
13
  } });
14
14
  export {
15
15
  d as default