super-page-runtime 2.3.43-sit2 → 2.3.43

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 (70) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +136 -136
  2. package/dist/es/components/runtime/utils/events/event-util.js +122 -122
  3. package/dist/es/components/runtime/utils/events/print-label.js +34 -33
  4. package/dist/es/components/runtime/utils/events/standard-event.js +22 -22
  5. package/dist/es/components/runtime/utils/events/validator-util.js +84 -81
  6. package/dist/es/components/runtime/utils/page-init-util.js +43 -41
  7. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  8. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
  9. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
  10. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
  11. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
  12. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
  13. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
  14. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  15. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
  16. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
  17. package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js +8 -8
  18. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
  21. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
  22. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +100 -95
  23. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -2
  24. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
  25. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +11 -9
  26. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
  27. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
  28. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
  29. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
  30. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
  31. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
  32. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
  33. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
  34. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
  35. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +11 -9
  36. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
  37. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
  38. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
  39. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
  40. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
  41. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
  42. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +22 -22
  43. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
  44. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
  45. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +7 -6
  46. package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js +6 -5
  47. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
  48. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +48 -47
  49. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -4
  50. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +9 -7
  51. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
  52. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
  53. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -72
  54. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +9 -8
  55. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
  56. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
  57. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
  58. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
  59. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
  60. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +11 -9
  61. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +2 -2
  62. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +3 -3
  63. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
  64. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
  65. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
  66. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  67. package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
  68. package/dist/es/components/runtime/views/super-page.vue2.js +4 -3
  69. package/dist/es/style.css +54 -54
  70. package/package.json +2 -2
@@ -1,80 +1,81 @@
1
- import { defineComponent as e, ref as l, computed as t, onMounted as n, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as p, normalizeClass as c, unref as f, createSlots as v, withCtx as g, createVNode as m, createCommentVNode as y, createTextVNode as d, toDisplayString as x, createElementVNode as C, createElementBlock as k, Fragment as T } from "vue";
1
+ import { defineComponent as e, ref as n, computed as t, onMounted as l, 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 f, createSlots as v, withCtx as g, createVNode as y, createCommentVNode as m, createTextVNode as d, toDisplayString as x, createElementVNode as C, createElementBlock as k, Fragment as T } from "vue";
2
2
  import { SuperIcon as I } from "agilebuilder-ui";
3
- import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
4
- import { getModelFieldFromPageContext as w, isNumberDataType as h, setVariableValue as b, getVariableValue as _ } from "../../../../utils/page-helper-util.js";
5
- import { handleFormEvent as j, handleAfterInitEvent as P, doSuffixOrPrefixClickEvent as S } from "../../../../utils/events/event-util.js";
6
- import { formatScanRuleSets as R, analysisScanValue as L, setScanAnalysisValue as O } from "../../../../utils/form/scan-util.js";
7
- import q from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as D, isDingTalkEnv as M } from "agilebuilder-ui/src/utils/common-util";
9
- import N from "../../../../utils/eventBus.js";
10
- import { $t as z } from "../../../../utils/i18n-util.js";
11
- import { addRequiredClassUtil as J } from "../../../../utils/common-util.js";
3
+ import { getFormModelFields as w } from "../../../../utils/page-init-util.js";
4
+ import { getModelFieldFromPageContext as V, isNumberDataType as h, setVariableValue as b, getVariableValue as _ } from "../../../../utils/page-helper-util.js";
5
+ import { handleFormEvent as S, handleAfterInitEvent as j, doSuffixOrPrefixClickEvent as P } from "../../../../utils/events/event-util.js";
6
+ import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as L } from "../../../../utils/form/scan-util.js";
7
+ import N from "../common/title-suffix-element.vue.js";
8
+ import { isMobileBrowser as q, isDingTalkEnv as D } from "agilebuilder-ui/src/utils/common-util";
9
+ import J from "../../../../utils/eventBus.js";
10
+ import { $t as M } from "../../../../utils/i18n-util.js";
11
+ import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
12
12
  const B = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
13
13
  var _a, _b, _c;
14
- const F = e2, $ = F.pageContext.entity ? F.pageContext.entity : {}, A = l("text");
15
- let E = V(F.pageContext, F.configure);
14
+ const F = e2, $ = F.pageContext.entity ? F.pageContext.entity : {}, A = n("text");
15
+ let E = w(F.pageContext, F.configure);
16
16
  if (F.pageContext.modelFieldsMap) {
17
- const e3 = w(E, F.pageContext);
17
+ const e3 = V(E, F.pageContext);
18
18
  e3 && (A.value = h(e3.dataType) ? "number" : "text");
19
19
  }
20
- const H = l(D()), U = F.pageContext.code, W = l(E && E.length > 0 ? U + "__" + E.join("__") : null), G = l(null), K = t({ get: () => _($, E), set(e3) {
20
+ const H = n(q()), U = F.pageContext.code, W = n(E && E.length > 0 ? U + "__" + E.join("__") : null), G = n(null), K = t({ get: () => _($, E), set(e3) {
21
21
  b($, E, e3), null != e3 && "" !== e3 && (G.value = "");
22
- } }), Q = l(null), X = l(null), Y = l(null);
22
+ } }), Q = n(null), X = n(null), Y = n(null);
23
23
  F.configure.props.suffixLinkPage && !F.configure.props.linkPage && (F.configure.props.linkPage = F.configure.props.suffixLinkPage);
24
- const Z = F.configure.runtime ? F.configure.runtime : {}, ee = l(Z.props ? Z.props : {}), le = l(!!((_a = ee.value.scan) == null ? void 0 : _a.enable));
24
+ const Z = F.configure.runtime ? F.configure.runtime : {}, ee = n(Z.props ? Z.props : {}), ne = n(!!((_a = ee.value.scan) == null ? void 0 : _a.enable));
25
25
  let te = false;
