super-page-runtime 2.2.29-tmp1 → 2.2.29-tmp2

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 (165) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +7 -5
  2. package/dist/es/assets/chart-themes/theme1.js +6 -2
  3. package/dist/es/assets/chart-themes/theme2.js +6 -2
  4. package/dist/es/assets/chart-themes/theme3.js +6 -2
  5. package/dist/es/components/runtime/utils/api/api-util.js +7 -4
  6. package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
  7. package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
  8. package/dist/es/components/runtime/utils/barcode-util.js +33 -9
  9. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
  10. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
  11. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -69
  12. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
  13. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -38
  14. package/dist/es/components/runtime/utils/charts/chart-util.js +522 -226
  15. package/dist/es/components/runtime/utils/common-util.js +156 -76
  16. package/dist/es/components/runtime/utils/eventBus.js +8 -3
  17. package/dist/es/components/runtime/utils/events/event-util.js +775 -362
  18. package/dist/es/components/runtime/utils/events/print-label.js +140 -73
  19. package/dist/es/components/runtime/utils/events/standard-event.js +2320 -820
  20. package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
  21. package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
  22. package/dist/es/components/runtime/utils/form/scan-util.js +162 -62
  23. package/dist/es/components/runtime/utils/global-refs.js +84 -53
  24. package/dist/es/components/runtime/utils/i18n-util.js +20 -11
  25. package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
  26. package/dist/es/components/runtime/utils/page-helper-util.js +660 -280
  27. package/dist/es/components/runtime/utils/page-init-util.js +405 -144
  28. package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
  29. package/dist/es/components/runtime/utils/page-store.js +68 -23
  30. package/dist/es/components/runtime/utils/store-util.js +13 -9
  31. package/dist/es/components/runtime/utils/store.js +2 -2
  32. package/dist/es/components/runtime/utils/table-utils.js +81 -40
  33. package/dist/es/components/runtime/utils/tree-utils.js +37 -17
  34. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
  35. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +83 -21
  36. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +46 -14
  38. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
  39. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +132 -36
  40. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
  41. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +18 -4
  42. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
  43. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +107 -17
  44. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
  45. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +198 -54
  46. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
  47. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
  48. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +60 -11
  49. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
  50. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +203 -54
  51. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
  52. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
  53. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
  54. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
  55. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +109 -33
  56. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
  57. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +166 -44
  58. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
  59. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +117 -33
  60. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
  61. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +118 -33
  62. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +599 -253
  63. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
  64. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
  65. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +62 -8
  66. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
  67. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +160 -29
  68. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
  69. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +62 -13
  70. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
  71. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
  72. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +594 -213
  73. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -33
  74. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
  75. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +125 -21
  76. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
  77. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +102 -16
  78. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
  79. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
  80. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +81 -18
  81. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
  82. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +82 -17
  83. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
  84. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +86 -14
  85. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
  86. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +79 -21
  87. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
  88. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +61 -16
  89. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
  90. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +37 -10
  91. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
  92. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +127 -38
  93. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
  94. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +76 -28
  95. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
  96. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +178 -63
  97. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -305
  98. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
  99. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +635 -265
  100. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
  101. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
  102. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +115 -40
  103. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
  104. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +215 -56
  105. package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
  106. package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
  107. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
  108. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +154 -43
  109. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
  110. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
  111. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
  112. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +200 -52
  113. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
  114. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +239 -70
  115. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
  116. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +109 -31
  117. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
  118. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +59 -21
  119. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
  120. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +188 -56
  121. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
  122. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +103 -22
  123. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
  124. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +246 -59
  125. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
  126. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +174 -34
  127. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
  128. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +107 -29
  129. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
  130. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +50 -13
  131. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
  132. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +194 -65
  133. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
  134. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +249 -89
  135. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
  136. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +263 -80
  137. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
  138. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +57 -13
  139. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
  140. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +155 -30
  141. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
  142. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +129 -40
  143. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
  144. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +107 -22
  145. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
  146. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
  147. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
  148. package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
  149. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
  150. package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +46 -18
  151. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
  152. package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +49 -21
  153. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
  154. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +58 -20
  155. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
  156. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +53 -16
  157. package/dist/es/components/runtime/views/home-chart.vue.js +160 -41
  158. package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
  159. package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -21
  160. package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
  161. package/dist/es/components/runtime/views/super-page.vue.js +756 -230
  162. package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
  163. package/dist/es/i18n/langs/cn.js +55 -2
  164. package/dist/es/i18n/langs/en.js +55 -2
  165. package/package.json +2 -2
