super-page-runtime 2.3.8 → 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 (40) 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 +57 -57
  3. package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
  4. package/dist/es/components/runtime/utils/common-util.js +4 -0
  5. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  6. package/dist/es/components/runtime/utils/events/print-label.js +25 -26
  7. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  8. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  9. package/dist/es/components/runtime/utils/events/validator-util.js +122 -104
  10. package/dist/es/components/runtime/utils/page-init-util.js +24 -25
  11. package/dist/es/components/runtime/utils/page-store.js +10 -10
  12. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  13. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  14. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  15. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +89 -94
  16. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  17. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
  18. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  19. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -2
  20. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +22 -19
  21. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +34 -31
  22. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
  23. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +32 -25
  24. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +52 -49
  25. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
  26. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
  27. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
  28. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -55
  29. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
  30. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
  31. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
  32. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +55 -53
  33. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +63 -61
  34. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
  35. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
  36. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  37. package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
  38. package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
  39. package/package.json +2 -2
  40. package/dist/es.zip +0 -0
@@ -5,65 +5,68 @@ import b from "agilebuilder-ui/src/utils/request";
5
5
  import { FsUploadNew as w } from "agilebuilder-ui";
6
6
  import x from "../../../../utils/eventBus.js";
7
7
  import { $t as k } from "../../../../utils/i18n-util.js";
