super-page-runtime 2.3.7 → 2.3.9-sit1

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 (57) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +50 -50
  2. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +102 -102
  3. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +26 -24
  4. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +59 -58
  5. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +38 -37
  6. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +28 -27
  7. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
  8. package/dist/es/components/runtime/utils/charts/chart-util.js +29 -22
  9. package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
  10. package/dist/es/components/runtime/utils/common-util.js +4 -0
  11. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  12. package/dist/es/components/runtime/utils/events/print-label.js +25 -26
  13. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  14. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  15. package/dist/es/components/runtime/utils/events/validator-util.js +122 -104
  16. package/dist/es/components/runtime/utils/page-init-util.js +24 -25
  17. package/dist/es/components/runtime/utils/page-store.js +10 -10
  18. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +4 -1
  20. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +4 -4
  21. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  23. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +4 -1
  24. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +15 -15
  25. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +4 -1
  26. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +7 -7
  27. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +4 -1
  28. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +8 -8
  29. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +4 -1
  30. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +7 -7
  31. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +11 -12
  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/container/fixed/YxAffix.vue2.js +0 -2
  34. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  35. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +19 -17
  36. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +26 -20
  37. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +10 -4
  38. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
  39. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +32 -25
  40. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +52 -49
  41. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
  42. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
  43. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
  44. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -55
  45. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
  46. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
  47. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
  48. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +55 -53
  49. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +63 -61
  50. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
  51. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
  52. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  53. package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
  54. package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
  55. package/dist/es/style.css +30 -0
  56. package/package.json +2 -2
  57. package/dist/es.zip +0 -0
@@ -1,4 +1,4 @@
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";
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 p, normalizeStyle as s, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, withCtx as y, createCommentVNode as g, createTextVNode as x } from "vue";
2
2
  import { getFormModelFields as d } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue as m, formatValueByType as h } from "../../../../utils/page-helper-util.js";
4
4
  import { SuperIcon as k } from "agilebuilder-ui";