26
- M() && (te = true);
27
- let ne = "";
28
- ne = navigator.userAgent.indexOf("Html5Plus") > 0 ? "app" : "browser";
29
- const oe = !(!H.value || !ne || "app" !== ne), ae = l(!!((oe || te) && le.value || H.value && le.value && "https:" === window.location.protocol));
30
- let ue = {};
26
+ D() && (te = true);
27
+ let le = "";
28
+ const oe = navigator.userAgent;
29
+ le = oe.indexOf("Html5Plus") > 0 ? "app" : "browser";
30
+ const ae = !(!H.value || !le || "app" !== le), ue = n(!!((ae || te) && ne.value || H.value && ne.value && "https:" === window.location.protocol));
31
+ let ie = {};
31
32
  ((_b = ee.value.scan) == null ? void 0 : _b.enable) && ((_c = ee.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(ee.value.scan.ruleList).then((e3) => {
32
- ue = e3;
33
+ ie = e3;
33
34
  }), u(() => K.value, (e3) => {
34
35
  e3 = e3.trim();
35
- const l2 = L(e3, ue);
36
- l2 && O(F.pageContext, l2.scanSet, l2.params);
36
+ const n2 = O(e3, ie);
37
+ n2 && L(F.pageContext, n2.scanSet, n2.params);
37
38
  }));
38
- const ie = Z.style, re = Z.class, se = Z.headerStyle, pe = Z.titleExceedStyle;
39
- function ce(e3) {
39
+ const re = Z.style, pe = Z.class, se = Z.headerStyle, ce = Z.titleExceedStyle;
40
+ function fe(e3) {
40
41
  return b($, E, e3);
41
42
  }
42
- n(() => {
43
- N.$on(W.value + "-scanDone", (e3) => {
44
- ce(e3.result), j(e3.result, F.pageContext, F.configure, "afterScanDone");
43
+ l(() => {
44
+ J.$on(W.value + "-scanDone", (e3) => {
45
+ W.value, JSON.stringify(e3), fe(e3.result), S(e3.result, F.pageContext, F.configure, "afterScanDone");
45
46
  }), o(() => {
46
47
  var _a2;
47
48
  const e3 = K.value;
48
- P(e3, F.pageContext, F.configure, { formItemRef: Q.value, componentRef: X.value, titleRef: Y.value, value: e3, entity: F.pageContext.entity.data, pageData: F.pageContext.entity.page }), ae.value && ((_a2 = ee.value.scan) == null ? void 0 : _a2.autoOpen) && ve();
49
+ j(e3, F.pageContext, F.configure, { formItemRef: Q.value, componentRef: X.value, titleRef: Y.value, value: e3, entity: F.pageContext.entity.data, pageData: F.pageContext.entity.page }), ue.value && ((_a2 = ee.value.scan) == null ? void 0 : _a2.autoOpen) && ge();
49
50
  });
50
51
  }), a(() => {
51
- N.$off(W.value + "-scanDone");
52
+ J.$off(W.value + "-scanDone");
52
53
  });
53
- const fe = l(false);
54
- function ve() {
55
- if (oe || te) {
54
+ const ve = n(false);
55
+ function ge() {
56
+ if (ae || te) {
56
57
  const e3 = { type: "scan", componentId: W.value, systemCode: F.pageContext.systemCode };
57
- te && (e3.type = "dingTalkScan"), window.parent.parent ? window.parent.parent.postMessage(JSON.stringify(e3), "*") : window.parent && window.parent.postMessage(JSON.stringify(e3), "*");
58
- } else if (H.value) if ("https:" === window.location.protocol) fe.value = true;
58
+ te && (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), "*"));
59
+ } else if (H.value) if ("https:" === window.location.protocol) ve.value = true;
59
60
  else {
60
61
  const e3 = { type: "scan", componentId: W.value, systemCode: F.pageContext.systemCode };
61
62
  window.parent.postMessage(JSON.stringify(e3), "*");
62
63
  }
63
- else fe.value = true;
64
+ else ve.value = true;
64
65
  }
65
- function ge(e3) {
66
- fe.value = false, ce(e3);
66
+ function ye(e3) {
67
+ ve.value = false, fe(e3);
67
68
  }
68
69
  return B2({ getValue: function() {
69
70
  return _($, E);
70
- }, setValue: ce, scanClick: ve, addRequiredClass: function() {
71
- G.value = J();
72
- } }), (e3, l2) => {
73
- const t2 = i("el-input"), n2 = i("scan-code-input-browser"), o2 = i("el-form-item");
74
- return s(), r(o2, { ref_key: "formItemRef", ref: Q, required: !!ee.value.required, class: c(f(re) + (G.value ? " " + G.value : "")), "label-width": ee.value.labelWidth, style: p(f(ie)) }, v({ default: g(() => [m(t2, { ref_key: "componentRef", ref: X, disabled: "disabled" === ee.value.state, readonly: "readonly" === ee.value.state, size: ee.value.size, clearable: ee.value.clearable, placeholder: ee.value.placeholder, maxlength: ee.value.maxLength, "show-word-limit": ee.value.showInputNum, type: A.value, modelValue: K.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e4) => K.value = e4), onInput: l2[6] || (l2[6] = (l3) => f(j)(l3, e3.pageContext, e3.configure, "input")), onChange: l2[7] || (l2[7] = (l3) => f(j)(l3, e3.pageContext, e3.configure, "change")), onBlur: l2[8] || (l2[8] = (e4) => function(e5) {
75
- let l3 = _($, E);
76
- null != l3 && (l3 = l3.trim()), b($, E, l3), j(e5, F.pageContext, F.configure, "blur");
77
- }(e4)), onFocus: l2[9] || (l2[9] = (l3) => f(j)(l3, e3.pageContext, e3.configure, "focus")), onClick: l2[10] || (l2[10] = (l3) => f(j)(l3, e3.pageContext, e3.configure, "click")), onClear: l2[11] || (l2[11] = (l3) => f(j)(l3, e3.pageContext, e3.configure, "clear")) }, v({ _: 2 }, ["outer" != ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prefix", fn: g(() => [ee.value.preIconType && ee.value.preIconValue ? (s(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: l2[0] || (l2[0] = (l3) => f(S)(K.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(z)(ee.value.preText)), 1)]), key: "0" } : void 0, "outer" == ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prepend", fn: g(() => [ee.value.preIconType && ee.value.preIconValue ? (s(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: l2[1] || (l2[1] = (l3) => f(S)(K.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(z)(ee.value.preText)), 1)]), key: "1" } : void 0, "outer" != ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "suffix", fn: g(() => [ee.value.sufIconType && ee.value.sufIconValue ? (s(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: l2[2] || (l2[2] = (l3) => f(S)(K.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(z)(ee.value.sufText)), 1)]), key: "2" } : void 0, ae.value || "outer" == ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "append", fn: g(() => [ae.value ? (s(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e4) => ve()) })) : y("", true), ee.value.sufIconType && ee.value.sufIconValue ? (s(), r(f(I), { key: 1, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: l2[4] || (l2[4] = (l3) => f(S)(K.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(z)(ee.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), fe.value ? (s(), r(n2, { key: 0, onClose: ge })) : y("", true)]), _: 2 }, [ee.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: Y, class: "amb-form-item-label", style: p({ ...f(se), ...f(pe) }) }, [ee.value.prefixType ? (s(), r(q, { key: 0, pageContext: e3.pageContext, property: ee.value }, null, 8, ["pageContext", "property"])) : (s(), k(T, { key: 1 }, [d(x(f(z)(ee.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
71
+ }, setValue: fe, scanClick: ge, addRequiredClass: function() {
72
+ G.value = z();
73
+ } }), (n2, t2) => {
74
+ const l2 = i("el-input"), o2 = i("scan-code-input-browser"), a2 = i("el-form-item");
75
+ return p(), r(a2, { ref_key: "formItemRef", ref: Q, required: !!ee.value.required, class: c(f(pe) + (G.value ? " " + G.value : "")), "label-width": ee.value.labelWidth, style: s(f(re)) }, v({ default: g(() => [y(l2, { ref_key: "componentRef", ref: X, disabled: "disabled" === ee.value.state, readonly: "readonly" === ee.value.state, size: ee.value.size, clearable: ee.value.clearable, placeholder: ee.value.placeholder, maxlength: ee.value.maxLength, "show-word-limit": ee.value.showInputNum, type: A.value, modelValue: K.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e3) => K.value = e3), onInput: t2[6] || (t2[6] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "input")), onChange: t2[7] || (t2[7] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "change")), onBlur: t2[8] || (t2[8] = (e3) => function(e4) {
76
+ let n3 = _($, E);
77
+ null != n3 && (n3 = n3.trim()), b($, E, n3), S(e4, F.pageContext, F.configure, "blur");
78
+ }(e3)), onFocus: t2[9] || (t2[9] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "focus")), onClick: t2[10] || (t2[10] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "click")), onClear: t2[11] || (t2[11] = (n3) => f(S)(n3, e2.pageContext, e2.configure, "clear")) }, v({ _: 2 }, ["outer" != ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prefix", fn: g(() => [ee.value.preIconType && ee.value.preIconValue ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: t2[0] || (t2[0] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.preText)), 1)]), key: "0" } : void 0, "outer" == ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prepend", fn: g(() => [ee.value.preIconType && ee.value.preIconValue ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: t2[1] || (t2[1] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.preText)), 1)]), key: "1" } : void 0, "outer" != ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "suffix", fn: g(() => [ee.value.sufIconType && ee.value.sufIconValue ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: t2[2] || (t2[2] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.sufText)), 1)]), key: "2" } : void 0, ue.value || "outer" == ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "append", fn: g(() => [ue.value ? (p(), r(f(I), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e3) => ge()) })) : m("", true), ee.value.sufIconType && ee.value.sufIconValue ? (p(), r(f(I), { key: 1, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: t2[4] || (t2[4] = (n3) => f(P)(K.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + x(f(M)(ee.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ve.value ? (p(), r(o2, { key: 0, onClose: ye })) : m("", true)]), _: 2 }, [ee.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: Y, class: "amb-form-item-label", style: s({ ...f(se), ...f(ce) }) }, [ee.value.prefixType ? (p(), r(N, { key: 0, pageContext: e2.pageContext, property: ee.value }, null, 8, ["pageContext", "property"])) : (p(), k(T, { key: 1 }, [d(x(f(M)(ee.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
78
79
  };
79
80
  } });
80
81
  export {
@@ -8,7 +8,9 @@ const b = { style: { width: "100%", "text-align": "center", "font-weight": "700"
8
8
  const S = e2, P = S.pageContext.entity ? S.pageContext.entity : {};
9
9
  let q = x(S.pageContext, S.configure);
10
10
  const O = S.configure.runtime ? S.configure.runtime : {}, A = O.style, z = O.class, D = O.headerStyle, E = O.appendClass, F = O.appendStyle, N = O.titleExceedStyle, W = t(O.props ? O.props : {});
11
- const B = t(W.value.options ? W.value.options : []), G = W.value.formatType, H = l(() => {
11
+ const B = t(W.value.options ? W.value.options : []), G = W.value.formatType;
12
+ W.value;
13
+ const H = l(() => {
12
14
  let e3 = h(P, q);
13
15
  if (G) if (W.value.hasOptions) {
14
16
  let t2 = null;
@@ -26,9 +28,9 @@ const b = { style: { width: "100%", "text-align": "center", "font-weight": "700"
26
28
  });
27
29
  }), R2({ updateOptions: function(e3) {
28
30
  B.value = e3 || [];
29
- } }), (e3, t2) => {
30
- const l2 = u("el-form-item");
31
- return W.value.whetherTitle || W.value.whetherTittle ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: p(f(A)) }, [c("div", b, v(f(I)(W.value.title)), 1)], 6)) : W.value.tittleShow ? (s(), o(l2, { key: 1, ref_key: "formItemRef", ref: J, required: !!W.value.required, class: r([f(z), W.value.contentAlign ? "form-item-align-" + W.value.contentAlign : "formNo" === W.value.showType ? "form-item-align-flex-end" : ""]), "label-width": W.value.labelWidth, style: p(f(A)) }, y({ default: g(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: K, onClick: t2[0] || (t2[0] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", V, [W.value.preIconValue || W.value.preText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != W.value.iconPosition, "el-input-group__append": "outer" == W.value.iconPosition }), style: p(f(F)) }, [W.value.preIconType && W.value.preIconValue ? (s(), o(f(T), { key: 0, iconType: W.value.preIconType, iconValue: W.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + v(f(I)(W.value.preText)), 1)], 6)) : m("", true), d("  " + v(H.value), 1)]), W.value.sufIconValue || W.value.sufText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != W.value.iconPosition, "el-input-group__append": "outer" == W.value.iconPosition }) }, [W.value.sufIconType && W.value.sufIconValue ? (s(), o(f(T), { key: 0, style: {}, iconType: W.value.sufIconType, iconValue: W.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : m("", true), c("span", null, " " + v(f(I)(W.value.sufText)), 1)], 2)) : m("", true)], 512)]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: g(() => [c("div", { ref_key: "titleRef", ref: L, style: p({ ...f(D), ...f(N) }) }, v(f(I)(W.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : (s(), i("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: t2[1] || (t2[1] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: H.value }, v(W.value.prefixIcon) + " " + v(H.value), 9, j), W.value.suffixTxt ? (s(), i("span", { key: 0, class: r(f(E)), style: p(f(F)) }, v(f(I)(W.value.suffixTxt)), 7)) : m("", true)]));
31
+ } }), (t2, l2) => {
32
+ const n2 = u("el-form-item");
33
+ return W.value.whetherTitle || W.value.whetherTittle ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: p(f(A)) }, [c("div", b, v(f(I)(W.value.title)), 1)], 6)) : W.value.tittleShow ? (s(), o(n2, { key: 1, ref_key: "formItemRef", ref: J, required: !!W.value.required, class: r([f(z), W.value.contentAlign ? "form-item-align-" + W.value.contentAlign : "formNo" === W.value.showType ? "form-item-align-flex-end" : ""]), "label-width": W.value.labelWidth, style: p(f(A)) }, y({ default: g(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: K, onClick: l2[0] || (l2[0] = (t3) => f(_)(t3, e2.pageContext, e2.configure, "click")) }, [c("span", V, [W.value.preIconValue || W.value.preText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != W.value.iconPosition, "el-input-group__append": "outer" == W.value.iconPosition }), style: p(f(F)) }, [W.value.preIconType && W.value.preIconValue ? (s(), o(f(T), { key: 0, iconType: W.value.preIconType, iconValue: W.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + v(f(I)(W.value.preText)), 1)], 6)) : m("", true), d("  " + v(H.value), 1)]), W.value.sufIconValue || W.value.sufText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != W.value.iconPosition, "el-input-group__append": "outer" == W.value.iconPosition }) }, [W.value.sufIconType && W.value.sufIconValue ? (s(), o(f(T), { key: 0, style: {}, iconType: W.value.sufIconType, iconValue: W.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : m("", true), c("span", null, " " + v(f(I)(W.value.sufText)), 1)], 2)) : m("", true)], 512)]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: g(() => [c("div", { ref_key: "titleRef", ref: L, style: p({ ...f(D), ...f(N) }) }, v(f(I)(W.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : (s(), i("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: l2[1] || (l2[1] = (t3) => f(_)(t3, e2.pageContext, e2.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: H.value }, v(W.value.prefixIcon) + " " + v(H.value), 9, j), W.value.suffixTxt ? (s(), i("span", { key: 0, class: r(f(E)), style: p(f(F)) }, v(f(I)(W.value.suffixTxt)), 7)) : m("", true)]));
32
34
  };
33
35
  } });
34
36
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, computed as l, onMounted as i, nextTick as a, resolveComponent as n, createBlock as u, openBlock as o, normalizeStyle as r, normalizeClass as p, unref as s, createSlots as f, withCtx as c, createVNode as m, createCommentVNode as d, createTextVNode as g, toDisplayString as v, createElementVNode as y } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as a, nextTick as i, resolveComponent as n, createBlock as u, openBlock as o, normalizeStyle as r, normalizeClass as s, unref as p, createSlots as f, withCtx as c, createVNode as m, createCommentVNode as d, createTextVNode as g, toDisplayString as v, createElementVNode as y } from "vue";
2
2
  import { getFormModelFields as b } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue as k } from "../../../../utils/page-helper-util.js";
4
4
  import { handleAfterInitEvent as x, handleEvent as C } from "../../../../utils/events/event-util.js";
@@ -7,7 +7,9 @@ import { SuperIcon as h } from "agilebuilder-ui";
7
7
  import { analysisValue as R } from "agilebuilder-ui/src/utils/util";
8
8
  const T = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
9
9
  var _a;
10
- const T2 = e2, j = b(T2.pageContext, T2.configure), w = T2.configure.runtime ? T2.configure.runtime : {}, V = w.style, I = w.class, P = w.headerStyle, S = t(w.props ? w.props : {}), $ = t();
10
+ const T2 = e2, j = b(T2.pageContext, T2.configure), w = T2.configure.runtime ? T2.configure.runtime : {}, V = w.style, I = w.class, P = w.headerStyle, S = t(w.props ? w.props : {});
11
+ S.value;
12
+ const $ = t();
11
13
  ((_a = T2.configure.props) == null ? void 0 : _a.linkPage) && ($.value = T2.configure.props.linkPage);
12
14
  let q = S.value.formatting;
13
15
  const D = T2.pageContext.entity ? T2.pageContext.entity : {}, J = l(() => {
@@ -26,14 +28,14 @@ const T = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} },
26
28
  return e3 = null == e3 || null == e3 ? "" : e3, W.replace(/\${value}/g, e3);
27
29
  }));
28
30
  const A = t(null), B = t(null), E = t(null);
29
- return i(() => {
30
- a(() => {
31
+ return a(() => {
32
+ i(() => {
31
33
  const e3 = J.value;
32
34
  x(e3, T2.pageContext, T2.configure, { formItemRef: A.value, componentRef: B.value, titleRef: E.value, value: e3, entity: T2.pageContext.entity.data, pageData: T2.pageContext.entity.page });
33
35
  });
34
- }), (e3, t2) => {
35
- const l2 = n("el-link"), i2 = n("el-tooltip"), a2 = n("el-form-item");
36
- return o(), u(a2, { ref_key: "formItemRef", ref: A, class: p(s(I)), "label-width": S.value.labelWidth, style: r(s(V)) }, f({ default: c(() => [m(i2, { disabled: !s(z), content: s(z) }, { default: c(() => [m(l2, { ref_key: "componentRef", ref: B, disabled: "disabled" === S.value.state, type: S.value.type ? S.value.type : "primary", underline: S.value.underline, onClick: t2[0] || (t2[0] = (t3) => s(C)(t3, e3.pageContext, e3.configure, "click", { skipValidate: true })) }, { default: c(() => [$.value ? (o(), u(s(h), { key: 0, iconType: $.value.iconType, iconValue: $.value.icon }, null, 8, ["iconType", "iconValue"])) : d("", true), g(" " + v(J.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 2 }, [S.value.tittleShow ? { name: "label", fn: c(() => [y("div", { ref_key: "titleRef", ref: E, style: r({ ...s(P) }), class: "amb-form-item-label" }, v(s(_)(S.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "label-width", "style"]);
36
+ }), (t2, l2) => {
37
+ const a2 = n("el-link"), i2 = n("el-tooltip"), b2 = n("el-form-item");
38
+ return o(), u(b2, { ref_key: "formItemRef", ref: A, class: s(p(I)), "label-width": S.value.labelWidth, style: r(p(V)) }, f({ default: c(() => [m(i2, { disabled: !p(z), content: p(z) }, { default: c(() => [m(a2, { ref_key: "componentRef", ref: B, disabled: "disabled" === S.value.state, type: S.value.type ? S.value.type : "primary", underline: S.value.underline, onClick: l2[0] || (l2[0] = (t3) => p(C)(t3, e2.pageContext, e2.configure, "click", { skipValidate: true })) }, { default: c(() => [$.value ? (o(), u(p(h), { key: 0, iconType: $.value.iconType, iconValue: $.value.icon }, null, 8, ["iconType", "iconValue"])) : d("", true), g(" " + v(J.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 2 }, [S.value.tittleShow ? { name: "label", fn: c(() => [y("div", { ref_key: "titleRef", ref: E, style: r({ ...p(P) }), class: "amb-form-item-label" }, v(p(_)(S.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "label-width", "style"]);
37
39
  };
38
40
  } });
39
41
  export {
@@ -74,9 +74,9 @@ const O = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }
74
74
  l2.value === e3 && (t2 = t2 + l2.label + ",");
75
75
  }), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
76
76
  }
77
- } }), (e3, t2) => {
78
- const l2 = i("el-radio"), o2 = i("el-radio-group"), n2 = i("el-form-item");
79
- return s(), r(n2, { ref_key: "formItemRef", ref: oe, required: G.value.required, class: p(c($) + (E.value ? " " + E.value : "")), "label-width": G.value.labelWidth, style: f(c(U)) }, g({ default: v(() => [d(o2, { ref_key: "componentRef", ref: ne, disabled: "disabled" === G.value.state, size: G.value.size, onChange: G.value.changeMethod, modelValue: W.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => W.value = e4) }, { default: v(() => [(s(true), m(h, null, b(H.value, (t3) => (s(), r(l2, { key: t3.value, label: t3.value, onClick: (l3) => c(q)(t3.value, e3.pageContext, e3.configure, "click", { values: W.value }) }, { default: v(() => [y(C(t3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 2 }, [G.value.tittleShow ? { name: "label", fn: v(() => [x("div", { ref_key: "titleRef", ref: ae, style: f({ ...c(A), ...c(B) }), class: "amb-form-item-label" }, C(c(w)(G.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
77
+ } }), (t2, l2) => {
78
+ const o2 = i("el-radio"), n2 = i("el-radio-group"), a2 = i("el-form-item");
79
+ return s(), r(a2, { ref_key: "formItemRef", ref: oe, required: G.value.required, class: p(c($) + (E.value ? " " + E.value : "")), "label-width": G.value.labelWidth, style: f(c(U)) }, g({ default: v(() => [d(n2, { ref_key: "componentRef", ref: ne, disabled: "disabled" === G.value.state, size: G.value.size, onChange: G.value.changeMethod, modelValue: W.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => W.value = e3) }, { default: v(() => [(s(true), m(h, null, b(H.value, (t3) => (s(), r(o2, { key: t3.value, label: t3.value, onClick: (l3) => c(q)(t3.value, e2.pageContext, e2.configure, "click", { values: W.value }) }, { default: v(() => [y(C(t3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 2 }, [G.value.tittleShow ? { name: "label", fn: v(() => [x("div", { ref_key: "titleRef", ref: ae, style: f({ ...c(A), ...c(B) }), class: "amb-form-item-label" }, C(c(w)(G.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
80
80
  };
81
81
  } });
82
82
  export {
@@ -2,7 +2,7 @@ import t from "./richtext-runtime.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
- const r = e(t, [["__scopeId", "data-v-faf97d0c"]]);
5
+ const r = e(t, [["__scopeId", "data-v-69991d69"]]);
6
6
  export {
7
7
  r as default
8
8
  };
@@ -1,31 +1,31 @@
1
- import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as o, onBeforeUnmount as i, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as p, normalizeStyle as f, normalizeClass as m, unref as v, createSlots as g, withCtx as h, createElementVNode as b, toDisplayString as y } from "vue";
1
+ import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as o, onBeforeUnmount as r, resolveComponent as i, createElementBlock as a, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as f, normalizeStyle as p, normalizeClass as m, unref as g, createSlots as v, withCtx as h, createElementVNode as b, toDisplayString as y } from "vue";
2
2
  import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
- import { getSizeConfig as k, formatVariableValue as w, getVariableValue as C, setVariableValue as q } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as T, handleFormEvent as S } from "../../../../utils/events/event-util.js";
3
+ import { getSizeConfig as k, formatVariableValue as q, getVariableValue as w, setVariableValue as C } from "../../../../utils/page-helper-util.js";
4
+ import { handleAfterInitEvent as S, handleFormEvent as A } from "../../../../utils/events/event-util.js";
5
5
  import E from "agilebuilder-ui/src/utils/request";
6
- import { $t as A } from "../../../../utils/i18n-util.js";
6
+ import { $t as T } from "../../../../utils/i18n-util.js";
7
7
  import { getBaseUrl as L, addRequiredClassUtil as H } from "../../../../utils/common-util.js";
8
8
  import M from "quill";
9
9
  import "quill/dist/quill.snow.css";
10
10
  import { ElMessage as N } from "element-plus";
11
- const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext-statusbar" }, V = { class: "word-count" }, $ = { key: 0, class: "upload-loading" }, z = ["innerHTML"], B = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
12
- const F = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], U = M.import("attributors/style/size");
13
- U.whitelist = F, M.register(U, true);
14
- const D = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], W = M.import("attributors/style/font");
15
- W.whitelist = D, M.register(W, true);
16
- const P = e2, G = t(""), I = P.pageContext.entity ? P.pageContext.entity : {}, K = x(P.pageContext, P.configure), O = P.configure.runtime ? P.configure.runtime : {}, Y = O.style, J = O.class, Q = O.headerStyle, X = O.titleExceedStyle, Z = t(O.props ? O.props : {});
11
+ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext-statusbar" }, F = { class: "word-count" }, V = { key: 0, class: "upload-loading" }, W = ["innerHTML"], z = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
12
+ const B = ["12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px"], D = M.import("attributors/style/size");
13
+ D.whitelist = B, M.register(D, true);
14
+ const U = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], $ = M.import("attributors/style/font");
15
+ $.whitelist = U, M.register($, true);
16
+ const P = e2, O = t(""), G = P.pageContext.entity ? P.pageContext.entity : {}, I = x(P.pageContext, P.configure), K = P.configure.runtime ? P.configure.runtime : {}, Y = K.style, J = K.class, Q = K.headerStyle, X = K.titleExceedStyle, Z = t(K.props ? K.props : {});
17
17
  let ee = k(P.pageContext, P.configure);
18
18
  ee && ee.fixHeight && (Y.height || (Y.height = ee.fixHeight + "px"));
19
19
  let te = Z.value.value;
20
- const le = w(P.pageContext, te), ne = t(null);
20
+ const le = q(P.pageContext, te), ne = t(null);
21
21
  let oe = null;
22
- const ie = t(false), ae = t(0), re = t(false), ue = t(false), se = t("");
22
+ const re = t(false), ie = t(0), ae = t(false), ue = t(false), se = t("");
23
23
  let ce = null, de = Z.value.state;
24
- function pe(e3) {
24
+ function fe(e3) {
25
25
  return "readonly" == e3 || "disabled" == e3;
26
26
  }
27
- const fe = pe(de), me = t({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: F }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: D }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: fe ? "" : Z.value.placeholder, readOnly: fe });
28
- function ve() {
27
+ const pe = fe(de), me = t({ modules: { toolbar: [["bold", "italic", "underline", "strike"], ["blockquote", "code-block"], [{ list: "ordered" }, { list: "bullet" }], [{ script: "sub" }, { script: "super" }], [{ indent: "-1" }, { indent: "+1" }], [{ direction: "rtl" }], [{ size: B }], [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], [{ font: U }], [{ align: [] }], ["clean"], ["link", "image"]] }, theme: "snow", placeholder: pe ? "" : Z.value.placeholder, readOnly: pe });
28
+ function ge() {
29
29
  if (!(oe == null ? void 0 : oe.container)) return;
30
30
  const e3 = oe.container.parentNode;
31
31
  if (!e3) return;
@@ -37,80 +37,99 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
37
37
  const e3 = Z.value.state;
38
38
  if (null != e3 && e3 !== de) {
39
39
  de = e3;
40
- const t2 = pe(de);
40
+ const t2 = fe(de);
41
41
  oe && (oe.enable(!t2), oe.root.dataset.placeholder = t2 ? "" : Z.value.placeholder);
42
42
  }
43
43
  });
44
- const ge = t([]), he = t(false), be = t(null), ye = t(null), xe = t(null);
44
+ const ve = t([]), he = t(false), be = t(null), ye = t(null), xe = t(null);
45
45
  let ke = null;
46
- function we(e3) {
46
+ function qe(e3) {
47
47
  const t2 = e3.match(/serverPath=([^&"]+)/);
48
48
  return t2 ? t2[1] : "";
49
49
  }
50
- function Ce(e3) {
50
+ function we(e3) {
51
51
  if (!oe) return;
52
52
  const t2 = function(e4) {
53
- let t3 = e4.replace(/<img data-uuid="(.*?)"/g, (e5, t4) => {
54
- const l3 = we(t4), n2 = P.pageContext.backendUrl;
55
- return `<img src="${L(n2, P.pageContext.isTest)}/common/fs-upload/download?serverPath=${l3}&isShowWatermark=false" data-uuid="${l3}"`;
53
+ if (!e4) return e4;
54
+ const t3 = new DOMParser().parseFromString(e4, "text/html"), l3 = P.pageContext.backendUrl, n2 = L(l3, P.pageContext.isTest);
55
+ t3.querySelectorAll("th").forEach((e5) => {
56
+ const l4 = t3.createElement("td");
57
+ for (const t4 of Array.from(e5.attributes)) l4.setAttribute(t4.name, t4.value);
58
+ l4.style.fontWeight = "bold", l4.innerHTML = e5.innerHTML, e5.replaceWith(l4);
59
+ }), t3.querySelectorAll("img[data-uuid]").forEach((e5) => {
60
+ const t4 = e5, l4 = t4.getAttribute("data-uuid");
61
+ l4 && t4.setAttribute("src", `${n2}/common/fs-upload/download?serverPath=${l4}&isShowWatermark=false`);
56
62
  });
57
- return t3 = t3.replace(/\t/g, "    "), t3 = t3.replace(/ {2}/g, "  "), t3;
63
+ let o2 = t3.body.innerHTML;
64
+ return o2 = o2.replace(/\t/g, "    "), o2 = o2.replace(/ {2}/g, "  "), o2;
58
65
  }(e3), l2 = oe.clipboard.convertHTML(t2);
59
66
  oe.setContents(l2.ops), o(() => {
60
67
  if (!oe) return;
61
68
  oe.root.querySelectorAll("img").forEach((e4) => {
62
69
  if (!e4.getAttribute("data-uuid")) {
63
- const t3 = we(e4.src);
64
- e4.setAttribute("data-uuid", t3);
70
+ const t3 = qe(e4.src);
71
+ t3 && e4.setAttribute("data-uuid", t3);
65
72
  }
73
+ }), oe && oe.root.querySelectorAll("table").forEach((e4) => {
74
+ const t3 = e4.querySelector("tr");
75
+ t3 && t3.querySelectorAll("td").forEach((e5) => {
76
+ e5.querySelector("strong, b") && (e5.style.backgroundColor = "#f5f7fa");
77
+ });
66
78
  });
67
79
  });
68
80
  }
69
- const qe = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
70
- function Te() {
71
- ie.value = !ie.value, o(() => {
72
- !ie.value && (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ve();
81
+ const Ce = { bold: "加粗", italic: "斜体", underline: "下划线", strike: "删除线", blockquote: "引用", "code-block": "代码块", 'list[value="ordered"]': "有序列表", 'list[value="bullet"]': "无序列表", 'script[value="sub"]': "下标", 'script[value="super"]': "上标", 'indent[value="-1"]': "减少缩进", 'indent[value="+1"]': "增加缩进", 'direction[value="rtl"]': "文字方向", size: "字体大小", header: "标题", color: "字体颜色", background: "背景颜色", font: "字体", align: "对齐方式", clean: "清除格式", link: "链接", image: "图片" };
82
+ function Se() {
83
+ re.value = !re.value, o(() => {
84
+ !re.value && (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ge();
73
85
  });
74
86
  }
75
- function Se() {
87
+ function Ae() {
76
88
  oe && (se.value = oe.root.innerHTML, ue.value = true);
77
89
  }
78
90
  function Ee() {
79
- if (!oe) return void (ae.value = 0);
91
+ if (!oe) return void (ie.value = 0);
80
92
  const e3 = oe.getText().trim();
81
- ae.value = e3.length;
93
+ ie.value = e3.length;
82
94
  }
83
- function Ae() {
95
+ function Te() {
96
+ if (!oe) return "";
97
+ const e3 = oe.root.cloneNode(true);
98
+ return e3.querySelectorAll("img[data-uuid]").forEach((e4) => {
99
+ e4.getAttribute("data-uuid") && e4.removeAttribute("src");
100
+ }), e3.innerHTML;
101
+ }
102
+ function Le() {
84
103
  N.error({ message: "图片上传失败,请重试", duration: 3e3 });
85
104
  }
86
- function Le(e3) {
87
- "Escape" === e3.key && ie.value && (ie.value = false, o(() => {
88
- (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ve();
105
+ function He(e3) {
106
+ "Escape" === e3.key && re.value && (re.value = false, o(() => {
107
+ (oe == null ? void 0 : oe.container) && (oe.container.style.height = ""), ge();
89
108
  }));
90
109
  }
91
- function He(e3) {
110
+ function Me(e3) {
92
111
  var _a;
93
- oe && (null !== e3.relatedTarget && ((_a = ne.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || S(oe.root.innerHTML, P.pageContext, P.configure, "change", { entity: I }));
112
+ oe && (null !== e3.relatedTarget && ((_a = ne.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || A(Te(), P.pageContext, P.configure, "change", { entity: G }));
94
113
  }
95
- function Me(e3) {
114
+ function Ne(e3) {
96
115
  if ("img" === e3.target.localName) {
97
- ge.value = [];
116
+ ve.value = [];
98
117
  let t2 = e3.target.src;
99
- ge.value.push(t2), he.value = true;
118
+ ve.value.push(t2), he.value = true;
100
119
  }
101
120
  }
102
- function Ne(e3) {
121
+ function Re(e3) {
103
122
  const t2 = new FormData();
104
123
  t2.append("file", e3);
105
124
  const l2 = P.pageContext.backendUrl, n2 = L(l2, P.pageContext.isTest);
106
125
  return E.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
107
126
  }
108
- function Re(e3, t2) {
109
- const l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/), o2 = n2 ? n2[1] : "image/png", i2 = atob(l2[1]);
110
- let a2 = i2.length;
111
- const r2 = new Uint8Array(a2);
112
- for (; a2--; ) r2[a2] = i2.charCodeAt(a2);
113
- return new File([r2], t2, { type: o2 });
127
+ function _e(e3, t2) {
128
+ const l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/), o2 = n2 ? n2[1] : "image/png", r2 = atob(l2[1]);
129
+ let i2 = r2.length;
130
+ const a2 = new Uint8Array(i2);
131
+ for (; i2--; ) a2[i2] = r2.charCodeAt(i2);
132
+ return new File([a2], t2, { type: o2 });
114
133
  }
115
134
  return n(() => {
116
135
  var _a;
@@ -122,15 +141,15 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
122
141
  const t2 = e4.className.match(/ql-([\w-]+)/);
123
142
  if (t2) {
124
143
  const l2 = t2[1], n2 = `${l2}[value="${e4.value}"]`;
125
- qe[n2] ? e4.setAttribute("data-tooltip", qe[n2]) : qe[l2] && e4.setAttribute("data-tooltip", qe[l2]);
144
+ Ce[n2] ? e4.setAttribute("data-tooltip", Ce[n2]) : Ce[l2] && e4.setAttribute("data-tooltip", Ce[l2]);
126
145
  }
127
146
  }), e3.querySelectorAll(".ql-picker").forEach((e4) => {
128
147
  const t2 = e4.className.match(/ql-(\w+)/);
129
148
  if (t2) {
130
149
  const l2 = t2[1];
131
- if (qe[l2]) {
150
+ if (Ce[l2]) {
132
151
  const t3 = e4.querySelector(".ql-picker-label");
133
- t3 && t3.setAttribute("data-tooltip", qe[l2]);
152
+ t3 && t3.setAttribute("data-tooltip", Ce[l2]);
134
153
  }
135
154
  }
136
155
  });
@@ -140,11 +159,11 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
140
159
  e3 && e3.addEventListener("mousedown", (e4) => {
141
160
  e4.preventDefault();
142
161
  });
143
- }(), Ce(le), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", He), oe.on("text-change", async function(e3) {
162
+ }(), we(le), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", Me), oe.on("text-change", async function(e3) {
144
163
  if (!oe) return;
145
164
  const t2 = oe.root.getElementsByTagName("img");
146
165
  for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
147
- const t3 = we(e4.src);
166
+ const t3 = qe(e4.src);
148
167
  e4.setAttribute("data-uuid", t3);
149
168
  }
150
169
  if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
@@ -153,15 +172,15 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
153
172
  const t4 = e4.image;
154
173
  if (!t4.startsWith("data:image")) continue;
155
174
  try {
156
- re.value = true;
157
- const e5 = Re(t4, "image.png"), l2 = await Ne(e5);
175
+ ae.value = true;
176
+ const e5 = _e(t4, "image.png"), l2 = await Re(e5);
158
177
  if (!oe) return;
159
178
  const n2 = oe.root.getElementsByTagName("img");
160
179
  for (const e6 of n2) e6.src === t4 && (e6.width = 300, e6.src = l2.url, e6.setAttribute("data-uuid", l2.uuid));
161
180
  } catch (e5) {
162
- Ae();
181
+ console.error("上传图片失败", e5), Le();
163
182
  } finally {
164
- re.value = false;
183
+ ae.value = false;
165
184
  }
166
185
  }
167
186
  }
@@ -169,31 +188,31 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
169
188
  ce && clearTimeout(ce);
170
189
  ce = setTimeout(() => {
171
190
  if (!oe) return;
172
- const e4 = oe.root.innerHTML;
173
- q(I, K, e4), e4 && (G.value = "");
191
+ const e4 = Te();
192
+ C(G, I, e4), e4 && (O.value = "");
174
193
  }, 300);
175
194
  }(), Ee();
176
- }), Ee(), ke = oe.container, ke.addEventListener("click", Me), ve(), o(() => {
177
- const e3 = C(I, K);
178
- T(e3, P.pageContext, P.configure, { formItemRef: be.value, componentRef: ye.value, titleRef: xe.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
195
+ }), Ee(), ke = oe.container, ke.addEventListener("click", Ne), ge(), o(() => {
196
+ const e3 = w(G, I);
197
+ S(e3, P.pageContext, P.configure, { formItemRef: be.value, componentRef: ye.value, titleRef: xe.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
179
198
  }));
180
199
  }), n(() => {
181
- document.addEventListener("keydown", Le);
182
- }), i(() => {
183
- document.removeEventListener("keydown", Le), ce && clearTimeout(ce), ne.value && ne.value.removeEventListener("focusout", He), ke && ke.removeEventListener("click", Me);
184
- }), B2({ addRequiredClass: function() {
185
- G.value = H();
200
+ document.addEventListener("keydown", He);
201
+ }), r(() => {
202
+ document.removeEventListener("keydown", He), ce && clearTimeout(ce), ne.value && ne.value.removeEventListener("focusout", Me), ke && ke.removeEventListener("click", Ne);
203
+ }), z2({ addRequiredClass: function() {
204
+ O.value = H();
186
205
  }, setContent: function(e3) {
187
- Ce(e3), Ee();
206
+ we(e3), Ee();
188
207
  }, getContent: function() {
189
208
  return oe ? oe.root.innerHTML : "";
190
209
  } }), (e3, t2) => {
191
- const l2 = a("View"), n2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), x2 = a("el-form-item"), k2 = a("el-image-viewer"), w2 = a("el-dialog");
192
- return u(), r(s, null, [c(x2, { required: Z.value.required, class: m(v(J) + (G.value ? " " + G.value : "")), "label-width": Z.value.labelWidth, style: f(v(Y)) }, g({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": ie.value }]) }, [b("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), b("div", R, [b("button", { type: "button", class: "toolbar-btn", onClick: Se, title: "预览" }, [c(n2, null, { default: h(() => [c(l2)]), _: 1 })]), b("button", { type: "button", class: "toolbar-btn", onClick: Te, title: ie.value ? "退出全屏" : "全屏编辑" }, [ie.value ? (u(), d(n2, { key: 1 }, { default: h(() => [c(i2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: h(() => [c(o2)]), _: 1 }))], 8, _)]), b("div", j, [b("span", V, "字数:" + y(ae.value), 1)]), re.value ? (u(), r("div", $, t2[2] || (t2[2] = [b("div", { class: "loading-spinner" }, null, -1), b("span", null, "图片上传中...", -1)]))) : p("", true)], 2)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: h(() => [b("div", { style: f({ ...v(Q), ...v(X) }), class: "amb-form-item-label" }, y(v(A)(Z.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]), he.value ? (u(), d(k2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
210
+ const l2 = i("View"), n2 = i("el-icon"), o2 = i("FullScreen"), r2 = i("Close"), x2 = i("el-form-item"), k2 = i("el-image-viewer"), q2 = i("el-dialog");
211
+ return u(), a(s, null, [c(x2, { required: Z.value.required, class: m(g(J) + (O.value ? " " + O.value : "")), "label-width": Z.value.labelWidth, style: p(g(Y)) }, v({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": re.value }]) }, [b("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), b("div", R, [b("button", { type: "button", class: "toolbar-btn", onClick: Ae, title: "预览" }, [c(n2, null, { default: h(() => [c(l2)]), _: 1 })]), b("button", { type: "button", class: "toolbar-btn", onClick: Se, title: re.value ? "退出全屏" : "全屏编辑" }, [re.value ? (u(), d(n2, { key: 1 }, { default: h(() => [c(r2)]), _: 1 })) : (u(), d(n2, { key: 0 }, { default: h(() => [c(o2)]), _: 1 }))], 8, _)]), b("div", j, [b("span", F, "字数:" + y(ie.value), 1)]), ae.value ? (u(), a("div", V, [...t2[2] || (t2[2] = [b("div", { class: "loading-spinner" }, null, -1), b("span", null, "图片上传中...", -1)])])) : f("", true)], 2)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: h(() => [b("div", { style: p({ ...g(Q), ...g(X) }), class: "amb-form-item-label" }, y(g(T)(Z.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]), he.value ? (u(), d(k2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
193
212
  he.value = false;
194
- }), "url-list": ge.value }, null, 8, ["url-list"])) : p("", true), c(w2, { modelValue: ue.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ue.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: h(() => [b("div", { class: "richtext-preview-content ql-editor", innerHTML: se.value }, null, 8, z)]), _: 1 }, 8, ["modelValue"])], 64);
213
+ }), "url-list": ve.value }, null, 8, ["url-list"])) : f("", true), c(q2, { modelValue: ue.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ue.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: h(() => [b("div", { class: "richtext-preview-content ql-editor", innerHTML: se.value }, null, 8, W)]), _: 1 }, 8, ["modelValue"])], 64);
195
214
  };
196
215
  } });
197
216
  export {
198
- B as default
217
+ z as default
199
218
  };