8
- const P = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
9
- const P2 = e2, _ = P2.configure.runtime ? P2.configure.runtime : {}, j = l(_.props ? _.props : {}), N = _.style, R = _.class, T = _.headerStyle, z = _.titleExceedStyle, D = P2.pageContext.entity ? P2.pageContext.entity : {}, I = P2.configure.props.base ? P2.configure.props.base : {}, O = G(I.prop), S = G(I.propName);
10
- O && O.length > 1 && t(() => P2.pageContext.entity[O[0]][O[1]], (e3) => {
11
- A(h(D, O));
8
+ import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
9
+ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
10
+ const j = e2, N = l(null), R = j.configure.runtime ? j.configure.runtime : {}, T = l(R.props ? R.props : {}), z = R.style, D = R.class, I = R.headerStyle, O = R.titleExceedStyle, S = j.pageContext.entity ? j.pageContext.entity : {}, q = j.configure.props.base ? j.configure.props.base : {}, F = K(q.prop), U = K(q.propName);
11
+ F && F.length > 1 && t(() => j.pageContext.entity[F[0]][F[1]], (e3) => {
12
+ J(h(S, F));
12
13
  });
13
- const F = P2.pageContext.code, q = l(O ? F + "__" + O.join("__") : null), U = h(D, O), $ = l(null), W = l(false), B = l([]), E = l({});
14
- function A(e3) {
14
+ const $ = j.pageContext.code, W = l(F ? $ + "__" + F.join("__") : null), B = h(S, F), E = l(null), A = l(false), G = l([]), H = l({});
15
+ function J(e3) {
15
16
  if (e3) {
16
17
  const l2 = e3.split(",");
17
18
  if (l2.length > 0) {
18
- const e4 = P2.pageContext.backendUrl;
19
+ const e4 = j.pageContext.backendUrl;
19
20
  b.post(e4 + "/common/fs-upload/search-file-names", l2).then((e5) => {
20
- B.value = [];
21
+ G.value = [];
21
22
  const t2 = [];
22
23
  for (let o2 = 0; o2 < l2.length; o2++) {
23
24
  const a2 = l2[o2];
24
- t2.push(e5[a2]), B.value.push({ showName: e5[a2], serverPath: a2 });
25
+ t2.push(e5[a2]), G.value.push({ showName: e5[a2], serverPath: a2 });
25
26
  }
26
- "input" === j.value.displayType && (E.value.showName = t2.join(","), E.value.serverPath = l2.join(","));
27
+ "input" === T.value.displayType && (H.value.showName = t2.join(","), H.value.serverPath = l2.join(","));
27
28
  }).finally(() => {
28
- W.value = true;
29
+ A.value = true;
29
30
  });
30
- } else W.value = true;
31
- } else B.value = [], E.value = {}, W.value = true;
31
+ } else A.value = true;
32
+ } else G.value = [], H.value = {}, A.value = true;
32
33
  }
33
- function G(e3) {
34
+ function K(e3) {
34
35
  return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
35
36
  }
36
- function H(e3) {
37
+ function L(e3) {
37
38
  return C(e3);
38
39
  }
39
- A(U);
40
- const J = (e3, l2, t2) => {
41
- L();
42
- }, K = (e3) => {
43
- L();
44
- }, L = () => {
40
+ J(B);
41
+ const M = (e3, l2, t2) => {
42
+ V();
43
+ }, Q = (e3) => {
44
+ V();
45
+ }, V = () => {
45
46
  const e3 = [], l2 = [];
46
- if (j.value.limit && B.value.length > j.value.limit) {
47
- const e4 = B.value.length - j.value.limit;
48
- for (let l3 = 0; l3 < e4; l3++) B.value.shift();
47
+ if (T.value.limit && G.value.length > T.value.limit) {
48
+ const e4 = G.value.length - T.value.limit;
49
+ for (let l3 = 0; l3 < e4; l3++) G.value.shift();
49
50
  }
50
- for (let t2 = 0; t2 < B.value.length; t2++) e3.push(B.value[t2].showName), l2.push(B.value[t2].serverPath);
51
- y(P2.pageContext.entity, O, l2.join(",")), y(P2.pageContext.entity, S, e3.join(","));
52
- }, M = l(null), Q = l(null);
51
+ for (let t2 = 0; t2 < G.value.length; t2++) e3.push(G.value[t2].showName), l2.push(G.value[t2].serverPath);
52
+ y(j.pageContext.entity, F, l2.join(",")), y(j.pageContext.entity, U, e3.join(",")), l2.length > 0 && (N.value = "");
53
+ }, X = l(null), Y = l(null);
53
54
  return o(() => {
54
- x.$on(q.value + "-pickFileDone", (e3) => {
55
- q.value, $.value.pickFileDone(e3);
55
+ x.$on(W.value + "-pickFileDone", (e3) => {
56
+ E.value.pickFileDone(e3);
56
57
  }), a(() => {
57
- const e3 = h(D, O), l2 = { showName: h(D, S), serverPath: e3 };
58
- g(l2, P2.pageContext, P2.configure, { formItemRef: M.value, componentRef: $.value, titleRef: Q.value, value: l2, entity: P2.pageContext.entity.data, pageData: P2.pageContext.entity.page });
58
+ const e3 = h(S, F), l2 = { showName: h(S, U), serverPath: e3 };
59
+ g(l2, j.pageContext, j.configure, { formItemRef: X.value, componentRef: E.value, titleRef: Y.value, value: l2, entity: j.pageContext.entity.data, pageData: j.pageContext.entity.page });
59
60
  });
60
61
  }), i(() => {
61
- x.$off(q.value + "-pickFileDone");
62
- }), (e3, l2) => {
62
+ x.$off(W.value + "-pickFileDone");
63
+ }), _2({ addRequiredClass: function() {
64
+ N.value = P();
65
+ } }), (e3, l2) => {
63
66
  const t2 = n("el-form-item");
64
- return j.value.tittleShow ? (p(), s(t2, { key: 0, ref_key: "formItemRef", ref: M, required: j.value.required, class: d(v(R)), "label-width": j.value.labelWidth, style: r(v(N)) }, { label: m(() => [j.value.tittleShow ? (p(), f("div", { key: 0, ref_key: "titleRef", ref: Q, style: r({ ...v(T), ...v(z) }) }, c(v(k)(j.value.title)), 5)) : u("", true)]), default: m(() => [W.value ? (p(), s(v(w), { key: 0, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, "disabled-no-preview": j.value.disabledNoPreview, "disabled-no-download": j.value.disabledNoDownload, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : W.value ? (p(), s(v(w), { key: 1, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, "disabled-no-preview": j.value.disabledNoPreview, "disabled-no-download": j.value.disabledNoDownload, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true);
67
+ return T.value.tittleShow ? (p(), s(t2, { key: 0, ref_key: "formItemRef", ref: X, required: T.value.required, class: d(v(D) + (N.value ? " " + N.value : "")), "label-width": T.value.labelWidth, style: r(v(z)) }, { label: m(() => [T.value.tittleShow ? (p(), f("div", { key: 0, ref_key: "titleRef", ref: Y, style: r({ ...v(I), ...v(O) }) }, c(v(k)(T.value.title)), 5)) : u("", true)]), default: m(() => [A.value ? (p(), s(v(w), { key: 0, ref_key: "fileUploadRef", ref: E, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": H.value, "file-list": G.value, "system-code": e3.pageContext.systemCode, componentId: W.value, "on-success": M, "on-remove": Q, "before-upload": L, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : A.value ? (p(), s(v(w), { key: 1, ref_key: "fileUploadRef", ref: E, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": H.value, "file-list": G.value, "system-code": e3.pageContext.systemCode, componentId: W.value, "on-success": M, "on-remove": Q, "before-upload": L, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true);
65
68
  };
66
69
  } });
67
70
  export {
68
- P as default
71
+ _ as default
69
72
  };
@@ -1,25 +1,28 @@
1
- import { defineComponent as e, computed as t, ref as l, onMounted as o, nextTick as a, resolveComponent as n, createBlock as u, openBlock as r, normalizeStyle as i, normalizeClass as p, unref as s, withCtx as m, createVNode as f, createElementBlock as c, createCommentVNode as d, Fragment as g, createTextVNode as v, toDisplayString as y } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as a, resolveComponent as n, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as m, createVNode as f, createElementBlock as c, createCommentVNode as d, Fragment as v, createTextVNode as g, toDisplayString as y } from "vue";
2
2
  import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
3
  import { setVariableValue as C, getVariableValue as h } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as b, handleFormEvent as k } from "../../../../utils/events/event-util.js";
5
- import R from "../common/title-suffix-element.vue.js";
6
- import { $t as _ } from "../../../../utils/i18n-util.js";
7
- const j = e({ __name: "input-number-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
8
- const j2 = e2, w = j2.pageContext.entity ? j2.pageContext.entity : {};
9
- let q = x(j2.pageContext, j2.configure);
10
- const z = t({ get: () => h(w, q), set(e3) {
11
- C(w, q, e3);
12
- } }), S = j2.configure.runtime ? j2.configure.runtime : {}, V = S.style, B = S.class, I = S.headerStyle, D = S.titleExceedStyle, E = l(S.props ? S.props : {}), F = l(null), T = l(null), U = l(null);
4
+ import { handleAfterInitEvent as b, handleFormEvent as R } from "../../../../utils/events/event-util.js";
5
+ import j from "../common/title-suffix-element.vue.js";
6
+ import { $t as k } from "../../../../utils/i18n-util.js";
7
+ import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
8
+ const q = e({ __name: "input-number-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
9
+ const w = e2, z = t(null), S = w.pageContext.entity ? w.pageContext.entity : {};
10
+ let V = x(w.pageContext, w.configure);
11
+ const B = l({ get: () => h(S, V), set(e3) {
12
+ C(S, V, e3), null != e3 && (z.value = "");
13
+ } }), I = w.configure.runtime ? w.configure.runtime : {}, D = I.style, E = I.class, F = I.headerStyle, T = I.titleExceedStyle, U = t(I.props ? I.props : {}), W = t(null), A = t(null), G = t(null);
13
14
  return o(() => {
14
15
  a(() => {
15
- const e3 = z.value;
16
- b(e3, j2.pageContext, j2.configure, { formItemRef: F.value, componentRef: T.value, titleRef: U.value, value: e3, entity: j2.pageContext.entity.data, pageData: j2.pageContext.entity.page });
16
+ const e3 = B.value;
17
+ b(e3, w.pageContext, w.configure, { formItemRef: W.value, componentRef: A.value, titleRef: G.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
17
18
  });
18
- }), (e3, t2) => {
19
+ }), q2({ addRequiredClass: function() {
20
+ z.value = _();
21
+ } }), (e3, t2) => {
19
22
  const l2 = n("el-input-number"), o2 = n("el-form-item");
20
- return r(), u(o2, { ref_key: "formItemRef", ref: F, required: E.value.required, class: p(s(B)), "label-width": E.value.labelWidth, style: i(s(V)) }, { label: m(() => [E.value.tittleShow ? (r(), c("div", { key: 0, ref_key: "titleRef", ref: U, style: i({ ...s(I), ...s(D) }) }, [E.value.prefixType ? (r(), u(R, { key: 0, pageContext: e3.pageContext, property: E.value }, null, 8, ["pageContext", "property"])) : (r(), c(g, { key: 1 }, [v(y(s(_)(E.value.title)), 1)], 64))], 4)) : d("", true)]), default: m(() => [f(l2, { ref_key: "componentRef", ref: T, disabled: "disabled" === E.value.state, readonly: "readonly" === E.value.state, controls: E.value.showButton, size: E.value.size, placeholder: E.value.placeholder, modelValue: z.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => z.value = e4), precision: E.value.precision, step: E.value.step, min: E.value.min, max: E.value.max, onChange: t2[1] || (t2[1] = (t3) => s(k)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[2] || (t2[2] = (t3) => s(k)(t3, e3.pageContext, e3.configure, "blur")), onFocus: t2[3] || (t2[3] = (t3) => s(k)(t3, e3.pageContext, e3.configure, "focus")) }, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
23
+ return i(), u(o2, { ref_key: "formItemRef", ref: W, required: U.value.required, class: s(p(E) + (z.value ? " " + z.value : "")), "label-width": U.value.labelWidth, style: r(p(D)) }, { label: m(() => [U.value.tittleShow ? (i(), c("div", { key: 0, ref_key: "titleRef", ref: G, style: r({ ...p(F), ...p(T) }) }, [U.value.prefixType ? (i(), u(j, { key: 0, pageContext: e3.pageContext, property: U.value }, null, 8, ["pageContext", "property"])) : (i(), c(v, { key: 1 }, [g(y(p(k)(U.value.title)), 1)], 64))], 4)) : d("", true)]), default: m(() => [f(l2, { ref_key: "componentRef", ref: A, disabled: "disabled" === U.value.state, readonly: "readonly" === U.value.state, controls: U.value.showButton, size: U.value.size, placeholder: U.value.placeholder, modelValue: B.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => B.value = e4), precision: U.value.precision, step: U.value.step, min: U.value.min, max: U.value.max, onChange: t2[1] || (t2[1] = (t3) => p(R)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[2] || (t2[2] = (t3) => p(R)(t3, e3.pageContext, e3.configure, "blur")), onFocus: t2[3] || (t2[3] = (t3) => p(R)(t3, e3.pageContext, e3.configure, "focus")) }, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
21
24
  };
22
25
  } });
23
26
  export {
24
- j as default
27
+ q as default
25
28
  };
@@ -1,79 +1,81 @@
1
- import { defineComponent as e, ref as t, computed as n, onMounted as o, nextTick as l, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, createSlots as d, createTextVNode as m, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
2
2
  import { SuperIcon as T } from "agilebuilder-ui";
3
3
  import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
4
4
  import { getModelFieldFromPageContext as w, isNumberDataType as V, setVariableValue as h, getVariableValue as b } from "../../../../utils/page-helper-util.js";
5
5
  import { handleFormEvent as _, handleAfterInitEvent as S, doSuffixOrPrefixClickEvent as j } from "../../../../utils/events/event-util.js";
6
- import { formatScanRuleSets as O, analysisScanValue as R, setScanAnalysisValue as N } from "../../../../utils/form/scan-util.js";
6
+ import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as q } from "../../../../utils/form/scan-util.js";
7
7
  import D from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as J } from "agilebuilder-ui/src/utils/common-util";
9
- import M from "../../../../utils/eventBus.js";
8
+ import { isMobileBrowser as M } from "agilebuilder-ui/src/utils/common-util";
9
+ import N from "../../../../utils/eventBus.js";
10
10
  import { $t as P } from "../../../../utils/i18n-util.js";
11
- const q = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
11
+ import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
12
+ const J = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: J2 }) {
12
13
  var _a, _b, _c;
13
- const z = e2, L = z.pageContext.entity ? z.pageContext.entity : {}, B = t("text");
14
- let F = k(z.pageContext, z.configure);
15
- if (z.pageContext.modelFieldsMap) {
16
- const e3 = w(F, z.pageContext);
17
- e3 && (B.value = V(e3.dataType) ? "number" : "text");
14
+ const L = e2, B = L.pageContext.entity ? L.pageContext.entity : {}, F = t("text");
15
+ let $ = k(L.pageContext, L.configure);
16
+ if (L.pageContext.modelFieldsMap) {
17
+ const e3 = w($, L.pageContext);
18
+ e3 && (F.value = V(e3.dataType) ? "number" : "text");
18
19
  }
19
- const $ = t(J()), A = z.pageContext.code, E = t(F && F.length > 0 ? A + "__" + F.join("__") : null), U = n({ get: () => b(L, F), set(e3) {
20
- h(L, F, e3);
21
- } }), W = t(null), G = t(null), H = t(null), K = z.configure.runtime ? z.configure.runtime : {}, Q = t(K.props ? K.props : {}), X = t(!!((_a = Q.value.scan) == null ? void 0 : _a.enable));
22
- let Y = false;
23
- const Z = window.localStorage.getItem("auth_source");
24
- Z && "dingtalk" === Z && (Y = true);
25
- let ee = "";
26
- const te = navigator.userAgent;
27
- ee = te.indexOf(" uni-app ") > 0 ? "app" : "browser";
28
- const ne = !(!$.value || !ee || "app" !== ee), oe = t(!!((ne || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
29
- let le = {};
30
- ((_b = Q.value.scan) == null ? void 0 : _b.enable) && ((_c = Q.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (O(Q.value.scan.ruleList).then((e3) => {
31
- le = e3;
32
- }), u(() => U.value, (e3) => {
20
+ const A = t(M()), E = L.pageContext.code, U = t($ && $.length > 0 ? E + "__" + $.join("__") : null), W = t(null), G = l({ get: () => b(B, $), set(e3) {
21
+ h(B, $, e3), null != e3 && "" !== e3 && (W.value = "");
22
+ } }), H = t(null), K = t(null), Q = t(null), X = L.configure.runtime ? L.configure.runtime : {}, Y = t(X.props ? X.props : {}), Z = t(!!((_a = Y.value.scan) == null ? void 0 : _a.enable));
23
+ let ee = false;
24
+ const te = window.localStorage.getItem("auth_source");
25
+ te && "dingtalk" === te && (ee = true);
26
+ let le = "";
27
+ le = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
28
+ const ne = !(!A.value || !le || "app" !== le), oe = t(!!((ne || ee) && Z.value || A.value && Z.value && "https:" === window.location.protocol));
29
+ let ae = {};
30
+ ((_b = Y.value.scan) == null ? void 0 : _b.enable) && ((_c = Y.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(Y.value.scan.ruleList).then((e3) => {
31
+ ae = e3;
32
+ }), u(() => G.value, (e3) => {
33
33
  e3 = e3.trim();
34
- const t2 = R(e3, le);
35
- t2 && N(z.pageContext, t2.scanSet, t2.params);
34
+ const t2 = O(e3, ae);
35
+ t2 && q(L.pageContext, t2.scanSet, t2.params);
36
36
  }));
37
- const ae = K.style, ue = K.class, ie = K.headerStyle, re = K.titleExceedStyle;
38
- function pe(e3) {
39
- return h(L, F, e3);
37
+ const ue = X.style, ie = X.class, re = X.headerStyle, pe = X.titleExceedStyle;
38
+ function se(e3) {
39
+ return h(B, $, e3);
40
40
  }
41
- o(() => {
42
- M.$on(E.value + "-scanDone", (e3) => {
43
- E.value, JSON.stringify(e3), pe(e3.result), _(e3.result, z.pageContext, z.configure, "afterScanDone");
44
- }), l(() => {
41
+ n(() => {
42
+ N.$on(U.value + "-scanDone", (e3) => {
43
+ se(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
44
+ }), o(() => {
45
45
  var _a2;
46
- const e3 = U.value;
47
- S(e3, z.pageContext, z.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page }), oe.value && ((_a2 = Q.value.scan) == null ? void 0 : _a2.autoOpen) && ce();
46
+ const e3 = G.value;
47
+ S(e3, L.pageContext, L.configure, { formItemRef: H.value, componentRef: K.value, titleRef: Q.value, value: e3, entity: L.pageContext.entity.data, pageData: L.pageContext.entity.page }), oe.value && ((_a2 = Y.value.scan) == null ? void 0 : _a2.autoOpen) && ve();
48
48
  });
49
49
  }), a(() => {
50
- M.$off(E.value + "-scanDone");
50
+ N.$off(U.value + "-scanDone");
51
51
  });
52
- const se = t(false);
53
- function ce() {
54
- if (ne || Y) {
55
- const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
56
- Y && (e3.type = "dingTalkScan"), window.parent.parent ? (window.parent.parent, window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (window.parent, window.parent.postMessage(JSON.stringify(e3), "*"));
57
- } else if ($.value) if ("https:" === window.location.protocol) se.value = true;
52
+ const ce = t(false);
53
+ function ve() {
54
+ if (ne || ee) {
55
+ const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
56
+ ee && (e3.type = "dingTalkScan"), window.parent.parent ? window.parent.parent.postMessage(JSON.stringify(e3), "*") : window.parent && window.parent.postMessage(JSON.stringify(e3), "*");
57
+ } else if (A.value) if ("https:" === window.location.protocol) ce.value = true;
58
58
  else {
59
- const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
59
+ const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
60
60
  window.parent.postMessage(JSON.stringify(e3), "*");
61
61
  }
62
- else se.value = true;
62
+ else ce.value = true;
63
63
  }
64
- function ve(e3) {
65
- se.value = false, pe(e3);
64
+ function fe(e3) {
65
+ ce.value = false, se(e3);
66
66
  }
67
- return q2({ getValue: function() {
68
- return b(L, F);
69
- }, setValue: pe, scanClick: ce }), (e3, t2) => {
70
- const n2 = i("el-input"), o2 = i("scan-code-input-browser"), l2 = i("el-form-item");
71
- return p(), r(l2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: c(v(ue)), "label-width": Q.value.labelWidth, style: s(v(ae)) }, { label: f(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: s({ ...v(ie), ...v(re) }) }, [Q.value.prefixType ? (p(), r(D, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [m(x(v(P)(Q.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(n2, { ref_key: "componentRef", ref: G, disabled: "disabled" === Q.value.state, readonly: "readonly" === Q.value.state, size: Q.value.size, clearable: Q.value.clearable, placeholder: Q.value.placeholder, maxlength: Q.value.maxLength, "show-word-limit": Q.value.showInputNum, type: B.value, modelValue: U.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => U.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
72
- let t3 = b(L, F);
73
- null != t3 && (t3 = t3.trim()), h(L, F, t3), _(e5, z.pageContext, z.configure, "blur");
74
- }(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, d({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: f(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "append", fn: f(() => [oe.value ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ce()) })) : g("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), se.value ? (p(), r(o2, { key: 0, onClose: ve })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
67
+ return J2({ getValue: function() {
68
+ return b(B, $);
69
+ }, setValue: se, scanClick: ve, addRequiredClass: function() {
70
+ W.value = z();
71
+ } }), (e3, t2) => {
72
+ const l2 = i("el-input"), n2 = i("scan-code-input-browser"), o2 = i("el-form-item");
73
+ return p(), r(o2, { ref_key: "formItemRef", ref: H, required: !!Y.value.required, class: c(v(ie) + (W.value ? " " + W.value : "")), "label-width": Y.value.labelWidth, style: s(v(ue)) }, { label: f(() => [Y.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: Q, style: s({ ...v(re), ...v(pe) }) }, [Y.value.prefixType ? (p(), r(D, { key: 0, pageContext: e3.pageContext, property: Y.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(v(P)(Y.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(l2, { ref_key: "componentRef", ref: K, disabled: "disabled" === Y.value.state, readonly: "readonly" === Y.value.state, size: Y.value.size, clearable: Y.value.clearable, placeholder: Y.value.placeholder, maxlength: Y.value.maxLength, "show-word-limit": Y.value.showInputNum, type: F.value, modelValue: G.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => G.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
74
+ let t3 = b(B, $);
75
+ null != t3 && (t3 = t3.trim()), h(B, $, t3), _(e5, L.pageContext, L.configure, "blur");
76
+ }(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, m({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.preText)), 1)]), key: "0" } : void 0, "outer" == Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prepend", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.preText)), 1)]), key: "1" } : void 0, "outer" != Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "suffix", fn: f(() => [Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "append", fn: f(() => [oe.value ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ve()) })) : g("", true), Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ce.value ? (p(), r(n2, { key: 0, onClose: fe })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
75
77
  };
76
78
  } });
77
79
  export {
78
- q as default
80
+ J as default
79
81
  };
@@ -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
  };