@@ -7,9 +7,7 @@ import { $t as _ } from "../../../../utils/i18n-util.js";
7
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 }) {
8
8
  const R = e2, S = R.pageContext.entity ? R.pageContext.entity : {};
9
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(() => {
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, H = l(() => {
13
11
  let e3 = m(S, P);
14
12
  if (G) if (A.value.hasOptions) {
15
13
  let t2 = null;
@@ -29,7 +27,7 @@ const I = { style: { width: "100%", "text-align": "center", "font-weight": "700"
29
27
  B.value = e3 || [];
30
28
  } }), (e3, t2) => {
31
29
  const l2 = 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(l2, { 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: t2[0] || (t2[0] = (t3) => f(C)(t3, e3.pageContext, e3.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: t2[1] || (t2[1] = (t3) => f(C)(t3, e3.pageContext, e3.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)]));
30
+ return A.value.whetherTittle ? (p(), i("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: s(f(O)) }, [c("div", I, v(A.value.title), 1)], 6)) : A.value.tittleShow ? (p(), o(l2, { key: 1, ref_key: "formItemRef", ref: J, required: !!A.value.required, class: r(f(z)), "label-width": A.value.labelWidth, style: s(f(O)) }, { label: y(() => [A.value.tittleShow ? (p(), i("div", { key: 0, ref_key: "titleRef", ref: L, style: s({ ...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: t2[0] || (t2[0] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", b, [A.value.preIconValue || A.value.preText ? (p(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }), style: s(f(F)) }, [A.value.preIconType && A.value.preIconValue ? (p(), 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 ? (p(), 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 ? (p(), 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"])) : (p(), 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: H.value }, v(A.value.prefixIcon) + " " + v(H.value), 9, V), A.value.suffixTxt ? (p(), i("span", { key: 0, class: r(f(E)), style: s(f(F)) }, v(A.value.suffixTxt), 7)) : g("", true)]));
33
31
  };
34
32
  } });
35
33
  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);
@@ -1,70 +1,73 @@
1
- import { defineComponent as e, computed as t, ref as o, watch as l, 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 b, createCommentVNode as C } from "vue";
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
2
  import { setVariableValue as x, getVariableValue as k, getOptionDatasFromPage as _, autoSetAfterSelect as R, queryOptionDatasources as S } from "../../../../utils/page-helper-util.js";
3
- import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent as j, handleAfterInitEvent as I } from "../../../../utils/events/event-util.js";
5
- import { $t as V } from "../../../../utils/i18n-util.js";
6
- const q = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
7
- const w = e2, z = w.pageContext.entity ? w.pageContext.entity : {};
8
- let O = T(w.pageContext, w.configure);
9
- const D = t({ get() {
10
- let e3 = k(z, O);
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";
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 M = j(z.pageContext, z.configure);
10
+ const P = l({ get() {
11
+ let e3 = k(D, M);
11
12
  return null != e3 && (e3 += ""), e3;
12
13
  }, set(e3) {
13
- x(z, O, e3);
14
- } }), M = w.configure.runtime ? w.configure.runtime : {}, P = M.style, W = M.class, E = M.headerStyle, F = M.titleExceedStyle, U = o(M.props ? M.props : {}), $ = o(U.value.options ? U.value.options : []), A = _(w.pageContext, w.configure);
15
- A.length > 0 && ($.value = A);
16
- const B = w.configure.props && w.configure.props.dataOrigin ? w.configure.props.dataOrigin : {}, G = B.optionValueSetType;
17
- let H = [];
18
- if (("dynamicData" == G || "dataTable" == G || "service" == G) && B.autoSets) for (let e3 of B.autoSets) e3.source && H.push(e3);
19
- w.configure && w.configure.props && w.configure.props.base && w.configure.props.base.optionProp && H.push({ source: "label", target: w.configure.props.base.optionProp }), U.value.changeMethod = function(e3) {
20
- if (H.length > 0) {
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);
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) {
21
22
  let t2 = null;
22
- $.value && null != e3 && null != e3 && (t2 = $.value.filter((t3) => e3 === t3.value)), R(w.configure, w.pageContext, H, t2);
23
+ B.value && null != e3 && null != e3 && (t2 = B.value.filter((t3) => e3 === t3.value)), R(z.configure, z.pageContext, K, t2);
23
24
  }
24
- j(e3, w.pageContext, w.configure, "change");
25
+ T(e3, z.pageContext, z.configure, "change");
25
26
  };
26
- const J = U.value.monitorFields, K = [];
27
- if (J) {
27
+ const L = A.value.monitorFields, N = [];
28
+ if (L) {
28
29
  const e3 = [];
29
- for (let t2 of J) if (t2.startsWith("${")) {
30
+ for (let t2 of L) if (t2.startsWith("${")) {
30
31
  t2 = t2.substring(2, t2.length - 1);
31
- const o2 = t2.split(".");
32
- "page" !== o2[0] && "task" !== o2[0] && "data" !== o2[0] || (K.push(o2), e3.includes(o2[0]) || e3.push(o2[0]));
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
34
  }
34
- for (let t2 of e3) l(z[t2], () => {
35
- Y();
35
+ for (let t2 of e3) o(D[t2], () => {
36
+ ee();
36
37
  });
37
38
  }
38
- function L() {
39
+ function Q() {
39
40
  let e3 = "";
40
- for (let t2 of K) e3 += "_" + k(z, t2);
41
+ for (let t2 of N) e3 += "_" + k(D, t2);
41
42
  return e3;
42
43
  }
43
- let N = L(), Q = false;
44
- const X = U.value.optionconfigInfo ? U.value.optionconfigInfo : {};
45
- function Y() {
46
- Q && clearTimeout(Q), Q = setTimeout(function() {
47
- const e3 = L();
48
- e3 != N && (N = e3, S(w.pageContext, X, void 0).then((e4) => {
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, S(z.pageContext, Z, void 0).then((e4) => {
49
50
  }));
50
51
  }, 200);
51
52
  }
52
53
  n(() => {
53
- Q && clearTimeout(Q);
54
+ Y && clearTimeout(Y);
54
55
  });
55
- const Z = o(null), ee = o(null), te = o(null);
56
+ const te = t(null), le = t(null), oe = t(null);
56
57
  return a(() => {
57
58
  u(() => {
58
- const e3 = D.value;
59
- I(e3, w.pageContext, w.configure, { formItemRef: Z.value, componentRef: ee.value, titleRef: te.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
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 });
60
61
  });
61
- }), q2({ updateOptions: function(e3) {
62
- $.value = e3 || [];
62
+ }), w2({ updateOptions: function(e3) {
63
+ B.value = e3 || [];
64
+ }, addRequiredClass: function() {
65
+ O.value = V();
63
66
  } }), (e3, t2) => {
64
- const o2 = i("el-radio"), l2 = i("el-radio-group"), n2 = i("el-form-item");
65
- return s(), r(n2, { ref_key: "formItemRef", ref: Z, required: U.value.required, class: f(c(W)), "label-width": U.value.labelWidth, style: p(c(P)) }, { label: g(() => [U.value.tittleShow ? (s(), v("div", { key: 0, ref_key: "titleRef", ref: te, style: p({ ...c(E), ...c(F) }) }, b(c(V)(U.value.title)), 5)) : C("", true)]), default: g(() => [d(l2, { ref_key: "componentRef", ref: ee, disabled: "disabled" === U.value.state, size: U.value.size, onChange: U.value.changeMethod, modelValue: D.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => D.value = e4) }, { default: g(() => [(s(true), v(m, null, h($.value, (t3) => (s(), r(o2, { key: t3.value, label: t3.value, onClick: (o3) => c(j)(t3.value, e3.pageContext, e3.configure, "click", { values: D.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"]);
67
+ const l2 = i("el-radio"), o2 = i("el-radio-group"), n2 = i("el-form-item");
68
+ return s(), r(n2, { 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(o2, { ref_key: "componentRef", ref: le, disabled: "disabled" === A.value.state, size: A.value.size, onChange: A.value.changeMethod, modelValue: P.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => P.value = e4) }, { default: g(() => [(s(true), v(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: 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
69
  };
67
70
  } });
68
71
  export {
69
- q as default
72
+ w as default
70
73
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as i, onBeforeUnmount as o, resolveComponent as r, createElementBlock as a, openBlock as u, Fragment as s, createBlock as c, createCommentVNode as p, normalizeStyle as d, normalizeClass as g, unref as m, withCtx as f, createElementVNode as v, toDisplayString as h } from "vue";
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, createBlock as c, createCommentVNode as p, normalizeStyle as d, normalizeClass as g, unref as m, withCtx as f, createElementVNode as v, toDisplayString as h } from "vue";
2
2
  import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue as y, setVariableValue as b, getVariableValue as C } from "../../../../utils/page-helper-util.js";
4
4
  import w from "quill";
@@ -7,93 +7,95 @@ import { handleAfterInitEvent as k, handleFormEvent as q } from "../../../../uti
7
7
  import T from "agilebuilder-ui/src/utils/request";
8
8
  import { $t as E } from "../../../../utils/i18n-util.js";
9
9
  import { getToken as L } from "agilebuilder-ui/src/utils/auth";
10
- import { getBaseUrl as j } from "../../../../utils/common-util.js";
11
- const R = { style: { width: "100%", height: "100%" } }, S = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
12
- const S2 = e2, _ = S2.pageContext.entity ? S2.pageContext.entity : {}, B = x(S2.pageContext, S2.configure), H = S2.configure.runtime ? S2.configure.runtime : {}, M = H.style, N = H.class, A = H.headerStyle, D = H.titleExceedStyle, F = t(H.props ? H.props : {});
13
- let U = F.value.value;
14
- const W = y(S2.pageContext, U), z = t(null);
15
- let I = null;
10
+ import { getBaseUrl as R, addRequiredClassUtil as j } from "../../../../utils/common-util.js";
11
+ const S = { style: { width: "100%", height: "100%" } }, _ = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
12
+ const B = e2, H = t(null), M = B.pageContext.entity ? B.pageContext.entity : {}, N = x(B.pageContext, B.configure), A = B.configure.runtime ? B.configure.runtime : {}, D = A.style, F = A.class, U = A.headerStyle, W = A.titleExceedStyle, z = t(A.props ? A.props : {});
13
+ let I = z.value.value;
14
+ const O = y(B.pageContext, I), G = t(null);
15
+ let J = null;
16
16
  t(null);
17
- let O = F.value.state;
18
- function G(e3) {
17
+ let K = z.value.state;
18
+ function P(e3) {
19
19
  return "readonly" == e3 || "disabled" == e3;
20
20
  }
21
- const J = G(O), K = 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: ["12px", "13px", "14px", "15px", "16px", "18px", "20px", "24px", "28px", "32px", "36px"] }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: [] }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: J ? "" : F.value.placeholder, readOnly: J });
22
- l(F.value, () => {
23
- const e3 = F.value.state;
24
- if (null != e3 && e3 !== O) {
25
- O = e3;
26
- const t2 = G(O);
27
- I && (I.enable(!t2), I.root.dataset.placeholder = t2 ? "" : F.value.placeholder);
21
+ const Q = P(K), V = 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: ["12px", "13px", "14px", "15px", "16px", "18px", "20px", "24px", "28px", "32px", "36px"] }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: [] }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: Q ? "" : z.value.placeholder, readOnly: Q });
22
+ l(z.value, () => {
23
+ const e3 = z.value.state;
24
+ if (null != e3 && e3 !== K) {
25
+ K = e3;
26
+ const t2 = P(K);
27
+ J && (J.enable(!t2), J.root.dataset.placeholder = t2 ? "" : z.value.placeholder);
28
28
  }
29
29
  });
30
- const P = t([]), Q = t(false), V = t(null), X = t(null), Y = t(null);
31
- let Z;
32
- function $(e3) {
30
+ const X = t([]), Y = t(false), Z = t(null), $ = t(null), ee = t(null);
31
+ let te;
32
+ function le(e3) {
33
33
  var _a;
34
- null !== e3.relatedTarget && ((_a = z.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || q(I.root.innerHTML, S2.pageContext, S2.configure, "change", { entity: _ });
34
+ null !== e3.relatedTarget && ((_a = G.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || q(J.root.innerHTML, B.pageContext, B.configure, "change", { entity: M });
35
35
  }
36
- function ee(e3) {
36
+ function ne(e3) {
37
37
  if ("img" === e3.target.localName) {
38
- P.value = [];
38
+ X.value = [];
39
39
  let t2 = e3.target.src;
40
- P.value.push(t2), Q.value = true;
40
+ X.value.push(t2), Y.value = true;
41
41
  }
42
42
  }
43
- function te(e3) {
43
+ function ie(e3) {
44
44
  const t2 = new FormData();
45
45
  t2.append("file", e3);
46
- const l2 = S2.pageContext.backendUrl, n2 = j(l2, S2.pageContext.isTest);
46
+ const l2 = B.pageContext.backendUrl, n2 = R(l2, B.pageContext.isTest);
47
47
  return T.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
48
48
  }
49
- function le(e3, t2) {
50
- let l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/)[1], i2 = atob(l2[1]), o2 = i2.length, r2 = new Uint8Array(o2);
51
- for (; o2--; ) r2[o2] = i2.charCodeAt(o2);
52
- return new File([r2], t2, { type: n2 });
49
+ function oe(e3, t2) {
50
+ let l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/)[1], i2 = atob(l2[1]), o2 = i2.length, a2 = new Uint8Array(o2);
51
+ for (; o2--; ) a2[o2] = i2.charCodeAt(o2);
52
+ return new File([a2], t2, { type: n2 });
53
53
  }
54
54
  return n(() => {
55
55
  var _a;
56
- I = new w(z.value, K.value);
57
- const e3 = I.clipboard.convertHTML(W);
58
- I.setContents(e3.ops), (_a = z.value) == null ? void 0 : _a.addEventListener("focusout", $), I.on("text-change", async function(e4, t2, l2) {
56
+ J = new w(G.value, V.value);
57
+ const e3 = J.clipboard.convertHTML(O);
58
+ J.setContents(e3.ops), (_a = G.value) == null ? void 0 : _a.addEventListener("focusout", le), J.on("text-change", async function(e4, t2, l2) {
59
59
  if (e4.ops && e4.ops.length > 0) for (let t3 = 0; t3 < e4.ops.length; t3++) {
60
60
  const l3 = e4.ops[t3];
61
61
  if (l3.insert && l3.insert.image) {
62
62
  const e5 = l3.insert.image;
63
63
  if (!e5.startsWith("data:image")) return;
64
- const t4 = le(e5, "image.png");
65
- await te(t4).then((t5) => {
66
- if (!I) return;
67
- const l4 = I.root.getElementsByTagName("img");
68
- if (l4 && l4.length > 0) for (let n2 = 0; n2 < l4.length; n2++) {
69
- const i2 = l4[n2];
64
+ const t4 = oe(e5, "image.png");
65
+ await ie(t4).then((t5) => {
66
+ if (!J) return;
67
+ const l4 = J.root.getElementsByTagName("img");
68
+ if (l4 && l4.length > 0) for (let n3 = 0; n3 < l4.length; n3++) {
69
+ const i2 = l4[n3];
70
70
  i2.src === e5 && (i2.src = t5.url + "&jwt=" + L());
71
71
  }
72
72
  }).catch((e6) => {
73
- console.error(e6, "上传图片失败");
74
73
  });
75
74
  }
76
75
  }
77
- b(_, B, I.root.innerHTML);
78
- }), Z = I.container, Z.addEventListener("click", ee), function() {
79
- if (I && I.container) {
80
- const e4 = I.container.parentNode.getBoundingClientRect(), t2 = I.container.getBoundingClientRect();
76
+ const n2 = J.root.innerHTML;
77
+ b(M, N, n2), null != n2 && "" !== n2 && (H.value = "");
78
+ }), te = J.container, te.addEventListener("click", ne), function() {
79
+ if (J && J.container) {
80
+ const e4 = J.container.parentNode.getBoundingClientRect(), t2 = J.container.getBoundingClientRect();
81
81
  let l2 = e4.height - (t2.top - e4.top);
82
- l2 < 100 && (l2 = 100), I.container.style.height = l2 + "px";
82
+ l2 < 100 && (l2 = 100), J.container.style.height = l2 + "px";
83
83
  }
84
84
  }(), i(() => {
85
- const e4 = C(_, B);
86
- k(e4, S2.pageContext, S2.configure, { formItemRef: V.value, componentRef: X.value, titleRef: Y.value, value: e4, entity: S2.pageContext.entity.data, pageData: S2.pageContext.entity.page });
85
+ const e4 = C(M, N);
86
+ k(e4, B.pageContext, B.configure, { formItemRef: Z.value, componentRef: $.value, titleRef: ee.value, value: e4, entity: B.pageContext.entity.data, pageData: B.pageContext.entity.page });
87
87
  });
88
88
  }), o(() => {
89
- z.value && z.value.removeEventListener("focusout", $), Z && Z.removeEventListener("click", ee);
90
- }), (e3, t2) => {
91
- const l2 = r("el-form-item"), n2 = r("el-image-viewer");
92
- return u(), a(s, null, [F.value.tittleShow ? (u(), c(l2, { key: 0, required: F.value.required, class: g(m(N)), "label-width": F.value.labelWidth, style: d(m(M)) }, { label: f(() => [F.value.tittleShow ? (u(), a("div", { key: 0, style: d({ ...m(A), ...m(D) }) }, h(m(E)(F.value.title)), 5)) : p("", true)]), default: f(() => [v("div", R, [v("div", { ref_key: "quillEditorRef", ref: z, style: { width: "100%" } }, null, 512)])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : p("", true), Q.value ? (u(), c(n2, { key: 1, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
93
- Q.value = false;
94
- }), "url-list": P.value }, null, 8, ["url-list"])) : p("", true)], 64);
89
+ G.value && G.value.removeEventListener("focusout", le), te && te.removeEventListener("click", ne);
90
+ }), _2({ addRequiredClass: function() {
91
+ H.value = j();
92
+ } }), (e3, t2) => {
93
+ const l2 = a("el-form-item"), n2 = a("el-image-viewer");
94
+ return u(), r(s, null, [z.value.tittleShow ? (u(), c(l2, { key: 0, required: z.value.required, class: g(m(F) + (H.value ? " " + H.value : "")), "label-width": z.value.labelWidth, style: d(m(D)) }, { label: f(() => [z.value.tittleShow ? (u(), r("div", { key: 0, style: d({ ...m(U), ...m(W) }) }, h(m(E)(z.value.title)), 5)) : p("", true)]), default: f(() => [v("div", S, [v("div", { ref_key: "quillEditorRef", ref: G, style: { width: "100%" } }, null, 512)])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : p("", true), Y.value ? (u(), c(n2, { key: 1, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
95
+ Y.value = false;
96
+ }), "url-list": X.value }, null, 8, ["url-list"])) : p("", true)], 64);
95
97
  };
96
98
  } });
97
99
  export {
98
- S as default
100
+ _ as default
99
101
  };
@@ -1,95 +1,97 @@
1
- import { defineComponent as e, ref as t, computed as l, watch as o, onUnmounted as a, onMounted as u, nextTick as r, resolveComponent as i, createBlock as n, openBlock as s, normalizeStyle as p, normalizeClass as f, unref as c, withCtx as v, createVNode as g, createElementBlock as m, Fragment as d, renderList as h, createCommentVNode as y, createElementVNode as x, toDisplayString as b, createTextVNode as C } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, watch as o, onUnmounted as a, onMounted as u, nextTick as i, resolveComponent as r, createBlock as n, openBlock as s, normalizeStyle as p, normalizeClass as f, unref as c, withCtx as v, createVNode as g, createElementBlock as m, Fragment as d, renderList as h, createCommentVNode as y, createElementVNode as x, toDisplayString as b, createTextVNode as C } from "vue";
2
2
  import { setVariableValue as S, getOptionDatasFromPage as k, queryOptionDatasources as w, autoSetAfterSelect as _, getVariableValue as T } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields as A } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent as j, handleAfterInitEvent as V } from "../../../../utils/events/event-util.js";
5
- import R from "../common/title-suffix-element.vue.js";
6
- import { $t as z } from "../../../../utils/i18n-util.js";
7
- const I = { style: { float: "left" } }, M = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, q = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
8
- const O = e2, P = O.pageContext.entity ? O.pageContext.entity : {};
9
- let D = A(O.pageContext, O.configure);
10
- const W = O.configure.runtime ? O.configure.runtime : {}, E = W.style, F = W.class, U = W.headerStyle, $ = W.titleExceedStyle, B = t(W.props ? W.props : {});
11
- let G = [];
12
- function H() {
13
- let e3 = T(P, D);
14
- return null != e3 && (e3 = String(e3)), B.value.multiple && (e3 = e3 ? String(e3).split(",") : []), e3;
4
+ import { handleFormEvent as j, handleAfterInitEvent as R } from "../../../../utils/events/event-util.js";
5
+ import V from "../common/title-suffix-element.vue.js";
6
+ import { $t as q } from "../../../../utils/i18n-util.js";
7
+ import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
8
+ const I = { style: { float: "left" } }, M = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, O = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: O2 }) {
9
+ const P = e2, D = t(null), W = P.pageContext.entity ? P.pageContext.entity : {};
10
+ let E = A(P.pageContext, P.configure);
11
+ const F = P.configure.runtime ? P.configure.runtime : {}, U = F.style, $ = F.class, B = F.headerStyle, G = F.titleExceedStyle, H = t(F.props ? F.props : {});
12
+ let J = [];
13
+ function K() {
14
+ let e3 = T(W, E);
15
+ return null != e3 && (e3 = String(e3)), H.value.multiple && (e3 = e3 ? String(e3).split(",") : []), e3;
15
16
  }
16
- const J = l({ get: () => H(), set(e3) {
17
- const t2 = H();
18
- G = Array.isArray(t2) ? [...t2] : t2;
17
+ const L = l({ get: () => K(), set(e3) {
18
+ const t2 = K();
19
+ J = Array.isArray(t2) ? [...t2] : t2;
19
20
  let l2 = e3;
20
- if (B.value.multiple) {
21
- l2 = !!B.value.arrayValue ? Array.isArray(e3) ? e3 : e3 ? String(e3).split(",") : [] : Array.isArray(e3) ? e3.length > 0 ? e3.join(",") : "" : e3 ?? "";
21
+ if (H.value.multiple) {
22
+ l2 = !!H.value.arrayValue ? Array.isArray(e3) ? e3 : e3 ? String(e3).split(",") : [] : Array.isArray(e3) ? e3.length > 0 ? e3.join(",") : "" : e3 ?? "";
22
23
  }
23
- S(P, D, l2);
24
- } }), K = t(B.value.options ? B.value.options : []), L = k(O.pageContext, O.configure);
25
- L.length > 0 && (K.value = L);
26
- const N = t(false), Q = O.configure.props && O.configure.props.dataOrigin ? O.configure.props.dataOrigin : {}, X = Q.optionValueSetType;
27
- let Y = [];
28
- const Z = B.value.optionconfigInfo ? B.value.optionconfigInfo : {};
29
- if ("dynamicData" == X || "dataTable" == X || "service" == X) {
30
- if ("remote" == Q.filterType) {
24
+ S(W, E, l2), null != l2 && (D.value = "");
25
+ } }), N = t(H.value.options ? H.value.options : []), Q = k(P.pageContext, P.configure);
26
+ Q.length > 0 && (N.value = Q);
27
+ const X = t(false), Y = P.configure.props && P.configure.props.dataOrigin ? P.configure.props.dataOrigin : {}, Z = Y.optionValueSetType;
28
+ let ee = [];
29
+ const te = H.value.optionconfigInfo ? H.value.optionconfigInfo : {};
30
+ if ("dynamicData" == Z || "dataTable" == Z || "service" == Z) {
31
+ if ("remote" == Y.filterType) {
31
32
  let e3;
32
- B.value.filterable = true, B.value.remote = true, B.value.remoteShowSuffix = true, B.value.remoteMethod = function(t2) {
33
- e3 !== t2 && (e3 = t2, N.value = true, w(O.pageContext, Z, t2).then((e4) => {
34
- N.value = false;
33
+ H.value.filterable = true, H.value.remote = true, H.value.remoteShowSuffix = true, H.value.remoteMethod = function(t2) {
34
+ e3 !== t2 && (e3 = t2, X.value = true, w(P.pageContext, te, t2).then((e4) => {
35
+ X.value = false;
35
36
  }).then((e4) => {
36
- N.value = false;
37
+ X.value = false;
37
38
  }));
38
39
  };
39
40
  }
40
- if (Q.autoSets) for (let e3 of Q.autoSets) e3.source && Y.push(e3);
41
+ if (Y.autoSets) for (let e3 of Y.autoSets) e3.source && ee.push(e3);
41
42
  }
42
- O.configure && O.configure.props && O.configure.props.base && O.configure.props.base.optionProp && Y.push({ source: "label", target: O.configure.props.base.optionProp }), B.value.changeMethod = function(e3) {
43
+ P.configure && P.configure.props && P.configure.props.base && P.configure.props.base.optionProp && ee.push({ source: "label", target: P.configure.props.base.optionProp }), H.value.changeMethod = function(e3) {
43
44
  let t2, l2 = null;
44
- K.value && null != e3 && null != e3 && (l2 = K.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value));
45
- Y.length > 0 && _(O.configure, O.pageContext, Y, l2, [B.value.prop]);
45
+ N.value && null != e3 && null != e3 && (l2 = N.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value));
46
+ ee.length > 0 && _(P.configure, P.pageContext, ee, l2, [H.value.prop]);
46
47
  l2 && l2.length > 0 && (t2 = l2[0]);
47
48
  let o2 = {};
48
49
  t2 && (o2.extendParams = t2);
49
- o2.options = K.value, o2.oldValue = G, j(e3, O.pageContext, O.configure, "change", o2);
50
+ o2.options = N.value, o2.oldValue = J, j(e3, P.pageContext, P.configure, "change", o2);
50
51
  };
51
- const ee = B.value.monitorFields, te = [];
52
- if (ee) {
52
+ const le = H.value.monitorFields, oe = [];
53
+ if (le) {
53
54
  const e3 = [];
54
- for (let t2 of ee) if (t2.startsWith("${")) {
55
+ for (let t2 of le) if (t2.startsWith("${")) {
55
56
  t2 = t2.substring(2, t2.length - 1);
56
57
  const l2 = t2.split(".");
57
- "page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (te.push(l2), e3.includes(l2[0]) || e3.push(l2[0]));
58
+ "page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (oe.push(l2), e3.includes(l2[0]) || e3.push(l2[0]));
58
59
  }
59
- for (let t2 of e3) o(P[t2], () => {
60
- ue();
60
+ for (let t2 of e3) o(W[t2], () => {
61
+ ie();
61
62
  });
62
63
  }
63
- function le() {
64
- let e3 = [];
65
- for (let t2 of te) e3.push(T(P, t2));
66
- return e3.join(",");
67
- }
68
- let oe = le(), ae = false;
69
- function ue() {
70
- ae && clearTimeout(ae), ae = setTimeout(function() {
71
- const e3 = le();
72
- e3 != oe && (oe = e3, Z.watchAttrValue = e3, w(O.pageContext, Z, void 0).then((e4) => {
73
- N.value = false;
64
+ let ae = "", ue = false;
65
+ function ie() {
66
+ ue && clearTimeout(ue), ue = setTimeout(function() {
67
+ const e3 = function() {
68
+ let e4 = [];
69
+ for (let t2 of oe) e4.push(T(W, t2));
70
+ return e4.join(",");
71
+ }();
72
+ e3 != ae && (ae = e3, te.watchAttrValue = e3, w(P.pageContext, te, void 0).then((e4) => {
73
+ X.value = false;
74
74
  }));
75
75
  }, 200);
76
76
  }
77
77
  a(() => {
78
- ae && clearTimeout(ae);
78
+ ue && clearTimeout(ue);
79
79
  });
80
- const re = t(null), ie = t(null), ne = t(null);
80
+ const re = t(null), ne = t(null), se = t(null);
81
81
  return u(() => {
82
- r(() => {
83
- const e3 = J.value;
84
- V(e3, O.pageContext, O.configure, { formItemRef: re.value, componentRef: ie.value, titleRef: ne.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
82
+ i(() => {
83
+ const e3 = L.value;
84
+ R(e3, P.pageContext, P.configure, { formItemRef: re.value, componentRef: ne.value, titleRef: se.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
85
85
  });
86
- }), q2({ updateOptions: function(e3) {
87
- K.value = e3 || [];
86
+ }), O2({ updateOptions: function(e3) {
87
+ N.value = e3 || [];
88
+ }, addRequiredClass: function() {
89
+ D.value = z();
88
90
  } }), (e3, t2) => {
89
- const l2 = i("el-option"), o2 = i("el-select"), a2 = i("el-form-item");
90
- return s(), n(a2, { ref_key: "formItemRef", ref: re, required: !!B.value.required, class: f(c(F)), "label-width": B.value.labelWidth, style: p(c(E)) }, { label: v(() => [B.value.tittleShow ? (s(), m("div", { key: 0, ref_key: "titleRef", ref: ne, style: p({ ...c(U), ...c($) }) }, [B.value.prefixType ? (s(), n(R, { key: 0, pageContext: e3.pageContext, property: B.value }, null, 8, ["pageContext", "property"])) : (s(), m(d, { key: 1 }, [C(b(c(z)(B.value.title)), 1)], 64))], 4)) : y("", true)]), default: v(() => [g(o2, { ref_key: "componentRef", ref: ie, style: { width: "100%" }, disabled: "disabled" === B.value.state, size: B.value.size, clearable: B.value.clearable, multiple: B.value.multiple, "collapse-tags": B.value.collapseTags, "collapse-tags-tooltip": B.value.collapseTagsTooltip, filterable: B.value.filterable, "allow-create": B.value.allowCreate, placeholder: B.value.placeholder, "remote-show-suffix": B.value.remoteShowSuffix, remote: B.value.remote, "remote-method": B.value.remoteMethod, loading: N.value, onChange: B.value.changeMethod, modelValue: J.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => J.value = e4) }, { default: v(() => [(s(true), m(d, null, h(K.value, (t3) => (s(), n(l2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => c(j)(t3.value, e3.pageContext, e3.configure, "click", { values: J.value }) }, { default: v(() => [t3._description_ ? (s(), m(d, { key: 0 }, [x("span", I, b(t3.label), 1), x("span", M, b(t3._description_), 1)], 64)) : y("", 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"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
91
+ const l2 = r("el-option"), o2 = r("el-select"), a2 = r("el-form-item");
92
+ return s(), n(a2, { ref_key: "formItemRef", ref: re, required: !!H.value.required, class: f(c($) + (D.value ? " " + D.value : "")), "label-width": H.value.labelWidth, style: p(c(U)) }, { label: v(() => [H.value.tittleShow ? (s(), m("div", { key: 0, ref_key: "titleRef", ref: se, style: p({ ...c(B), ...c(G) }) }, [H.value.prefixType ? (s(), n(V, { key: 0, pageContext: e3.pageContext, property: H.value }, null, 8, ["pageContext", "property"])) : (s(), m(d, { key: 1 }, [C(b(c(q)(H.value.title)), 1)], 64))], 4)) : y("", true)]), default: v(() => [g(o2, { ref_key: "componentRef", ref: ne, style: { width: "100%" }, disabled: "disabled" === H.value.state, size: H.value.size, clearable: H.value.clearable, multiple: H.value.multiple, "collapse-tags": H.value.collapseTags, "collapse-tags-tooltip": H.value.collapseTagsTooltip, filterable: H.value.filterable, "allow-create": H.value.allowCreate, placeholder: H.value.placeholder, "remote-show-suffix": H.value.remoteShowSuffix, remote: H.value.remote, "remote-method": H.value.remoteMethod, loading: X.value, onChange: H.value.changeMethod, modelValue: L.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => L.value = e4) }, { default: v(() => [(s(true), m(d, null, h(N.value, (t3) => (s(), n(l2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => c(j)(t3.value, e3.pageContext, e3.configure, "click", { values: L.value }) }, { default: v(() => [t3._description_ ? (s(), m(d, { key: 0 }, [x("span", I, b(t3.label), 1), x("span", M, b(t3._description_), 1)], 64)) : y("", 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"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
91
93
  };
92
94
  } });
93
95
  export {
94
- q as default
96
+ O as default
95
97
  };
@@ -1,33 +1,36 @@
1
- import { defineComponent as e, ref as t, computed as l, onMounted as a, nextTick as i, resolveComponent as u, createBlock as n, openBlock as v, normalizeStyle as o, normalizeClass as c, unref as r, withCtx as s, createVNode as f, createElementBlock as p, createCommentVNode as d, toDisplayString as m } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as a, nextTick as u, resolveComponent as i, createBlock as n, openBlock as v, normalizeStyle as o, normalizeClass as r, unref as c, withCtx as s, createVNode as f, createElementBlock as p, createCommentVNode as m, toDisplayString as d } from "vue";
2
2
  import { getFormModelFields as g } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue as V, setVariableValue as y } from "../../../../utils/page-helper-util.js";
4
4
  import { handleAfterInitEvent as x, handleFormEvent as h } from "../../../../utils/events/event-util.js";
5
- import { $t as b } from "../../../../utils/i18n-util.js";
6
- const C = e({ __name: "switch-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
7
- const C2 = e2, w = C2.pageContext.entity ? C2.pageContext.entity : {};
8
- let R = g(C2.pageContext, C2.configure);
9
- const _ = C2.configure.runtime ? C2.configure.runtime : {}, j = _.style, k = _.class, S = _.headerStyle, q = _.titleExceedStyle, z = t(_.props ? _.props : {});
10
- let I = V(w, R);
11
- function T(e3) {
12
- return void 0 !== z.value[e3] && null !== z.value[e3] && "" !== z.value[e3];
5
+ import { $t as C } from "../../../../utils/i18n-util.js";
6
+ import { addRequiredClassUtil as b } from "../../../../utils/common-util.js";
7
+ const w = e({ __name: "switch-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: w2 }) {
8
+ const R = e2, _ = t(null), j = R.pageContext.entity ? R.pageContext.entity : {};
9
+ let k = g(R.pageContext, R.configure);
10
+ const q = R.configure.runtime ? R.configure.runtime : {}, S = q.style, z = q.class, I = q.headerStyle, T = q.titleExceedStyle, W = t(q.props ? q.props : {});
11
+ let D = V(j, k);
12
+ function E(e3) {
13
+ return void 0 !== W.value[e3] && null !== W.value[e3] && "" !== W.value[e3];
13
14
  }
14
- null == I || "number" != typeof I || I + "" != "1" && I + "" != "0" || (T("activeValue") || (z.value.activeValue = 1), T("inactiveValue") || (z.value.inactiveValue = 0)), null != I && "boolean" == typeof I && (T("activeValue") || (z.value.activeValue = true), T("inactiveValue") || (z.value.inactiveValue = false)), T("activeValue") || (z.value.activeValue = true), T("inactiveValue") || (z.value.inactiveValue = false);
15
- const W = _.switchStyle, D = l({ get() {
16
- let e3 = V(w, R);
17
- return null != e3 && (true === z.value.activeValue ? (e3 + "" == "1" && (e3 = true), e3 + "" == "0" && (e3 = false)) : 1 === z.value.activeValue ? (e3 + "" == "true" && (e3 = 1), e3 + "" == "false" && (e3 = 0)) : e3 += ""), e3;
15
+ null == D || "number" != typeof D || D + "" != "1" && D + "" != "0" || (E("activeValue") || (W.value.activeValue = 1), E("inactiveValue") || (W.value.inactiveValue = 0)), null != D && "boolean" == typeof D && (E("activeValue") || (W.value.activeValue = true), E("inactiveValue") || (W.value.inactiveValue = false)), E("activeValue") || (W.value.activeValue = true), E("inactiveValue") || (W.value.inactiveValue = false);
16
+ const O = q.switchStyle, U = l({ get() {
17
+ let e3 = V(j, k);
18
+ return null != e3 && (true === W.value.activeValue ? (e3 + "" == "1" && (e3 = true), e3 + "" == "0" && (e3 = false)) : 1 === W.value.activeValue ? (e3 + "" == "true" && (e3 = 1), e3 + "" == "false" && (e3 = 0)) : e3 += ""), e3;
18
19
  }, set(e3) {
19
- null != e3 && (true === z.value.activeValue ? (e3 + "" == "1" && (e3 = true), e3 + "" == "0" && (e3 = false)) : 1 === z.value.activeValue ? (e3 + "" == "true" && (e3 = 1), e3 + "" == "false" && (e3 = 0)) : e3 += ""), y(w, R, e3);
20
- } }), E = t(null), O = t(null), U = t(null);
20
+ null != e3 && (true === W.value.activeValue ? (e3 + "" == "1" && (e3 = true), e3 + "" == "0" && (e3 = false)) : 1 === W.value.activeValue ? (e3 + "" == "true" && (e3 = 1), e3 + "" == "false" && (e3 = 0)) : e3 += ""), y(j, k, e3), null != e3 && (_.value = "");
21
+ } }), A = t(null), B = t(null), F = t(null);
21
22
  return a(() => {
22
- i(() => {
23
- const e3 = D.value;
24
- x(e3, C2.pageContext, C2.configure, { formItemRef: E.value, componentRef: O.value, titleRef: U.value, value: e3, entity: C2.pageContext.entity.data, pageData: C2.pageContext.entity.page });
23
+ u(() => {
24
+ const e3 = U.value;
25
+ x(e3, R.pageContext, R.configure, { formItemRef: A.value, componentRef: B.value, titleRef: F.value, value: e3, entity: R.pageContext.entity.data, pageData: R.pageContext.entity.page });
25
26
  });
26
- }), (e3, t2) => {
27
- const l2 = u("el-switch"), a2 = u("el-form-item");
28
- return v(), n(a2, { ref_key: "formItemRef", ref: E, required: z.value.required, class: c(r(k)), "label-width": z.value.labelWidth, style: o(r(j)) }, { label: s(() => [z.value.tittleShow ? (v(), p("div", { key: 0, ref_key: "titleRef", ref: U, style: o({ ...r(S), ...r(q) }) }, m(r(b)(z.value.title)), 5)) : d("", true)]), default: s(() => [f(l2, { ref_key: "componentRef", ref: O, disabled: "disabled" === z.value.state, "active-value": z.value.activeValue, "active-text": z.value.activeText, "inactive-value": z.value.inactiveValue, "inactive-text": z.value.inactiveText, width: z.value.offOnWidth, size: z.value.size, style: o(r(W)), modelValue: D.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => D.value = e4), onChange: t2[1] || (t2[1] = (t3) => r(h)(t3, e3.pageContext, e3.configure, "change")) }, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
27
+ }), w2({ addRequiredClass: function() {
28
+ _.value = b();
29
+ } }), (e3, t2) => {
30
+ const l2 = i("el-switch"), a2 = i("el-form-item");
31
+ return v(), n(a2, { ref_key: "formItemRef", ref: A, required: W.value.required, class: r(c(z) + (_.value ? " " + _.value : "")), "label-width": W.value.labelWidth, style: o(c(S)) }, { label: s(() => [W.value.tittleShow ? (v(), p("div", { key: 0, ref_key: "titleRef", ref: F, style: o({ ...c(I), ...c(T) }) }, d(c(C)(W.value.title)), 5)) : m("", true)]), default: s(() => [f(l2, { ref_key: "componentRef", ref: B, disabled: "disabled" === W.value.state, "active-value": W.value.activeValue, "active-text": W.value.activeText, "inactive-value": W.value.inactiveValue, "inactive-text": W.value.inactiveText, width: W.value.offOnWidth, size: W.value.size, style: o(c(O)), modelValue: U.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => U.value = e4), onChange: t2[1] || (t2[1] = (t3) => c(h)(t3, e3.pageContext, e3.configure, "change")) }, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
29
32
  };
30
33
  } });
31
34
  export {
32
- C as default
35
+ w as default
33
36
  };