super-page-runtime 2.0.19 → 2.0.22

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 (189) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.js +16 -14
  2. package/dist/es/components/runtime/utils/api/page-expose-util.d.ts +1 -0
  3. package/dist/es/components/runtime/utils/api/page-expose-util.js +202 -0
  4. package/dist/es/components/runtime/utils/common-util.d.ts +2 -2
  5. package/dist/es/components/runtime/utils/common-util.js +7 -11
  6. package/dist/es/components/runtime/utils/events/event-util.js +9 -14
  7. package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
  8. package/dist/es/components/runtime/utils/events/standard-event.js +124 -110
  9. package/dist/es/components/runtime/utils/events/validator-util.js +4 -3
  10. package/dist/es/components/runtime/utils/global-refs.js +12 -0
  11. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
  12. package/dist/es/components/runtime/utils/page-helper-util.js +4 -4
  13. package/dist/es/components/runtime/utils/page-init-util.js +5 -3
  14. package/dist/es/components/runtime/utils/table-utils.js +4 -5
  15. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +17 -17
  16. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +17 -17
  17. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +1 -1
  18. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +1 -1
  19. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +5 -5
  20. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +12 -13
  21. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
  22. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +11 -11
  23. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +28 -28
  24. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +12 -12
  25. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +7 -5
  26. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +14 -14
  27. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +15 -15
  28. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +40 -37
  29. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
  30. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +13 -13
  31. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -39
  32. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  33. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +13 -13
  34. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +10 -10
  35. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +14 -14
  36. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +2 -2
  37. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +5 -7
  38. package/dist/es/components/runtime/views/super-page.vue.js +2 -2
  39. package/package.json +3 -2
  40. package/dist/lib/_virtual/AttributeMap.js +0 -4
  41. package/dist/lib/_virtual/Delta.js +0 -4
  42. package/dist/lib/_virtual/Op.js +0 -4
  43. package/dist/lib/_virtual/OpIterator.js +0 -4
  44. package/dist/lib/_virtual/__vite-browser-external.js +0 -3
  45. package/dist/lib/_virtual/_commonjsHelpers.js +0 -8
  46. package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -9
  47. package/dist/lib/_virtual/dayjs.min.js +0 -4
  48. package/dist/lib/_virtual/index.js +0 -4
  49. package/dist/lib/_virtual/index2.js +0 -4
  50. package/dist/lib/_virtual/index3.js +0 -4
  51. package/dist/lib/assets/chart-themes/theme1.d.ts +0 -4
  52. package/dist/lib/assets/chart-themes/theme1.js +0 -7
  53. package/dist/lib/assets/chart-themes/theme2.d.ts +0 -4
  54. package/dist/lib/assets/chart-themes/theme2.js +0 -7
  55. package/dist/lib/assets/chart-themes/theme3.d.ts +0 -4
  56. package/dist/lib/assets/chart-themes/theme3.js +0 -7
  57. package/dist/lib/components/runtime/index.d.ts +0 -4
  58. package/dist/lib/components/runtime/utils/api/api-util.d.ts +0 -11
  59. package/dist/lib/components/runtime/utils/api/api-util.js +0 -128
  60. package/dist/lib/components/runtime/utils/assemblys-config.js +0 -258
  61. package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +0 -11
  62. package/dist/lib/components/runtime/utils/charts/chart-util.js +0 -28
  63. package/dist/lib/components/runtime/utils/common-util.d.ts +0 -16
  64. package/dist/lib/components/runtime/utils/common-util.js +0 -94
  65. package/dist/lib/components/runtime/utils/eventBus.d.ts +0 -7
  66. package/dist/lib/components/runtime/utils/eventBus.js +0 -10
  67. package/dist/lib/components/runtime/utils/events/event-util.d.ts +0 -48
  68. package/dist/lib/components/runtime/utils/events/event-util.js +0 -526
  69. package/dist/lib/components/runtime/utils/events/standard-event.d.ts +0 -61
  70. package/dist/lib/components/runtime/utils/events/standard-event.js +0 -1625
  71. package/dist/lib/components/runtime/utils/events/validator-util.d.ts +0 -4
  72. package/dist/lib/components/runtime/utils/events/validator-util.js +0 -389
  73. package/dist/lib/components/runtime/utils/global-refs.d.ts +0 -59
  74. package/dist/lib/components/runtime/utils/global-refs.js +0 -65
  75. package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +0 -223
  76. package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +0 -9
  77. package/dist/lib/components/runtime/utils/page-helper-util.d.ts +0 -106
  78. package/dist/lib/components/runtime/utils/page-helper-util.js +0 -622
  79. package/dist/lib/components/runtime/utils/page-init-util.d.ts +0 -38
  80. package/dist/lib/components/runtime/utils/page-init-util.js +0 -200
  81. package/dist/lib/components/runtime/utils/page-permission-util.d.ts +0 -26
  82. package/dist/lib/components/runtime/utils/page-permission-util.js +0 -525
  83. package/dist/lib/components/runtime/utils/store-util.d.ts +0 -15
  84. package/dist/lib/components/runtime/utils/store-util.js +0 -17
  85. package/dist/lib/components/runtime/utils/store.d.ts +0 -2
  86. package/dist/lib/components/runtime/utils/store.js +0 -3
  87. package/dist/lib/components/runtime/utils/table-utils.js +0 -24
  88. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +0 -3
  89. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +0 -54
  90. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +0 -3
  91. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +0 -35
  92. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +0 -3
  93. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +0 -110
  94. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +0 -3
  95. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +0 -432
  96. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -43
  97. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -3
  98. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -61
  99. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -3
  100. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -126
  101. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -3
  102. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +0 -3
  103. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +0 -52
  104. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +0 -3
  105. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +0 -54
  106. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +0 -3
  107. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +0 -54
  108. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +0 -3
  109. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +0 -56
  110. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +0 -24
  111. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +0 -147
  112. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +0 -3
  113. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +0 -35
  114. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +0 -127
  115. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +0 -3
  116. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +0 -26
  117. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +0 -104
  118. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +0 -3
  119. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +0 -3
  120. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +0 -72
  121. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +0 -3
  122. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +0 -74
  123. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +0 -3
  124. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +0 -79
  125. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +0 -3
  126. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +0 -43
  127. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +0 -3
  128. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +0 -44
  129. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +0 -3
  130. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +0 -30
  131. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +0 -3
  132. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -69
  133. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +0 -3
  134. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +0 -75
  135. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +0 -642
  136. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +0 -3
  137. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +0 -453
  138. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +0 -3
  139. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +0 -3
  140. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +0 -88
  141. package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +0 -22
  142. package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +0 -22
  143. package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +0 -3
  144. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +0 -3
  145. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -156
  146. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +0 -3
  147. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -82
  148. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +0 -3
  149. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +0 -64
  150. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +0 -3
  151. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +0 -40
  152. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +0 -3
  153. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -74
  154. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +0 -3
  155. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +0 -63
  156. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +0 -3
  157. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -127
  158. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +0 -3
  159. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +0 -127
  160. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +0 -3
  161. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -77
  162. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +0 -3
  163. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +0 -29
  164. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +0 -3
  165. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -157
  166. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +0 -3
  167. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -164
  168. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +0 -3
  169. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +0 -201
  170. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +0 -3
  171. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +0 -63
  172. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +0 -3
  173. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +0 -63
  174. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +0 -3
  175. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +0 -65
  176. package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +0 -17
  177. package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +0 -142
  178. package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +0 -3
  179. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +0 -3
  180. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +0 -61
  181. package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +0 -36
  182. package/dist/lib/components/runtime/views/super-page-dialog.vue.js +0 -73
  183. package/dist/lib/components/runtime/views/super-page-dialog.vue2.js +0 -3
  184. package/dist/lib/components/runtime/views/super-page.vue.d.ts +0 -91
  185. package/dist/lib/components/runtime/views/super-page.vue.js +0 -496
  186. package/dist/lib/components/runtime/views/super-page.vue2.js +0 -3
  187. package/dist/lib/favicon.ico +0 -0
  188. package/dist/lib/index.d.ts +0 -8
  189. package/dist/lib/index.js +0 -15