@@ -1,78 +1,247 @@
1
- import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as r, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as p, unref as s, withCtx as c, createElementBlock as d, createCommentVNode as v, Fragment as f, createTextVNode as g, toDisplayString as m } from "vue";
2
- import { getFormModelFields as h } from "../../../../utils/page-init-util.js";
3
- import { getDateShortCuts as y } from "../../../../utils/form/date-shortcuts.js";
4
- import { getValueFromVariable as C, setVariableValue as x, getVariableValue as b } from "../../../../utils/page-helper-util.js";
5
- import { handleAfterInitEvent as F, getCustomFunc as k, handleFormEvent as T } from "../../../../utils/events/event-util.js";
6
- import V from "../common/title-suffix-element.vue.js";
7
- import j from "dayjs";
8
- import { $t as P } from "../../../../utils/i18n-util.js";
9
- const R = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
10
- const R2 = e2, _ = R2.pageContext.entity ? R2.pageContext.entity : {}, z = R2.configure.runtime ? R2.configure.runtime : {}, w = z.style, A = z.class, D = z.headerStyle, S = z.titleExceedStyle, $ = a(z.props ? z.props : {});
11
- let q = h(R2.pageContext, R2.configure, $.value.prop);
12
- console.log("designProperty", $);
13
- let I = null, B = false;
14
- if ($.value.dateType && $.value.dateType.includes("range")) {
15
- B = true;
16
- let e3 = $.value.prop2;
17
- e3 && e3.startsWith("${") || (e3 = "${page." + R2.configure.uuid + "-2}");
18
- const a2 = C(_, e3, null);
19
- if (e3 = e3.substring(2, e3.length - 1), I = e3.split("."), !(a2 || _.data && (_.data.id || _.data.ID)) && $.value.defaultValue2) {
20
- const e4 = C(_, $.value.defaultValue2);
21
- x(_, I, e4);
22
- }
23
- }
24
- const U = a(null), W = a(null), E = a(null);
25
- function O(e3, a2) {
26
- if (!e3) return e3;
27
- if (a2) try {
28
- const l2 = j(e3);
29
- let t2 = null;
30
- return t2 = "x" === a2 ? l2.toDate().getTime() : j(e3).format(a2), t2;
31
- } catch (a3) {
32
- return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${$.value.valueFormat}`), e3;
1
+ import { defineComponent, ref, onMounted, nextTick, computed, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createElementBlock, createCommentVNode, Fragment, createTextVNode, toDisplayString } from "vue";
2
+ import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
+ import { getDateShortCuts } from "../../../../utils/form/date-shortcuts.js";
4
+ import { getValueFromVariable, setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
5
+ import { handleAfterInitEvent, getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
6
+ import _sfc_main$1 from "../common/title-suffix-element.vue.js";
7
+ import dayjs from "dayjs";
8
+ import { $t } from "../../../../utils/i18n-util.js";
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ __name: "datepicker-runtime",
11
+ props: {
12
+ pageContext: {},
13
+ configure: {}
14
+ },
15
+ setup(__props) {
16
+ const props = __props;
17
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
18
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
19
+ const runtimeStyle = runtimeInfo.style;
20
+ const runtimeClass = runtimeInfo.class;
21
+ const headerStyle = runtimeInfo.headerStyle;
22
+ const titleExceedStyle = runtimeInfo.titleExceedStyle;
23
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
24
+ let dynamicFields = getFormModelFields(
25
+ props.pageContext,
26
+ props.configure,
27
+ designProperty.value.prop
28
+ );
29
+ console.log("designProperty", designProperty);
30
+ let dynamicFields2 = null;
31
+ let isRange = false;
32
+ if (designProperty.value.dateType && designProperty.value.dateType.includes("range")) {
33
+ isRange = true;
34
+ let propName = designProperty.value.prop2;
35
+ if (!propName || !propName.startsWith("${")) {
36
+ propName = "${page." + props.configure.uuid + "-2}";
37
+ }
38
+ const date2Value = getValueFromVariable(entity, propName, null);
39
+ propName = propName.substring(2, propName.length - 1);
40
+ dynamicFields2 = propName.split(".");
41
+ if (!date2Value && (!entity.data || !entity.data.id && !entity.data.ID)) {
42
+ if (designProperty.value.defaultValue2) {
43
+ const defaultValue2 = getValueFromVariable(entity, designProperty.value.defaultValue2);
44
+ setVariableValue(entity, dynamicFields2, defaultValue2);
45
+ }
46
+ }
33
47
  }
34
- return e3;
35
- }
36
- if (l(() => {
37
- t(() => {
38
- const e3 = G.value;
39
- F(e3, R2.pageContext, R2.configure, { formItemRef: U.value, componentRef: W.value, titleRef: E.value, value: e3, entity: R2.pageContext.entity.data, pageData: R2.pageContext.entity.page });
48
+ const formItemRef = ref(null);
49
+ const componentRef = ref(null);
50
+ const titleRef = ref(null);
51
+ onMounted(() => {
52
+ nextTick(() => {
53
+ const value = dynamicModelMethod.value;
54
+ handleAfterInitEvent(value, props.pageContext, props.configure, {
55
+ formItemRef: formItemRef.value,
56
+ componentRef: componentRef.value,
57
+ titleRef: titleRef.value,
58
+ value,
59
+ entity: props.pageContext.entity.data,
60
+ pageData: props.pageContext.entity.page
61
+ });
62
+ });
40
63
  });
41
- }), q) {
42
- const e3 = b(_, q), a2 = O(e3, $.value.valueFormat);
43
- e3 !== a2 && x(_, q, a2);
44
- }
45
- if (I) {
46
- const e3 = b(_, I), a2 = O(e3, $.value.valueFormat);
47
- e3 !== a2 && x(_, I, a2);
48
- }
49
- const G = o({ get() {
50
- if (B) {
51
- const e3 = [];
52
- let a2 = b(_, q);
53
- e3.push(O(a2, $.value.valueFormat));
54
- let l2 = b(_, I);
55
- return e3.push(O(l2, $.value.valueFormat)), e3;
64
+ function formatDate(value, formatStr) {
65
+ if (!value) {
66
+ return value;
67
+ }
68
+ if (formatStr) {
69
+ try {
70
+ const convertValue = dayjs(value);
71
+ let value2 = null;
72
+ if (formatStr === "x") {
73
+ value2 = convertValue.toDate().getTime();
74
+ } else {
75
+ value2 = dayjs(value).format(formatStr);
76
+ }
77
+ return value2;
78
+ } catch (e) {
79
+ console.error("日期值格式化错误", e);
80
+ console.error(`value: ${value} ,valueFormat: ${designProperty.value.valueFormat}`);
81
+ return value;
82
+ }
83
+ }
84
+ return value;
85
+ }
86
+ if (dynamicFields) {
87
+ const hisValue = getVariableValue(entity, dynamicFields);
88
+ const newValue = formatDate(hisValue, designProperty.value.valueFormat);
89
+ if (hisValue !== newValue) {
90
+ setVariableValue(entity, dynamicFields, newValue);
91
+ }
56
92
  }
57
- return O(b(_, q), $.value.valueFormat);
58
- }, set(e3) {
59
- B ? Array.isArray(e3) ? (x(_, q, e3[0]), x(_, I, e3[1])) : null === e3 && (x(_, q, null), x(_, I, null)) : x(_, q, e3);
60
- } }), H = a(y($.value.dateScopeDetails, $.value.sourceType, $.value.dateType));
61
- if ($.value.shortcutsFunc) {
62
- const e3 = k(R2.pageContext, $.value.shortcutsFunc);
63
- if (e3) {
64
- let a2 = e3.apply(e3, [{ pageContext: R2.pageContext, configureObj: R2.configure }]);
65
- if (a2) {
66
- Array.isArray(a2) || (a2 = [a2]), H.value || (H.value = []);
67
- for (let e4 of a2) e4.text && e4.value && H.value.push(e4);
93
+ if (dynamicFields2) {
94
+ const hisValue = getVariableValue(entity, dynamicFields2);
95
+ const newValue = formatDate(hisValue, designProperty.value.valueFormat);
96
+ if (hisValue !== newValue) {
97
+ setVariableValue(entity, dynamicFields2, newValue);
98
+ }
99
+ }
100
+ const dynamicModelMethod = computed({
101
+ get() {
102
+ if (isRange) {
103
+ const values = [];
104
+ let value1 = getVariableValue(entity, dynamicFields);
105
+ values.push(formatDate(value1, designProperty.value.valueFormat));
106
+ let value2 = getVariableValue(entity, dynamicFields2);
107
+ values.push(formatDate(value2, designProperty.value.valueFormat));
108
+ return values;
109
+ } else {
110
+ let value1 = getVariableValue(entity, dynamicFields);
111
+ return formatDate(value1, designProperty.value.valueFormat);
112
+ }
113
+ },
114
+ set(value) {
115
+ if (isRange) {
116
+ if (Array.isArray(value)) {
117
+ setVariableValue(entity, dynamicFields, value[0]);
118
+ setVariableValue(entity, dynamicFields2, value[1]);
119
+ } else if (value === null) {
120
+ setVariableValue(entity, dynamicFields, null);
121
+ setVariableValue(entity, dynamicFields2, null);
122
+ }
123
+ } else {
124
+ setVariableValue(entity, dynamicFields, value);
125
+ }
126
+ }
127
+ });
128
+ const shortcuts = ref(
129
+ getDateShortCuts(
130
+ designProperty.value.dateScopeDetails,
131
+ designProperty.value.sourceType,
132
+ designProperty.value.dateType
133
+ )
134
+ );
135
+ if (designProperty.value.shortcutsFunc) {
136
+ const func = getCustomFunc(props.pageContext, designProperty.value.shortcutsFunc);
137
+ if (func) {
138
+ let returns = func.apply(func, [
139
+ {
140
+ pageContext: props.pageContext,
141
+ configureObj: props.configure
142
+ }
143
+ ]);
144
+ if (returns) {
145
+ if (!Array.isArray(returns)) {
146
+ returns = [returns];
147
+ }
148
+ if (!shortcuts.value) {
149
+ shortcuts.value = [];
150
+ }
151
+ for (let r of returns) {
152
+ if (r.text && r.value) {
153
+ shortcuts.value.push(r);
154
+ }
155
+ }
156
+ }
68
157
  }
69
158
  }
159
+ return (_ctx, _cache) => {
160
+ const _component_el_time_picker = resolveComponent("el-time-picker");
161
+ const _component_el_date_picker = resolveComponent("el-date-picker");
162
+ const _component_el_form_item = resolveComponent("el-form-item");
163
+ return openBlock(), createBlock(_component_el_form_item, {
164
+ ref_key: "formItemRef",
165
+ ref: formItemRef,
166
+ required: designProperty.value.required,
167
+ class: normalizeClass(unref(runtimeClass)),
168
+ "label-width": designProperty.value.labelWidth,
169
+ style: normalizeStyle(unref(runtimeStyle))
170
+ }, {
171
+ label: withCtx(() => [
172
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
173
+ key: 0,
174
+ ref_key: "titleRef",
175
+ ref: titleRef,
176
+ style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
177
+ }, [
178
+ designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
179
+ key: 0,
180
+ pageContext: _ctx.pageContext,
181
+ property: designProperty.value
182
+ }, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
183
+ createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
184
+ ], 64))
185
+ ], 4)) : createCommentVNode("", true)
186
+ ]),
187
+ default: withCtx(() => [
188
+ designProperty.value.dateType == "time" || designProperty.value.dateType == "timerange" ? (openBlock(), createBlock(_component_el_time_picker, {
189
+ key: 0,
190
+ ref_key: "componentRef",
191
+ ref: componentRef,
192
+ "is-range": designProperty.value.dateType == "timerange",
193
+ style: { "width": "100%" },
194
+ "range-separator": "-",
195
+ clearable: designProperty.value.clearable,
196
+ disabled: designProperty.value.state === "disabled",
197
+ readonly: designProperty.value.state === "readonly",
198
+ size: designProperty.value.size,
199
+ placeholder: designProperty.value.placeholder,
200
+ "start-placeholder": designProperty.value.placeholder,
201
+ "end-placeholder": designProperty.value.endPlaceholder ? designProperty.value.endPlaceholder : designProperty.value.placeholder,
202
+ format: designProperty.value.format,
203
+ "value-format": designProperty.value.valueFormat,
204
+ modelValue: dynamicModelMethod.value,
205
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
206
+ shortcuts: shortcuts.value,
207
+ type: designProperty.value.dateType,
208
+ onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
209
+ onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
210
+ onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
211
+ onVisibleChange: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
212
+ onPanelChange: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change")),
213
+ onClear: _cache[6] || (_cache[6] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "clear"))
214
+ }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
215
+ key: 1,
216
+ ref_key: "componentRef",
217
+ ref: componentRef,
218
+ clearable: designProperty.value.clearable,
219
+ style: { "width": "100%" },
220
+ disabled: designProperty.value.state === "disabled",
221
+ readonly: designProperty.value.state === "readonly",
222
+ size: designProperty.value.size,
223
+ placeholder: designProperty.value.placeholder,
224
+ "start-placeholder": designProperty.value.placeholder,
225
+ "end-placeholder": designProperty.value.endPlaceholder ? designProperty.value.endPlaceholder : designProperty.value.placeholder,
226
+ format: designProperty.value.format,
227
+ "value-format": designProperty.value.valueFormat,
228
+ modelValue: dynamicModelMethod.value,
229
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => dynamicModelMethod.value = $event),
230
+ shortcuts: shortcuts.value,
231
+ type: designProperty.value.dateType,
232
+ onChange: _cache[8] || (_cache[8] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
233
+ onBlur: _cache[9] || (_cache[9] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
234
+ onFocus: _cache[10] || (_cache[10] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
235
+ onVisibleChange: _cache[11] || (_cache[11] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
236
+ onPanelChange: _cache[12] || (_cache[12] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change")),
237
+ onClear: _cache[13] || (_cache[13] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "clear"))
238
+ }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))
239
+ ]),
240
+ _: 1
241
+ }, 8, ["required", "class", "label-width", "style"]);
242
+ };
70
243
  }
71
- return (e3, a2) => {
72
- const l2 = r("el-time-picker"), t2 = r("el-date-picker"), o2 = r("el-form-item");
73
- return n(), u(o2, { ref_key: "formItemRef", ref: U, required: $.value.required, class: p(s(A)), "label-width": $.value.labelWidth, style: i(s(w)) }, { label: c(() => [$.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: E, style: i({ ...s(D), ...s(S) }) }, [$.value.prefixType ? (n(), u(V, { key: 0, pageContext: e3.pageContext, property: $.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(P)($.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == $.value.dateType || "timerange" == $.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: W, "is-range": "timerange" == $.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: $.value.clearable, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, size: $.value.size, placeholder: $.value.placeholder, "start-placeholder": $.value.placeholder, "end-placeholder": $.value.endPlaceholder ? $.value.endPlaceholder : $.value.placeholder, format: $.value.format, "value-format": $.value.valueFormat, modelValue: G.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => G.value = e4), shortcuts: H.value, type: $.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (n(), u(t2, { key: 1, ref_key: "componentRef", ref: W, clearable: $.value.clearable, style: { width: "100%" }, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, size: $.value.size, placeholder: $.value.placeholder, "start-placeholder": $.value.placeholder, "end-placeholder": $.value.endPlaceholder ? $.value.endPlaceholder : $.value.placeholder, format: $.value.format, "value-format": $.value.valueFormat, modelValue: G.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => G.value = e4), shortcuts: H.value, type: $.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(T)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
74
- };
75
- } });
244
+ });
76
245
  export {
77
- R as default
246
+ _sfc_main as default
78
247
  };
@@ -1,4 +1,4 @@
1
- import e from "./depttree-runtime.vue2.js";
1
+ import _sfc_main from "./depttree-runtime.vue2.js";
2
2
  export {
3
- e as default
3
+ _sfc_main as default
4
4
  };
@@ -1,35 +1,113 @@
1
- import { defineComponent as e, ref as t, onMounted as l, nextTick as a, computed as o, resolveComponent as i, createBlock as u, openBlock as n, normalizeStyle as r, normalizeClass as p, unref as s, withCtx as f, createVNode as g, createElementBlock as m, createCommentVNode as d, Fragment as c, createTextVNode as v, toDisplayString as y } from "vue";
2
- import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
- import { handleAfterInitEvent as C, handleFormEvent as h } from "../../../../utils/events/event-util.js";
4
- import b from "../common/title-suffix-element.vue.js";
5
- import { $t as k } from "../../../../utils/i18n-util.js";
6
- import { setVariableValue as S, getVariableValue as R } from "../../../../utils/page-helper-util.js";
7
- const _ = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
8
- const _2 = e2, j = _2.pageContext.entity ? _2.pageContext.entity : {};
9
- j.data || (j.data = {});
10
- const T = j.data, w = j.page;
11
- let z = x(_2.pageContext, _2.configure);
12
- const q = z.length > 0 ? z[z.length - 1] : _2.configure.uuid, I = _2.configure.runtime ? _2.configure.runtime : {}, F = t(I.props ? I.props : {}), M = I.style, D = I.class, E = I.headerStyle, O = I.titleExceedStyle, V = t(null), W = t(null), A = t(null);
13
- l(() => {
14
- a(() => {
15
- const e3 = T ? T[q] : null;
16
- C(e3, _2.pageContext, _2.configure, { formItemRef: V.value, componentRef: W.value, titleRef: A.value, value: e3, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
1
+ import { defineComponent, ref, onMounted, nextTick, computed, resolveComponent, createBlock, openBlock, normalizeStyle, normalizeClass, unref, withCtx, createVNode, createElementBlock, createCommentVNode, Fragment, createTextVNode, toDisplayString } from "vue";
2
+ import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
+ import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
4
+ import _sfc_main$1 from "../common/title-suffix-element.vue.js";
5
+ import { $t } from "../../../../utils/i18n-util.js";
6
+ import { setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "depttree-runtime",
9
+ props: {
10
+ pageContext: {},
11
+ configure: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
16
+ if (!entity.data) {
17
+ entity.data = {};
18
+ }
19
+ const dataModel = entity.data;
20
+ const pageModel = entity.page;
21
+ let dynamicFields = getFormModelFields(props.pageContext, props.configure);
22
+ const fieldName = dynamicFields.length > 0 ? dynamicFields[dynamicFields.length - 1] : props.configure.uuid;
23
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
24
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
25
+ const runtimeStyle = runtimeInfo.style;
26
+ const runtimeClass = runtimeInfo.class;
27
+ const headerStyle = runtimeInfo.headerStyle;
28
+ const titleExceedStyle = runtimeInfo.titleExceedStyle;
29
+ const formItemRef = ref(null);
30
+ const componentRef = ref(null);
31
+ const titleRef = ref(null);
32
+ onMounted(() => {
33
+ nextTick(() => {
34
+ const value = dataModel ? dataModel[fieldName] : null;
35
+ handleAfterInitEvent(value, props.pageContext, props.configure, {
36
+ formItemRef: formItemRef.value,
37
+ componentRef: componentRef.value,
38
+ titleRef: titleRef.value,
39
+ value,
40
+ entity: props.pageContext.entity.data,
41
+ pageData: props.pageContext.entity.page
42
+ });
43
+ });
17
44
  });
18
- });
19
- const B = o({ get: () => R(j, z), set(e3) {
20
- S(j, z, e3);
21
- } }), G = F.value.autoSetFields ? F.value.autoSetFields : [];
22
- function H(e3, t2) {
23
- e3 === q && h(t2, _2.pageContext, _2.configure, "change");
24
- }
25
- function J() {
26
- h(null, _2.pageContext, _2.configure, "click");
45
+ const dynamicModelMethod = computed({
46
+ get() {
47
+ return getVariableValue(entity, dynamicFields);
48
+ },
49
+ set(value) {
50
+ setVariableValue(entity, dynamicFields, value);
51
+ }
52
+ });
53
+ const autoSetFields = designProperty.value.autoSetFields ? designProperty.value.autoSetFields : [];
54
+ function changeValue(model, value) {
55
+ if (model === fieldName) {
56
+ handleFormEvent(value, props.pageContext, props.configure, "change");
57
+ }
58
+ }
59
+ function showTree() {
60
+ handleFormEvent(null, props.pageContext, props.configure, "click");
61
+ }
62
+ return (_ctx, _cache) => {
63
+ const _component_OrganizationInput = resolveComponent("OrganizationInput");
64
+ const _component_el_form_item = resolveComponent("el-form-item");
65
+ return openBlock(), createBlock(_component_el_form_item, {
66
+ ref_key: "formItemRef",
67
+ ref: formItemRef,
68
+ required: designProperty.value.required,
69
+ class: normalizeClass(unref(runtimeClass)),
70
+ "label-width": designProperty.value.labelWidth,
71
+ style: normalizeStyle(unref(runtimeStyle))
72
+ }, {
73
+ label: withCtx(() => [
74
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
75
+ key: 0,
76
+ ref_key: "titleRef",
77
+ ref: titleRef,
78
+ style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
79
+ }, [
80
+ designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
81
+ key: 0,
82
+ pageContext: _ctx.pageContext,
83
+ property: designProperty.value
84
+ }, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
85
+ createTextVNode(toDisplayString(unref($t)(designProperty.value.title)), 1)
86
+ ], 64))
87
+ ], 4)) : createCommentVNode("", true)
88
+ ]),
89
+ default: withCtx(() => [
90
+ createVNode(_component_OrganizationInput, {
91
+ ref_key: "componentRef",
92
+ ref: componentRef,
93
+ disabled: designProperty.value.state == "disabled",
94
+ multiple: designProperty.value.multiple,
95
+ treeType: designProperty.value.treeType,
96
+ value: dynamicModelMethod.value,
97
+ models: unref(dataModel),
98
+ pageModels: unref(pageModel),
99
+ fields: unref(autoSetFields),
100
+ size: designProperty.value.size,
101
+ separator: designProperty.value.separator,
102
+ onSetValue: changeValue,
103
+ onShowTree: showTree
104
+ }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "pageModels", "fields", "size", "separator"])
105
+ ]),
106
+ _: 1
107
+ }, 8, ["required", "class", "label-width", "style"]);
108
+ };
27
109
  }
28
- return (e3, t2) => {
29
- const l2 = i("OrganizationInput"), a2 = i("el-form-item");
30
- return n(), u(a2, { ref_key: "formItemRef", ref: V, required: F.value.required, class: p(s(D)), "label-width": F.value.labelWidth, style: r(s(M)) }, { label: f(() => [F.value.tittleShow ? (n(), m("div", { key: 0, ref_key: "titleRef", ref: A, style: r({ ...s(E), ...s(O) }) }, [F.value.prefixType ? (n(), u(b, { key: 0, pageContext: e3.pageContext, property: F.value }, null, 8, ["pageContext", "property"])) : (n(), m(c, { key: 1 }, [v(y(s(k)(F.value.title)), 1)], 64))], 4)) : d("", true)]), default: f(() => [g(l2, { ref_key: "componentRef", ref: W, disabled: "disabled" == F.value.state, multiple: F.value.multiple, treeType: F.value.treeType, value: B.value, models: s(T), pageModels: s(w), fields: s(G), size: F.value.size, separator: F.value.separator, onSetValue: H, onShowTree: J }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "pageModels", "fields", "size", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
31
- };
32
- } });
110
+ });
33
111
  export {
34
- _ as default
112
+ _sfc_main as default
35
113
  };
@@ -1,4 +1,4 @@
1
- import e from "./divider-runtime.vue2.js";
1
+ import _sfc_main from "./divider-runtime.vue2.js";
2
2
  export {
3
- e as default
3
+ _sfc_main as default
4
4
  };
@@ -1,24 +1,62 @@
1
- import { defineComponent as e, ref as t, computed as n, onMounted as o, nextTick as r, resolveComponent as i, createBlock as u, openBlock as l, unref as a, withCtx as p, createElementVNode as s, normalizeStyle as c, toDisplayString as d } from "vue";
2
- import { formatVariableValue as f } from "../../../../utils/page-helper-util.js";
3
- import { handleAfterInitEvent as v, handleFormEvent as g } from "../../../../utils/events/event-util.js";
4
- const m = e({ __name: "divider-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
5
- const m2 = e2, y = m2.configure.runtime ? m2.configure.runtime : {}, x = y.headerStyle, C = t(y.props ? y.props : {});
6
- let _ = C.value.value;
7
- const b = n(() => {
8
- if (!_) return "";
9
- const e3 = f(m2.pageContext, _);
10
- return null == e3 || null == e3 ? "" : e3;
11
- }), k = t(null);
12
- return o(() => {
13
- r(() => {
14
- const e3 = b.value;
15
- v(e3, m2.pageContext, m2.configure, { componentRef: k.value, value: e3, entity: m2.pageContext.entity.data, pageData: m2.pageContext.entity.page });
1
+ import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeStyle, toDisplayString } from "vue";
2
+ import { formatVariableValue } from "../../../../utils/page-helper-util.js";
3
+ import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "divider-runtime",
6
+ props: {
7
+ pageContext: {},
8
+ configure: {}
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
13
+ const headerStyle = runtimeInfo.headerStyle;
14
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
15
+ let contentVariable = designProperty.value["value"];
16
+ const dynamicValue = computed(() => {
17
+ if (!contentVariable) {
18
+ return "";
19
+ }
20
+ const resultValue = formatVariableValue(props.pageContext, contentVariable);
21
+ return resultValue == void 0 || resultValue == null ? "" : resultValue;
16
22
  });
17
- }), (e3, t2) => {
18
- const n2 = i("el-divider");
19
- return l(), u(n2, { ref_key: "componentRef", ref: k, direction: C.value.direction, "border-style": C.value.borderType, "content-position": C.value.titlePosition, onClick: t2[0] || (t2[0] = (t3) => a(g)(t3, e3.pageContext, e3.configure, "click")) }, { default: p(() => [s("div", { style: c(a(x)) }, d(b.value), 5)]), _: 1 }, 8, ["direction", "border-style", "content-position"]);
20
- };
21
- } });
23
+ const componentRef = ref(null);
24
+ onMounted(() => {
25
+ nextTick(() => {
26
+ const content = dynamicValue.value;
27
+ handleAfterInitEvent(
28
+ content,
29
+ props.pageContext,
30
+ props.configure,
31
+ {
32
+ componentRef: componentRef.value,
33
+ value: content,
34
+ entity: props.pageContext.entity.data,
35
+ pageData: props.pageContext.entity.page
36
+ }
37
+ );
38
+ });
39
+ });
40
+ return (_ctx, _cache) => {
41
+ const _component_el_divider = resolveComponent("el-divider");
42
+ return openBlock(), createBlock(_component_el_divider, {
43
+ ref_key: "componentRef",
44
+ ref: componentRef,
45
+ direction: designProperty.value.direction,
46
+ "border-style": designProperty.value.borderType,
47
+ "content-position": designProperty.value.titlePosition,
48
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
49
+ }, {
50
+ default: withCtx(() => [
51
+ createElementVNode("div", {
52
+ style: normalizeStyle(unref(headerStyle))
53
+ }, toDisplayString(dynamicValue.value), 5)
54
+ ]),
55
+ _: 1
56
+ }, 8, ["direction", "border-style", "content-position"]);
57
+ };
58
+ }
59
+ });
22
60
  export {
23
- m as default
61
+ _sfc_main as default
24
62
  };
@@ -1,4 +1,4 @@
1
- import e from "./fileupload-runtime.vue2.js";
1
+ import _sfc_main from "./fileupload-runtime.vue2.js";
2
2
  export {
3
- e as default
3
+ _sfc_main as default
4
4
  };