@@ -1,5 +1,6 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeStyle, toDisplayString } from "vue";
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeStyle, toDisplayString } from "vue";
2
2
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
3
+ import { handleEvent } from "../../../../utils/events/event-util.js";
3
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
5
  __name: "divider-runtime",
5
6
  props: {
@@ -10,7 +11,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
11
  const props = __props;
11
12
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
12
13
  const headerStyle = runtimeInfo.headerStyle;
13
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
14
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
14
15
  let contentVariable = designProperty.value;
15
16
  const dynamicValue = computed(() => {
16
17
  if (!contentVariable) {
@@ -22,9 +23,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
23
  return (_ctx, _cache) => {
23
24
  const _component_el_divider = resolveComponent("el-divider");
24
25
  return openBlock(), createBlock(_component_el_divider, {
25
- direction: unref(designProperty).direction,
26
- "border-style": unref(designProperty).borderType,
27
- "content-position": unref(designProperty).titlePosition
26
+ direction: designProperty.value.direction,
27
+ "border-style": designProperty.value.borderType,
28
+ "content-position": designProperty.value.titlePosition,
29
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
28
30
  }, {
29
31
  default: withCtx(() => [
30
32
  createElementVNode("div", {
@@ -1,4 +1,4 @@
1
- import { defineComponent, watch, resolveComponent, unref, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
1
+ import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
2
2
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
3
3
  import { fileUploadBeforeUpload, fileUploadUploaded, fileUploadBeforeDelete, fileUploadDeleted } from "../../../../utils/events/event-util.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -10,11 +10,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  setup(__props) {
11
11
  const props = __props;
12
12
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
13
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
13
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
14
14
  const runtimeStyle = runtimeInfo.style;
15
15
  const runtimeClass = runtimeInfo.class;
16
16
  const headerStyle = runtimeInfo.headerStyle;
17
- const fileSetObj = designProperty.fileSetObj;
17
+ const fileSetObj = designProperty.value.fileSetObj;
18
18
  fileSetObj.beforeUpload = beforeUpload;
19
19
  fileSetObj.pageContext = props.pageContext;
20
20
  fileSetObj.configureObj = props.configure;
@@ -57,24 +57,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
57
  return (_ctx, _cache) => {
58
58
  const _component_FsUploadList = resolveComponent("FsUploadList");
59
59
  const _component_el_form_item = resolveComponent("el-form-item");
60
- return unref(designProperty).tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
60
+ return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
61
61
  key: 0,
62
- required: unref(designProperty).required,
62
+ required: designProperty.value.required,
63
63
  class: normalizeClass(unref(runtimeClass)),
64
- "label-width": unref(designProperty).labelWidth,
64
+ "label-width": designProperty.value.labelWidth,
65
65
  style: normalizeStyle(unref(runtimeStyle))
66
66
  }, {
67
67
  label: withCtx(() => [
68
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
68
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
69
69
  key: 0,
70
70
  style: normalizeStyle({ ...unref(headerStyle) })
71
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
71
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
72
72
  ]),
73
73
  default: withCtx(() => [
74
74
  createVNode(_component_FsUploadList, {
75
- disabled: unref(designProperty).state == "disabled",
76
- fileSetObj: unref(designProperty).fileSetObj,
77
- fileInfo: unref(fileInfo),
75
+ disabled: designProperty.value.state == "disabled",
76
+ fileSetObj: designProperty.value.fileSetObj,
77
+ fileInfo: fileInfo.value,
78
78
  onUploaded: uploaded,
79
79
  onBeforeDelete: beforeDelete,
80
80
  onDeleted: deleted
@@ -83,9 +83,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
83
83
  _: 1
84
84
  }, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createBlock(_component_FsUploadList, {
85
85
  key: 1,
86
- disabled: unref(designProperty).state == "disabled",
87
- fileSetObj: unref(designProperty).fileSetObj,
88
- fileInfo: unref(fileInfo),
86
+ disabled: designProperty.value.state == "disabled",
87
+ fileSetObj: designProperty.value.fileSetObj,
88
+ fileInfo: fileInfo.value,
89
89
  onUploaded: uploaded,
90
90
  onBeforeDelete: beforeDelete,
91
91
  onDeleted: deleted
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
1
+ import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import { handleEvent } from "../../../../utils/events/event-util.js";
@@ -24,35 +24,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  const runtimeStyle = runtimeInfo.style;
25
25
  const runtimeClass = runtimeInfo.class;
26
26
  const headerStyle = runtimeInfo.headerStyle;
27
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
27
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
28
28
  return (_ctx, _cache) => {
29
29
  const _component_el_input_number = resolveComponent("el-input-number");
30
30
  const _component_el_form_item = resolveComponent("el-form-item");
31
31
  return openBlock(), createBlock(_component_el_form_item, {
32
- required: unref(designProperty).required,
32
+ required: designProperty.value.required,
33
33
  class: normalizeClass(unref(runtimeClass)),
34
- "label-width": unref(designProperty).labelWidth,
34
+ "label-width": designProperty.value.labelWidth,
35
35
  style: normalizeStyle(unref(runtimeStyle))
36
36
  }, {
37
37
  label: withCtx(() => [
38
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
38
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
39
39
  key: 0,
40
40
  style: normalizeStyle({ ...unref(headerStyle) })
41
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
41
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
42
42
  ]),
43
43
  default: withCtx(() => [
44
44
  createVNode(_component_el_input_number, {
45
- disabled: unref(designProperty).state === "disabled",
46
- readonly: unref(designProperty).state === "readonly",
47
- controls: unref(designProperty).showButton,
48
- size: unref(designProperty).size,
49
- placeholder: unref(designProperty).placeholder,
45
+ disabled: designProperty.value.state === "disabled",
46
+ readonly: designProperty.value.state === "readonly",
47
+ controls: designProperty.value.showButton,
48
+ size: designProperty.value.size,
49
+ placeholder: designProperty.value.placeholder,
50
50
  modelValue: dynamicModelMethod.value,
51
51
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
52
- precision: unref(designProperty).precision,
53
- step: unref(designProperty).step,
54
- min: unref(designProperty).min,
55
- max: unref(designProperty).max,
52
+ precision: designProperty.value.precision,
53
+ step: designProperty.value.step,
54
+ min: designProperty.value.min,
55
+ max: designProperty.value.max,
56
56
  onChange: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
57
57
  onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
58
58
  onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus"))
@@ -1,14 +1,10 @@
1
- import { defineComponent, computed, resolveComponent, unref, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, createTextVNode } from "vue";
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, createTextVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { queryOptions, formatVariableValue, formatValueByType } from "../../../../utils/page-helper-util.js";
4
4
  import { SuperIcon } from "agilebuilder-ui";
5
- const _hoisted_1 = { style: { "display": "flex", "width": "100%", "justify-content": "space-between" } };
6
- const _hoisted_2 = { style: { "overflow": "hidden", "white-space": "nowrap" } };
7
- const _hoisted_3 = {
8
- key: 1,
9
- style: { "display": "flex", "justify-content": "space-between" }
10
- };
11
- const _hoisted_4 = ["title"];
5
+ import { handleEvent } from "../../../../utils/events/event-util.js";
6
+ const _hoisted_1 = { style: { "overflow": "hidden", "white-space": "nowrap" } };
7
+ const _hoisted_2 = ["title"];
12
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
13
9
  __name: "label-runtime",
14
10
  props: {
@@ -24,8 +20,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
20
  const headerStyle = runtimeInfo.headerStyle;
25
21
  const appendClass = runtimeInfo.appendClass;
26
22
  const appendStyle = runtimeInfo.appendStyle;
27
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
28
- const listOptions = designProperty.options ? designProperty.options : [];
23
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
24
+ const listOptions = designProperty.value.options ? designProperty.value.options : [];
29
25
  const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
30
26
  const valueType = dataOrigin.optionValueSetType;
31
27
  if (valueType == "dynamicData" || valueType == "dynamicData" || valueType == "service") {
@@ -35,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
31
  console.log("lable组件查询数据源失败!", error);
36
32
  });
37
33
  }
38
- let contentVariable = designProperty.formatting;
34
+ let contentVariable = designProperty.value.formatting;
39
35
  if (!contentVariable) {
40
36
  const propsBase = props.configure.props.base ? props.configure.props.base : {};
41
37
  contentVariable = propsBase.prop;
@@ -43,12 +39,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
39
  if (!contentVariable) {
44
40
  contentVariable = "${page." + props.configure.uuid + "}";
45
41
  }
46
- const formatType = designProperty.formatType;
42
+ const formatType = designProperty.value.formatType;
47
43
  const dynamicValue = computed(() => {
48
44
  let resultValue = formatVariableValue(props.pageContext, contentVariable);
49
45
  console.log("formatType", formatType);
50
46
  if (formatType) {
51
- if (designProperty.hasOptions) {
47
+ if (designProperty.value.hasOptions) {
52
48
  let selItems = null;
53
49
  if (listOptions.value) {
54
50
  selItems = listOptions.value.filter((item) => item.value == resultValue);
@@ -57,68 +53,75 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
53
  resultValue = selItems[0].label;
58
54
  }
59
55
  } else {
60
- resultValue = formatValueByType(resultValue, formatType, designProperty);
56
+ resultValue = formatValueByType(resultValue, formatType, designProperty.value);
61
57
  }
62
58
  }
63
59
  return resultValue == void 0 || resultValue == null ? "" : resultValue;
64
60
  });
65
61
  return (_ctx, _cache) => {
66
62
  const _component_el_form_item = resolveComponent("el-form-item");
67
- return unref(designProperty).tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
63
+ return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
68
64
  key: 0,
69
- required: unref(designProperty).required ? true : false,
65
+ required: designProperty.value.required ? true : false,
70
66
  class: normalizeClass(unref(runtimeClass)),
71
- "label-width": unref(designProperty).labelWidth,
67
+ "label-width": designProperty.value.labelWidth,
72
68
  style: normalizeStyle(unref(runtimeStyle))
73
69
  }, {
74
70
  label: withCtx(() => [
75
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
71
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
76
72
  key: 0,
77
73
  style: normalizeStyle({ ...unref(headerStyle) })
78
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
74
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
79
75
  ]),
80
76
  default: withCtx(() => [
81
- createElementVNode("div", _hoisted_1, [
82
- createElementVNode("span", _hoisted_2, [
83
- unref(designProperty).preIconValue || unref(designProperty).preText ? (openBlock(), createElementBlock("span", {
77
+ createElementVNode("div", {
78
+ style: { "display": "flex", "width": "100%", "justify-content": "space-between" },
79
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
80
+ }, [
81
+ createElementVNode("span", _hoisted_1, [
82
+ designProperty.value.preIconValue || designProperty.value.preText ? (openBlock(), createElementBlock("span", {
84
83
  key: 0,
85
- class: normalizeClass({ "el-input__suffix": unref(designProperty).iconPosition != "outer", "el-input-group__append": unref(designProperty).iconPosition == "outer" }),
84
+ class: normalizeClass({ "el-input__suffix": designProperty.value.iconPosition != "outer", "el-input-group__append": designProperty.value.iconPosition == "outer" }),
86
85
  style: normalizeStyle(unref(appendStyle))
87
86
  }, [
88
- unref(designProperty).preIconType && unref(designProperty).preIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
87
+ designProperty.value.preIconType && designProperty.value.preIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
89
88
  key: 0,
90
- iconType: unref(designProperty).preIconType,
91
- iconValue: unref(designProperty).preIconValue
89
+ iconType: designProperty.value.preIconType,
90
+ iconValue: designProperty.value.preIconValue
92
91
  }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
93
- createTextVNode(" " + toDisplayString(unref(designProperty).preText), 1)
92
+ createTextVNode(" " + toDisplayString(designProperty.value.preText), 1)
94
93
  ], 6)) : createCommentVNode("", true),
95
94
  createTextVNode("  " + toDisplayString(dynamicValue.value), 1)
96
95
  ]),
97
- unref(designProperty).sufIconValue || unref(designProperty).sufText ? (openBlock(), createElementBlock("span", {
96
+ designProperty.value.sufIconValue || designProperty.value.sufText ? (openBlock(), createElementBlock("span", {
98
97
  key: 0,
99
- class: normalizeClass({ "el-input__suffix": unref(designProperty).iconPosition != "outer", "el-input-group__append": unref(designProperty).iconPosition == "outer" })
98
+ class: normalizeClass({ "el-input__suffix": designProperty.value.iconPosition != "outer", "el-input-group__append": designProperty.value.iconPosition == "outer" })
100
99
  }, [
101
- unref(designProperty).sufIconType && unref(designProperty).sufIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
100
+ designProperty.value.sufIconType && designProperty.value.sufIconValue ? (openBlock(), createBlock(unref(SuperIcon), {
102
101
  key: 0,
103
102
  style: {},
104
- iconType: unref(designProperty).sufIconType,
105
- iconValue: unref(designProperty).sufIconValue
103
+ iconType: designProperty.value.sufIconType,
104
+ iconValue: designProperty.value.sufIconValue
106
105
  }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
107
- createElementVNode("span", null, " " + toDisplayString(unref(designProperty).sufText), 1)
106
+ createElementVNode("span", null, " " + toDisplayString(designProperty.value.sufText), 1)
108
107
  ], 2)) : createCommentVNode("", true)
109
108
  ])
110
109
  ]),
111
110
  _: 1
112
- }, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createElementBlock("span", _hoisted_3, [
111
+ }, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createElementBlock("span", {
112
+ key: 1,
113
+ style: { "display": "flex", "justify-content": "space-between" },
114
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
115
+ }, [
113
116
  createElementVNode("span", {
114
117
  style: { "overflow": "hidden", "white-space": "nowrap" },
115
118
  title: dynamicValue.value
116
- }, toDisplayString(unref(designProperty).prefixIcon) + " " + toDisplayString(dynamicValue.value), 9, _hoisted_4),
117
- unref(designProperty).suffixTxt ? (openBlock(), createElementBlock("span", {
119
+ }, toDisplayString(designProperty.value.prefixIcon) + " " + toDisplayString(dynamicValue.value) + "222", 9, _hoisted_2),
120
+ designProperty.value.suffixTxt ? (openBlock(), createElementBlock("span", {
118
121
  key: 0,
119
122
  class: normalizeClass(unref(appendClass)),
120
123
  style: normalizeStyle(unref(appendStyle))
121
- }, toDisplayString(unref(designProperty).suffixTxt), 7)) : createCommentVNode("", true)
124
+ }, toDisplayString(designProperty.value.suffixTxt) + "222", 7)) : createCommentVNode("", true)
122
125
  ]));
123
126
  };
124
127
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import { handleEvent } from "../../../../utils/events/event-util.js";
@@ -15,8 +15,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  const runtimeStyle = runtimeInfo.style;
16
16
  const runtimeClass = runtimeInfo.class;
17
17
  const headerStyle = runtimeInfo.headerStyle;
18
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
19
- let contentVariable = designProperty.formatting;
18
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
19
+ let contentVariable = designProperty.value.formatting;
20
20
  if (!contentVariable) {
21
21
  const propsBase = props.configure.props.base ? props.configure.props.base : {};
22
22
  contentVariable = propsBase.prop;
@@ -28,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  const resultValue = formatVariableValue(props.pageContext, contentVariable);
29
29
  return resultValue == void 0 || resultValue == null ? "" : resultValue;
30
30
  });
31
- let tooltipVariable = designProperty.tooltip;
31
+ let tooltipVariable = designProperty.value.tooltip;
32
32
  const tooltipValue = computed(() => {
33
33
  const resultValue = formatVariableValue(props.pageContext, tooltipVariable);
34
34
  return resultValue == void 0 || resultValue == null ? "" : resultValue;
@@ -39,14 +39,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
39
  const _component_el_form_item = resolveComponent("el-form-item");
40
40
  return openBlock(), createBlock(_component_el_form_item, {
41
41
  class: normalizeClass(unref(runtimeClass)),
42
- "label-width": unref(designProperty).labelWidth,
42
+ "label-width": designProperty.value.labelWidth,
43
43
  style: normalizeStyle(unref(runtimeStyle))
44
44
  }, {
45
45
  label: withCtx(() => [
46
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
46
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
47
47
  key: 0,
48
48
  style: normalizeStyle({ ...unref(headerStyle) })
49
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
49
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
50
50
  ]),
51
51
  default: withCtx(() => [
52
52
  createVNode(_component_el_tooltip, {
@@ -55,9 +55,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  }, {
56
56
  default: withCtx(() => [
57
57
  createVNode(_component_el_link, {
58
- disabled: unref(designProperty).state === "disabled",
59
- type: unref(designProperty).type,
60
- underline: unref(designProperty).underline,
58
+ disabled: designProperty.value.state === "disabled",
59
+ type: designProperty.value.type,
60
+ underline: designProperty.value.underline,
61
61
  onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
62
62
  }, {
63
63
  default: withCtx(() => [
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
1
+ import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
2
2
  import { getVariableValue, setVariableValue, getOptionDatasFromPage, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
4
  import { handleEvent } from "../../../../utils/events/event-util.js";
@@ -24,8 +24,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  const runtimeStyle = runtimeInfo.style;
25
25
  const runtimeClass = runtimeInfo.class;
26
26
  const headerStyle = runtimeInfo.headerStyle;
27
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
28
- const listOptions = ref(designProperty.options ? designProperty.options : []);
27
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
28
+ const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
29
29
  const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
30
30
  if (cacheOptions.length > 0) {
31
31
  listOptions.value = cacheOptions;
@@ -48,8 +48,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
48
  target: props.configure.props.base.optionProp
49
49
  });
50
50
  }
51
- designProperty.changeMethod = optionChange;
52
- const monitorFields = designProperty.monitorFields;
51
+ designProperty.value.changeMethod = optionChange;
52
+ const monitorFields = designProperty.value.monitorFields;
53
53
  const monitorFieldInfos = [];
54
54
  if (monitorFields) {
55
55
  const preFields = [];
@@ -80,7 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
80
80
  }
81
81
  let initMonitorValue = getMonitorFieldValues();
82
82
  let monitorTimeout = false;
83
- const optionconfigInfo = designProperty.optionconfigInfo ? designProperty.optionconfigInfo : {};
83
+ const optionconfigInfo = designProperty.value.optionconfigInfo ? designProperty.value.optionconfigInfo : {};
84
84
  function monitorFieldChange() {
85
85
  if (monitorTimeout) {
86
86
  clearTimeout(monitorTimeout);
@@ -119,22 +119,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
119
  const _component_el_radio_group = resolveComponent("el-radio-group");
120
120
  const _component_el_form_item = resolveComponent("el-form-item");
121
121
  return openBlock(), createBlock(_component_el_form_item, {
122
- required: unref(designProperty).required,
122
+ required: designProperty.value.required,
123
123
  class: normalizeClass(unref(runtimeClass)),
124
- "label-width": unref(designProperty).labelWidth,
124
+ "label-width": designProperty.value.labelWidth,
125
125
  style: normalizeStyle(unref(runtimeStyle))
126
126
  }, {
127
127
  label: withCtx(() => [
128
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
128
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
129
129
  key: 0,
130
130
  style: normalizeStyle({ ...unref(headerStyle) })
131
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
131
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
132
132
  ]),
133
133
  default: withCtx(() => [
134
134
  createVNode(_component_el_radio_group, {
135
- disabled: unref(designProperty).state === "disabled",
136
- size: unref(designProperty).size,
137
- onChange: unref(designProperty).changeMethod,
135
+ disabled: designProperty.value.state === "disabled",
136
+ size: designProperty.value.size,
137
+ onChange: designProperty.value.changeMethod,
138
138
  modelValue: dynamicModelMethod.value,
139
139
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
140
140
  }, {
@@ -1,9 +1,10 @@
1
- import { defineComponent, ref, onMounted, resolveComponent, unref, openBlock, createBlock, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import Quill from "quill";
5
5
  import "quill/dist/quill.snow.css";
6
6
  import { handleEvent } from "../../../../utils/events/event-util.js";
7
+ import http from "agilebuilder-ui/src/utils/request";
7
8
  const _hoisted_1 = { style: { "width": "100%", "height": "100%" } };
8
9
  const _hoisted_2 = {
9
10
  key: 1,
@@ -24,13 +25,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
25
  const runtimeStyle = runtimeInfo.style;
25
26
  const runtimeClass = runtimeInfo.class;
26
27
  const headerStyle = runtimeInfo.headerStyle;
27
- const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
28
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
28
29
  let contentVariable = designProperty.value;
29
30
  const initValue = formatVariableValue(props.pageContext, contentVariable);
30
31
  const quillEditorRef = ref(null);
31
32
  const quill = ref(null);
32
33
  const fileBtn = ref(null);
33
- const fontSize = ["12px", "13px", "14px", "15px", "16px", "18px", "20px", "24px", "28px", "32px", "36px"];
34
+ const fontSize = [
35
+ "12px",
36
+ "13px",
37
+ "14px",
38
+ "15px",
39
+ "16px",
40
+ "18px",
41
+ "20px",
42
+ "24px",
43
+ "28px",
44
+ "32px",
45
+ "36px"
46
+ ];
34
47
  const option = ref({
35
48
  modules: {
36
49
  toolbar: [
@@ -63,28 +76,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
76
  ]
64
77
  },
65
78
  theme: "snow",
66
- placeholder: designProperty.placeholder,
67
- readOnly: designProperty.state == "readonly"
79
+ placeholder: designProperty.value.placeholder,
80
+ readOnly: designProperty.value.state == "readonly"
68
81
  });
69
- function updateEditorHeight() {
70
- if (quill && quill.value) {
71
- if (quill.value.container) {
72
- const parentNode = quill.value.container.parentNode;
73
- const parentRect = parentNode.getBoundingClientRect();
74
- const thisRect = quill.value.container.getBoundingClientRect();
75
- let newHeight = parentRect.height - (thisRect.top - parentRect.top);
76
- if (newHeight < 100) {
77
- newHeight = 100;
78
- }
79
- quill.value.container.style.height = newHeight + "px";
80
- }
81
- }
82
- }
83
- const imgHandler = (state) => {
84
- if (fileBtn.value && state) {
85
- fileBtn.value.click();
86
- }
87
- };
88
82
  const handleUpload = (e) => {
89
83
  const files = Array.prototype.slice.call(e.target.files);
90
84
  if (!files) {
@@ -95,34 +89,92 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
95
89
  alert("TODO:上传图片");
96
90
  };
97
91
  onMounted(() => {
92
+ var _a;
98
93
  quill.value = new Quill(quillEditorRef.value, option.value);
99
- quill.value.getModule("toolbar").addHandler("image", imgHandler);
100
- quill.value.on("text-change", function(delta, oldDelta, source) {
101
- if (window.updateQuillTimeout) {
102
- clearTimeout(window.updateQuillTimeout);
94
+ (_a = quillEditorRef.value) == null ? void 0 : _a.addEventListener("focusout", handleFocusOut);
95
+ quill.value.on("text-change", async function(delta, oldDelta, source) {
96
+ if (delta.ops && delta.ops.length > 0) {
97
+ for (let i = 0; i < delta.ops.length; i++) {
98
+ const ops = delta.ops[i];
99
+ if (ops.insert && ops.insert.image) {
100
+ const dataurl = ops.insert.image;
101
+ if (!dataurl.startsWith("data:image")) {
102
+ return;
103
+ }
104
+ const file = dataURLtoFile(dataurl, "image.png");
105
+ await uploadImage(file).then((res) => {
106
+ if (!quill.value) {
107
+ return;
108
+ }
109
+ const images = quill.value.root.getElementsByTagName("img");
110
+ if (images && images.length > 0) {
111
+ for (let i2 = 0; i2 < images.length; i2++) {
112
+ const img = images[i2];
113
+ if (img.src === dataurl) {
114
+ img.src = res.url;
115
+ }
116
+ }
117
+ }
118
+ }).catch((err) => {
119
+ console.error(err, "上传图片失败");
120
+ });
121
+ }
122
+ }
103
123
  }
104
- window.updateQuillTimeout = setTimeout(function() {
105
- setVariableValue(entity, dynamicFields, quill.value.root.innerHTML);
106
- handleEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", { entity });
107
- console.log("new entity", entity);
108
- }, 1e3);
124
+ setVariableValue(entity, dynamicFields, quill.value.root.innerHTML);
109
125
  });
110
- updateEditorHeight();
126
+ updateEditorHeibusght();
111
127
  });
128
+ onBeforeUnmount(() => {
129
+ if (quillEditorRef.value) {
130
+ quillEditorRef.value.removeEventListener("focusout", handleFocusOut);
131
+ }
132
+ });
133
+ function handleFocusOut(event) {
134
+ var _a;
135
+ if (event.relatedTarget === null || !((_a = quillEditorRef.value) == null ? void 0 : _a.contains(event.relatedTarget))) {
136
+ handleEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", {
137
+ entity
138
+ });
139
+ }
140
+ }
141
+ function uploadImage(blob) {
142
+ const params = new FormData();
143
+ params.append("file", blob);
144
+ const config = {
145
+ headers: {
146
+ "Content-Type": "multipart/form-data"
147
+ }
148
+ };
149
+ return http.post(
150
+ window.$vueApp.config.globalProperties.baseURL + "/common/fs-upload/rich-editor-image",
151
+ params,
152
+ config
153
+ );
154
+ }
155
+ function dataURLtoFile(dataurl, filename) {
156
+ let arr = dataurl.split(",");
157
+ let mime = arr[0].match(/:(.*?);/)[1];
158
+ let bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
159
+ while (n--) {
160
+ u8arr[n] = bstr.charCodeAt(n);
161
+ }
162
+ return new File([u8arr], filename, { type: mime });
163
+ }
112
164
  return (_ctx, _cache) => {
113
165
  const _component_el_form_item = resolveComponent("el-form-item");
114
- return unref(designProperty).tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
166
+ return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
115
167
  key: 0,
116
- required: unref(designProperty).required,
168
+ required: designProperty.value.required,
117
169
  class: normalizeClass(unref(runtimeClass)),
118
- "label-width": unref(designProperty).labelWidth,
170
+ "label-width": designProperty.value.labelWidth,
119
171
  style: normalizeStyle(unref(runtimeStyle))
120
172
  }, {
121
173
  label: withCtx(() => [
122
- unref(designProperty).tittleShow ? (openBlock(), createElementBlock("div", {
174
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
123
175
  key: 0,
124
176
  style: normalizeStyle({ ...unref(headerStyle) })
125
- }, toDisplayString(unref(designProperty).title), 5)) : createCommentVNode("", true)
177
+ }, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
126
178
  ]),
127
179
  default: withCtx(() => [
128
180
  createElementVNode("div", _hoisted_1, [