@web-utils/component 4.0.15 → 5.0.0-beta01

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 (307) hide show
  1. package/address-input/index.mjs +76 -76
  2. package/affix/index.mjs +71 -78
  3. package/aside-menu/index.mjs +20 -31
  4. package/avatar/index.mjs +94 -82
  5. package/awesome-button/index.mjs +54 -71
  6. package/capsule-tab/index.mjs +27 -32
  7. package/card/index.mjs +86 -71
  8. package/carousel/index.mjs +45 -34
  9. package/chat/index.mjs +440 -276
  10. package/chunk-file-uploader/index.mjs +2 -445
  11. package/chunk-file-uploader/style.css +1 -1
  12. package/chunks/ChunkFileUploader.C3EA0e5t.mjs +114 -0
  13. package/chunks/EditableTree.C_IJBL5b.mjs +648 -0
  14. package/chunks/ElementBaseInfo.DyuFR6fE.mjs +209 -0
  15. package/chunks/ElementDialog.C0IjriTW.mjs +681 -0
  16. package/chunks/ElementForm.ButuYDPA.mjs +627 -0
  17. package/chunks/ElementListeners.Dg3e_dmp.mjs +656 -0
  18. package/chunks/ElementMultiInstance.Dmi79FqA.mjs +290 -0
  19. package/chunks/ElementOtherConfig.C2AddGTp.mjs +51 -0
  20. package/chunks/ElementProperties.CfV8UF7L.mjs +196 -0
  21. package/chunks/ElementTaskConfig.Bn7ycGGn.mjs +446 -0
  22. package/chunks/FlowCondition.C6PdqOAW.mjs +194 -0
  23. package/chunks/FlowDesigner.uJYFfKpR.mjs +5101 -0
  24. package/chunks/FormBlock.BEENc22F.mjs +117 -0
  25. package/chunks/FormCascader.CaM-oEhv.mjs +1226 -0
  26. package/chunks/FormInputTime.Bg3UIP8H.mjs +1773 -0
  27. package/chunks/FormItem.H9OOvNzT.mjs +90 -0
  28. package/chunks/FormItemGroup.D9eRy-cZ.mjs +147 -0
  29. package/chunks/FormSelect.CanodoAI.mjs +1472 -0
  30. package/chunks/FormSwitch.DTqdaFjv.mjs +296 -0
  31. package/chunks/FormTemp.DiI5EfgK.mjs +139 -0
  32. package/chunks/FyCurd.DMj1dMK9.mjs +2622 -0
  33. package/chunks/FyForm.vgR8ujEF.mjs +904 -0
  34. package/chunks/FyFormDesign.DEWT6LsX.mjs +5600 -0
  35. package/chunks/FyUEditor.D_rEYfll.mjs +221 -0
  36. package/chunks/FyUpload.B2QKfTxF.mjs +504 -0
  37. package/chunks/Keyboard.ItiRy7Gb.mjs +379 -0
  38. package/chunks/MonacoEditor.Bd5Kui-Y.mjs +301 -0
  39. package/chunks/PageableTable.Bujb0NUx.mjs +658 -0
  40. package/chunks/RecordVideo.B35_dLty.mjs +116 -0
  41. package/chunks/SignalAndMessage.CYVzlFuL.mjs +198 -0
  42. package/chunks/SplitPane.Dw96M0Yf.mjs +219 -0
  43. package/chunks/TableColumn.DJYkznbJ.mjs +180 -0
  44. package/chunks/TableView.DyIdIxAg.mjs +484 -0
  45. package/chunks/Toolbar.DHuXJAoG.mjs +219 -0
  46. package/chunks/UserTaskListeners.Bp-2qkHs.mjs +599 -0
  47. package/chunks/VueCron.GfjodnyM.mjs +1766 -0
  48. package/chunks/VueTreeSelect.9Ywl-I8e.mjs +1872 -0
  49. package/chunks/_plugin-vue_export-helper.7vrlOII_.mjs +8 -0
  50. package/chunks/checkbox.emIuFmnt.mjs +437 -0
  51. package/chunks/confirmable-mixin.BBil7dto.mjs +1646 -0
  52. package/chunks/core.DJv6Qrae.mjs +51 -0
  53. package/chunks/dataformat.Bfr4nOcA.mjs +144 -0
  54. package/chunks/dic.DgDfnovD.mjs +116 -0
  55. package/chunks/dictionary.5eKjWeAp.mjs +19 -0
  56. package/chunks/dictionary.DxZxP0ej.mjs +87 -0
  57. package/chunks/event.B4iwtUNO.mjs +4 -0
  58. package/chunks/event.eJ-c1Z3a.mjs +224 -0
  59. package/chunks/focus-trap.DT4GnqQI.mjs +211 -0
  60. package/chunks/form-input.D25eDRMq.mjs +34 -0
  61. package/chunks/form-item.CgmUuw_n.mjs +714 -0
  62. package/chunks/form-pick.Axem0gOO.mjs +7 -0
  63. package/chunks/form-validate.B1KPCHqN.mjs +11 -0
  64. package/chunks/icon.CbS8-322.mjs +259 -0
  65. package/chunks/init.DwpukyOB.mjs +115 -0
  66. package/chunks/input.PejnqwSH.mjs +547 -0
  67. package/chunks/install.yLcn5MLL.mjs +84 -0
  68. package/chunks/message.BCmee5N0.mjs +400 -0
  69. package/chunks/overlay.DubSnqma.mjs +122 -0
  70. package/chunks/packages.BGjydzjm.mjs +56 -0
  71. package/chunks/permission.DgEVNWlh.mjs +16 -0
  72. package/chunks/photo-swipe.BB0SJZg9.mjs +55 -0
  73. package/chunks/radio.BotKXqJr.mjs +274 -0
  74. package/chunks/scroll.CzORc5Zk.mjs +28 -0
  75. package/chunks/scrollbar.CAmrlKi9.mjs +345 -0
  76. package/chunks/slot.C6Ozd2e7.mjs +25 -0
  77. package/chunks/style.BmlGmjpO.mjs +325 -0
  78. package/chunks/sub-table-plus-props.B_lLth3j.mjs +28 -0
  79. package/chunks/tab-mixin.u0EZpx3j.mjs +70 -0
  80. package/chunks/tag.DPi-PLbb.mjs +141 -0
  81. package/chunks/teleport._VGEzK4d.mjs +22 -0
  82. package/chunks/tooltip.D50x7Rva.mjs +1926 -0
  83. package/chunks/typescript.DiWBU4nj.mjs +4 -0
  84. package/chunks/use-aria.BW7nWOl1.mjs +17 -0
  85. package/chunks/use-composition.mUaomyno.mjs +47 -0
  86. package/chunks/use-deprecated.BfDSbZS9.mjs +12 -0
  87. package/chunks/use-empty-values.Dy_r78F6.mjs +263 -0
  88. package/chunks/use-form-item.wsRjehHp.mjs +47 -0
  89. package/chunks/use-global-config.C9hs-O_x.mjs +56 -0
  90. package/chunks/use-id.CFO5NeoV.mjs +15 -0
  91. package/chunks/use-size.DxrwTUwf.mjs +18 -0
  92. package/chunks/util.B3sjVZoZ.mjs +103 -0
  93. package/chunks/util.g-WQEec9.mjs +223 -0
  94. package/chunks/utilSelf.ZED4DmCU.mjs +46 -0
  95. package/chunks/utils.Cs2fYBrT.mjs +60 -0
  96. package/chunks/utils.DsGhtCIO.mjs +14 -0
  97. package/chunks/validator.C4-z_t9p.mjs +5 -0
  98. package/chunks/vnode.D_SioRnx.mjs +14 -0
  99. package/code-mirror-editor/index.mjs +89 -88
  100. package/comment/index.mjs +62 -57
  101. package/configComponents.mjs +40 -50
  102. package/confirm-button/index.mjs +34 -46
  103. package/confirmable/index.mjs +7 -17
  104. package/context-menu/index.mjs +195 -174
  105. package/count-up/index.mjs +97 -105
  106. package/custom-scrollbar/index.mjs +91 -98
  107. package/data-box/index.mjs +64 -47
  108. package/data-card/index.mjs +60 -49
  109. package/data-card-text/index.mjs +63 -51
  110. package/data-display/index.mjs +71 -53
  111. package/data-icons/index.mjs +70 -53
  112. package/data-imgtext/index.mjs +67 -46
  113. package/data-operatext/index.mjs +51 -42
  114. package/data-panel/index.mjs +57 -47
  115. package/data-pay/index.mjs +105 -52
  116. package/data-price/index.mjs +48 -42
  117. package/data-progress/index.mjs +67 -48
  118. package/data-rotate/index.mjs +61 -47
  119. package/data-table-picker/index.mjs +119 -74
  120. package/data-tabs/index.mjs +67 -47
  121. package/dialog-form/index.mjs +139 -89
  122. package/dynamic-table/index.mjs +166 -114
  123. package/e-charts/index.mjs +174 -200
  124. package/easy-popup/index.mjs +91 -102
  125. package/editable-progress/index.mjs +112 -85
  126. package/editable-tree/index.mjs +2 -485
  127. package/element-dialog/index.mjs +2 -307
  128. package/element-listeners/style.css +1 -0
  129. package/element-multi-instance/style.css +1 -0
  130. package/ellipsis/index.mjs +124 -148
  131. package/empty-view/index.mjs +48 -65
  132. package/error-view/index.mjs +39 -51
  133. package/flex-column/index.mjs +32 -51
  134. package/flex-item/index.mjs +54 -64
  135. package/flex-row/index.mjs +32 -39
  136. package/flex-scroller/index.mjs +29 -30
  137. package/flow/index.mjs +240 -248
  138. package/flow-designer/index.mjs +2 -5983
  139. package/flow-designer/style.css +1 -1
  140. package/flow-node/index.mjs +56 -64
  141. package/flow-viewer/index.mjs +159 -157
  142. package/form-block/index.mjs +2 -149
  143. package/form-button/index.mjs +35 -47
  144. package/form-card/index.mjs +14 -25
  145. package/form-cascader/index.mjs +2 -116
  146. package/form-checkbox/index.mjs +89 -71
  147. package/form-checkbox-group/index.mjs +161 -116
  148. package/form-date-picker/index.mjs +155 -144
  149. package/form-holder/index.mjs +137 -110
  150. package/form-input/index.mjs +113 -87
  151. package/form-input-cron-expression/index.mjs +97 -79
  152. package/form-input-email/index.mjs +64 -52
  153. package/form-input-id-card/index.mjs +72 -55
  154. package/form-input-phone-number/index.mjs +71 -57
  155. package/form-input-tag/index.mjs +88 -62
  156. package/form-input-time/index.mjs +2 -74
  157. package/form-item/index.mjs +2 -5
  158. package/form-item-config-provider/index.mjs +46 -60
  159. package/form-item-group/index.mjs +2 -160
  160. package/form-radio-group/index.mjs +161 -122
  161. package/form-select/index.mjs +2 -181
  162. package/form-switch/index.mjs +2 -55
  163. package/form-table/index.mjs +131 -85
  164. package/form-table-plus/index.mjs +164 -109
  165. package/form-textarea/index.mjs +90 -57
  166. package/form-tree-select/index.mjs +89 -72
  167. package/form-tree-select-multiple/index.mjs +92 -78
  168. package/form-view/index.mjs +275 -211
  169. package/fy-array/index.mjs +121 -74
  170. package/fy-article/index.mjs +73 -60
  171. package/fy-cascader/index.mjs +113 -91
  172. package/fy-checkbox/index.mjs +96 -66
  173. package/fy-code/index.mjs +48 -50
  174. package/fy-curd/index.mjs +2 -1903
  175. package/fy-date/index.mjs +76 -42
  176. package/fy-draggable/index.mjs +322 -318
  177. package/fy-dynamic/index.mjs +259 -227
  178. package/fy-empty/index.mjs +35 -36
  179. package/fy-form/index.mjs +2 -17
  180. package/fy-form-design/index.mjs +2 -2890
  181. package/fy-form-design/style.css +1 -1
  182. package/fy-from/crud/zh.d.ts +6 -6
  183. package/fy-input/index.mjs +117 -99
  184. package/fy-input-color/index.mjs +77 -56
  185. package/fy-input-icon/index.mjs +129 -85
  186. package/fy-input-map/index.mjs +242 -186
  187. package/fy-input-number/index.mjs +74 -50
  188. package/fy-input-table/index.mjs +160 -109
  189. package/fy-input-tree/index.mjs +259 -182
  190. package/fy-progress/index.mjs +36 -40
  191. package/fy-radio/index.mjs +53 -38
  192. package/fy-rate/index.mjs +86 -71
  193. package/fy-select/index.mjs +223 -140
  194. package/fy-slider/index.mjs +68 -44
  195. package/fy-switch/index.mjs +67 -42
  196. package/fy-tabs/index.mjs +46 -48
  197. package/fy-time/index.mjs +81 -53
  198. package/fy-title/index.mjs +18 -27
  199. package/fy-tree/index.mjs +382 -292
  200. package/fy-u-editor/index.mjs +2 -357
  201. package/fy-upload/index.mjs +2 -423
  202. package/guide-steps/index.mjs +72 -73
  203. package/helper-function.d.ts +2 -30
  204. package/helper-function.mjs +41 -67
  205. package/highlight-j-s/index.mjs +50 -59
  206. package/icon-card/index.mjs +34 -36
  207. package/icon-temp/index.mjs +27 -27
  208. package/iframe-window/index.mjs +39 -33
  209. package/image-cropper/index.mjs +171 -75
  210. package/image-preview/index.mjs +187 -118
  211. package/image-viewer/index.mjs +69 -66
  212. package/index.d.ts +3 -9
  213. package/index.mjs +173 -488
  214. package/input-number-range/index.mjs +78 -59
  215. package/j-s-x-component/index.mjs +13 -15
  216. package/keyboard/index.mjs +2 -369
  217. package/license/index.mjs +106 -115
  218. package/loading-view/index.mjs +39 -51
  219. package/login/index.mjs +252 -125
  220. package/monaco-editor/index.mjs +2 -7
  221. package/name-avatar/index.mjs +61 -53
  222. package/nav-bar/index.mjs +33 -31
  223. package/not-implement/index.mjs +10 -22
  224. package/notice/index.mjs +100 -94
  225. package/package.json +3 -3
  226. package/page/index.mjs +18 -25
  227. package/page-header/index.mjs +27 -33
  228. package/page-index/index.mjs +121 -100
  229. package/page-index-top/index.mjs +79 -79
  230. package/page-skeleton/index.mjs +48 -45
  231. package/page-skeleton-new/index.mjs +79 -50
  232. package/pageable-table/index.mjs +2 -522
  233. package/pageable-view/index.mjs +279 -275
  234. package/photo-swipe/index.d.ts +4 -0
  235. package/photo-swipe/index.mjs +33 -36
  236. package/picker-table-view/index.mjs +224 -126
  237. package/present-view/index.mjs +266 -200
  238. package/queue/index.mjs +45 -53
  239. package/record-video/index.mjs +2 -134
  240. package/resize-observer/index.mjs +43 -46
  241. package/search/index.mjs +116 -109
  242. package/sign/index.mjs +103 -110
  243. package/sign-panel/index.mjs +182 -141
  244. package/skeleton/index.mjs +51 -54
  245. package/skeleton-panel/index.mjs +33 -38
  246. package/split-pane/index.mjs +3 -197
  247. package/stateful/index.mjs +69 -73
  248. package/static-pageable-table/index.mjs +72 -66
  249. package/sub-table/index.mjs +508 -219
  250. package/sub-table-plus/index.mjs +592 -19
  251. package/swiper/index.mjs +128 -121
  252. package/tab/index.mjs +117 -119
  253. package/tab-item/index.mjs +48 -56
  254. package/table-column/index.mjs +2 -5
  255. package/table-view/index.mjs +3 -334
  256. package/tabs-view/index.mjs +109 -106
  257. package/tag-render/index.mjs +79 -69
  258. package/text-ellipsis/index.mjs +94 -78
  259. package/toolbar/index.mjs +2 -255
  260. package/toolbar-button/index.mjs +145 -121
  261. package/verify/index.mjs +58 -64
  262. package/vue-cron/index.mjs +2 -1188
  263. package/vue-qr-code/index.mjs +30 -54
  264. package/vue-quill-editor/index.mjs +123 -99
  265. package/vue-tags-input/index.mjs +348 -431
  266. package/vue-tree-select/index.mjs +2 -2627
  267. package/vue-video-player/index.mjs +135 -136
  268. package/watermark/index.mjs +46 -74
  269. package/web-types.json +197 -975
  270. package/x-input-tag/index.mjs +144 -109
  271. package/chunks/ElementTaskConfig.AvBOzAni.mjs +0 -325
  272. package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
  273. package/chunks/FyForm.DriwCJ7b.mjs +0 -765
  274. package/chunks/MonacoEditor.D31t4FTy.mjs +0 -327
  275. package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
  276. package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
  277. package/chunks/TableColumn.BzivvXMF.mjs +0 -337
  278. package/chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs +0 -10
  279. package/chunks/confirmable-mixin.BFZb6pcK.mjs +0 -86
  280. package/chunks/dataformat.DJoNBlmI.mjs +0 -154
  281. package/chunks/dic.BinnDitI.mjs +0 -128
  282. package/chunks/dictionary.DqiP9x2m.mjs +0 -25
  283. package/chunks/event.DSlcqYHL.mjs +0 -236
  284. package/chunks/form-input.BtS_J5a2.mjs +0 -31
  285. package/chunks/form-pick.BFTIVn_i.mjs +0 -11
  286. package/chunks/form-validate.CVarNHKX.mjs +0 -12
  287. package/chunks/helper.BiMLcEEk.mjs +0 -41
  288. package/chunks/index.BmYCjxZQ.mjs +0 -47
  289. package/chunks/index.CIfe3UB3.mjs +0 -16
  290. package/chunks/index.Cn7aq-Et.mjs +0 -184
  291. package/chunks/init.xOlFpTyZ.mjs +0 -122
  292. package/chunks/packages.ByyangTp.mjs +0 -58
  293. package/chunks/permission.CO31YIkD.mjs +0 -16
  294. package/chunks/slot.DXIbhGat.mjs +0 -27
  295. package/chunks/tab-mixin.BNK6dxLN.mjs +0 -81
  296. package/chunks/util.DI42t5GU.mjs +0 -241
  297. package/color-picker/index.mjs +0 -157
  298. package/egd-collapse/index.mjs +0 -62
  299. package/egd-collapse-item/index.mjs +0 -72
  300. package/form-input-number/index.mjs +0 -70
  301. package/form-input-number/style.css +0 -1
  302. package/input-number/index.mjs +0 -233
  303. package/input-number/style.css +0 -1
  304. package/keep-view-alive/index.mjs +0 -117
  305. package/search-popover/index.mjs +0 -118
  306. package/search-popover/style.css +0 -1
  307. /package/{base.css → utils/style.css} +0 -0
@@ -1,2890 +1,2 @@
1
- import p from "element-ui/lib/button";
2
- import { F as ae } from "../chunks/FyForm.DriwCJ7b.mjs";
3
- import E from "element-ui/lib/drawer";
4
- import c from "element-ui/lib/switch";
5
- import i from "element-ui/lib/form-item";
6
- import le from "element-ui/lib/slider";
7
- import w from "element-ui/lib/radio";
8
- import B from "element-ui/lib/popover";
9
- import I from "element-ui/lib/form";
10
- import { M as g, c as T } from "../chunks/MonacoEditor.D31t4FTy.mjs";
11
- import r from "element-ui/lib/input";
12
- import f from "element-ui/lib/input-number";
13
- import d from "element-ui/lib/option";
14
- import b from "element-ui/lib/select";
15
- import { n as h } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
16
- import F from "element-ui/lib/tab-pane";
17
- import L from "../fy-empty/index.mjs";
18
- import "../monaco-editor/style.css";
19
- import { z as y, d as _ } from "../chunks/util.DI42t5GU.mjs";
20
- import R from "element-ui/lib/collapse-item";
21
- import $ from "element-ui/lib/link";
22
- import se from "element-ui/lib/option-group";
23
- import ie from "element-ui/lib/collapse";
24
- import N from "element-ui/lib/color-picker";
25
- import K from "element-ui/lib/tag";
26
- import A from "element-ui/lib/radio-button";
27
- import M from "element-ui/lib/radio-group";
28
- import z from "../fy-dynamic/index.mjs";
29
- import Q from "element-ui/lib/tabs";
30
- import S from "vuedraggable";
31
- import ne from "../element-dialog/index.mjs";
32
- import oe from "element-ui/lib/tree";
33
- import re from "../fy-input-color/index.mjs";
34
- import ce from "../fy-input-icon/index.mjs";
35
- import C from "element-ui/lib/table-column";
36
- import G from "element-ui/lib/table";
37
- import j from "element-ui/lib/aside";
38
- import "../fy-u-editor/style.css";
39
- import H from "element-ui/lib/col";
40
- import de from "element-ui/lib/row";
41
- import pe from "element-ui/lib/main";
42
- import ue from "element-ui/lib/header";
43
- import V from "element-ui/lib/container";
44
- import me from "element-ui/lib/tooltip";
45
- import { isBlank as q } from "@web-utils/core";
46
- import { cloneDeep as W } from "@web-utils/integrations/lodash";
47
- const he = {
48
- name: "FormConfig",
49
- props: {
50
- data: Object
51
- }
52
- };
53
- var fe = function() {
54
- var e = this, t = e._self._c;
55
- return t("div", { staticClass: "form-config-container" }, [t(I, { attrs: { "label-position": "left", "label-suffix": ":", "label-width": "130px", size: "small" } }, [t(i, { attrs: { label: "标签对齐方式" } }, [t(b, { attrs: { placeholder: "标签对齐方式" }, model: { value: e.data.labelPosition, callback: function(a) {
56
- e.$set(e.data, "labelPosition", a);
57
- }, expression: "data.labelPosition" } }, [t(d, { attrs: { label: "左对齐", value: "left" } }), t(d, { attrs: { label: "右对齐", value: "right" } }), t(d, { attrs: { label: "顶部对齐", value: "top" } })], 1)], 1), t(i, { attrs: { label: "标签宽度" } }, [t(f, { staticStyle: { width: "100%" }, attrs: { min: 80, max: 200, step: 10, "controls-position": "right", placeholder: "标签宽度" }, model: { value: e.data.labelWidth, callback: function(a) {
58
- e.$set(e.data, "labelWidth", a);
59
- }, expression: "data.labelWidth" } })], 1), t(i, { attrs: { label: "标签后缀" } }, [t(r, { attrs: { placeholder: "标签后缀" }, model: { value: e.data.labelSuffix, callback: function(a) {
60
- e.$set(e.data, "labelSuffix", a);
61
- }, expression: "data.labelSuffix" } })], 1), t(i, { attrs: { label: "项之间的间隔" } }, [t(f, { staticStyle: { width: "100%" }, attrs: { min: 0, max: 60, step: 5, "controls-position": "right", placeholder: "项之间的间隔" }, model: { value: e.data.gutter, callback: function(a) {
62
- e.$set(e.data, "gutter", a);
63
- }, expression: "data.gutter" } })], 1), t(i, { attrs: { label: "多分组转标签" } }, [t(c, { model: { value: e.data.tabs, callback: function(a) {
64
- e.$set(e.data, "tabs", a);
65
- }, expression: "data.tabs" } })], 1), t(i, { attrs: { label: "详情模式" } }, [t(c, { model: { value: e.data.detail, callback: function(a) {
66
- e.$set(e.data, "detail", a);
67
- }, expression: "data.detail" } })], 1), t(i, { attrs: { label: "显示按钮" } }, [t(c, { model: { value: e.data.menuBtn, callback: function(a) {
68
- e.$set(e.data, "menuBtn", a);
69
- }, expression: "data.menuBtn" } })], 1), e.data.menuBtn ? t(i, { attrs: { label: "显示提交按钮" } }, [t(c, { model: { value: e.data.submitBtn, callback: function(a) {
70
- e.$set(e.data, "submitBtn", a);
71
- }, expression: "data.submitBtn" } })], 1) : e._e(), e.data.menuBtn && e.data.submitBtn ? t(i, { attrs: { label: "提交按钮的文字" } }, [t(r, { attrs: { placeholder: "提交按钮的文字" }, model: { value: e.data.submitText, callback: function(a) {
72
- e.$set(e.data, "submitText", a);
73
- }, expression: "data.submitText" } })], 1) : e._e(), e.data.menuBtn ? t(i, { attrs: { label: "显示清空按钮" } }, [t(c, { model: { value: e.data.emptyBtn, callback: function(a) {
74
- e.$set(e.data, "emptyBtn", a);
75
- }, expression: "data.emptyBtn" } })], 1) : e._e(), e.data.menuBtn && e.data.emptyBtn ? t(i, { attrs: { label: "清空按钮的文字" } }, [t(r, { attrs: { placeholder: "提交按钮的文字" }, model: { value: e.data.emptyText, callback: function(a) {
76
- e.$set(e.data, "emptyText", a);
77
- }, expression: "data.emptyText" } })], 1) : e._e(), t(i, { attrs: { label: "全局只读" } }, [t(c, { model: { value: e.data.readonly, callback: function(a) {
78
- e.$set(e.data, "readonly", a);
79
- }, expression: "data.readonly" } })], 1), t(i, { attrs: { label: "全局禁用" } }, [t(c, { model: { value: e.data.disabled, callback: function(a) {
80
- e.$set(e.data, "disabled", a);
81
- }, expression: "data.disabled" } })], 1)], 1)], 1);
82
- }, be = [], ge = /* @__PURE__ */ h(
83
- he,
84
- fe,
85
- be,
86
- !1,
87
- null,
88
- null
89
- );
90
- const U = ge.exports, ve = {
91
- name: "ConfigEvent",
92
- components: { MonacoEditor: g },
93
- props: {
94
- data: Object
95
- },
96
- data() {
97
- return {
98
- change: "",
99
- click: "",
100
- focus: "",
101
- blur: "",
102
- options: {
103
- fullScreen: !0,
104
- minimap: {
105
- enabled: !1
106
- }
107
- }
108
- };
109
- },
110
- watch: {
111
- "data.prop": {
112
- handler() {
113
- const { change: l, click: e, focus: t, blur: a } = this.data;
114
- this.$set(this, "change", l ? `${l}` : `({value}) => {\r
115
- \r
116
- }`), this.$set(this, "click", e ? `${e}` : `({value}) => {\r
117
- \r
118
- }`), this.$set(this, "focus", t ? `${t}` : `({value}) => {\r
119
- \r
120
- }`), this.$set(this, "blur", a ? `${a}` : `({value}) => {\r
121
- \r
122
- }`);
123
- },
124
- immediate: !0
125
- }
126
- },
127
- mounted() {
128
- this.$nextTick(() => {
129
- ["change", "click", "focus", "blur"].forEach((e) => {
130
- this.$watch(`${e}`, (t) => {
131
- try {
132
- this.$set(this.data, e, y(t));
133
- } catch {
134
- }
135
- });
136
- });
137
- });
138
- }
139
- };
140
- var _e = function() {
141
- var e = this, t = e._self._c;
142
- return t("div", [t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("change:")]), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "300", "key-index": `event-change-${e.data.prop}`, options: e.options }, model: { value: e.change, callback: function(a) {
143
- e.change = a;
144
- }, expression: "change" } })], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("click:")]), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "200", "key-index": `event-click-${e.data.prop}`, options: e.options }, model: { value: e.click, callback: function(a) {
145
- e.click = a;
146
- }, expression: "click" } })], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("focus:")]), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "200", "key-index": `event-focus-${e.data.prop}`, options: e.options }, model: { value: e.focus, callback: function(a) {
147
- e.focus = a;
148
- }, expression: "focus" } })], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("blur:")]), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "200", "key-index": `event-blur-${e.data.prop}`, options: e.options }, model: { value: e.blur, callback: function(a) {
149
- e.blur = a;
150
- }, expression: "blur" } })], 1)])]);
151
- }, ye = [], xe = /* @__PURE__ */ h(
152
- ve,
153
- _e,
154
- ye,
155
- !1,
156
- null,
157
- null
158
- );
159
- const J = xe.exports, D = [
160
- {
161
- title: "布局字段",
162
- list: [
163
- {
164
- type: "group",
165
- label: "分组",
166
- icon: "icon-group",
167
- display: !0,
168
- arrow: !1,
169
- collapse: !0,
170
- children: {
171
- column: []
172
- }
173
- },
174
- {
175
- type: "dynamic",
176
- label: "子表单",
177
- icon: "icon-table",
178
- span: 24,
179
- display: !0,
180
- children: {
181
- align: "center",
182
- headerAlign: "center",
183
- index: !1,
184
- addBtn: !0,
185
- delBtn: !0,
186
- column: []
187
- }
188
- },
189
- {
190
- type: "title",
191
- icon: "icon-title",
192
- span: 24,
193
- display: !0,
194
- styles: {
195
- fontSize: "18px",
196
- color: "#000"
197
- },
198
- label: "标题",
199
- labelWidth: "0px",
200
- value: "标题"
201
- }
202
- ]
203
- },
204
- {
205
- title: "输入字段",
206
- list: [
207
- {
208
- type: "input",
209
- label: "单行文本",
210
- icon: "icon-input",
211
- span: 24,
212
- display: !0
213
- },
214
- {
215
- type: "password",
216
- label: "密码",
217
- icon: "icon-password",
218
- span: 24,
219
- display: !0
220
- },
221
- {
222
- type: "textarea",
223
- label: "多行文本",
224
- icon: "icon-textarea",
225
- span: 24,
226
- display: !0
227
- },
228
- {
229
- type: "number",
230
- label: "计数器",
231
- icon: "icon-number",
232
- controls: !0,
233
- span: 24,
234
- display: !0
235
- },
236
- {
237
- type: "url",
238
- label: "超链接",
239
- icon: "icon-url",
240
- span: 24,
241
- display: !0
242
- },
243
- {
244
- type: "array",
245
- label: "数组",
246
- icon: "icon-array",
247
- span: 24,
248
- display: !0
249
- },
250
- {
251
- type: "img",
252
- label: "图片",
253
- icon: "icon-img",
254
- span: 24,
255
- display: !0
256
- },
257
- {
258
- type: "map",
259
- component: "fy-input-map",
260
- label: "地图选择器",
261
- icon: "icon-map",
262
- span: 24,
263
- display: !0
264
- }
265
- ]
266
- },
267
- {
268
- title: "选择字段",
269
- list: [
270
- {
271
- type: "radio",
272
- label: "单选框组",
273
- icon: "icon-radio",
274
- dicData: [
275
- { label: "选项一", value: "0" },
276
- { label: "选项二", value: "1" },
277
- { label: "选项三", value: "2" }
278
- ],
279
- span: 24,
280
- display: !0,
281
- dicOption: "static",
282
- props: {
283
- label: "label",
284
- value: "value"
285
- }
286
- },
287
- {
288
- type: "checkbox",
289
- label: "多选框组",
290
- icon: "icon-checkbox",
291
- dicData: [
292
- { label: "选项一", value: "0" },
293
- { label: "选项二", value: "1" },
294
- { label: "选项三", value: "2" }
295
- ],
296
- span: 24,
297
- display: !0,
298
- dicOption: "static",
299
- props: {
300
- label: "label",
301
- value: "value"
302
- }
303
- },
304
- {
305
- type: "select",
306
- label: "下拉选择器",
307
- icon: "icon-select",
308
- dicData: [
309
- { label: "选项一", value: "0" },
310
- { label: "选项二", value: "1" },
311
- { label: "选项三", value: "2" }
312
- ],
313
- // 用于做级联配置
314
- cascaderItem: [],
315
- span: 24,
316
- display: !0,
317
- dicOption: "static",
318
- props: {
319
- label: "label",
320
- value: "value",
321
- desc: "desc"
322
- }
323
- },
324
- {
325
- type: "cascader",
326
- label: "级联选择器",
327
- icon: "icon-link",
328
- span: 24,
329
- display: !0,
330
- dicData: [
331
- {
332
- label: "选项一",
333
- value: 0,
334
- children: [
335
- {
336
- label: "选项1-1",
337
- value: 11
338
- },
339
- {
340
- label: "选项1-2",
341
- value: 12
342
- }
343
- ]
344
- },
345
- { label: "选项二", value: "1" },
346
- { label: "选项三", value: "2" }
347
- ],
348
- cascaderIndex: 1,
349
- // 用于做级联配置
350
- cascaderItem: [],
351
- showAllLevels: !0,
352
- dicOption: "static",
353
- separator: "/",
354
- props: {
355
- label: "label",
356
- value: "value",
357
- desc: "desc"
358
- }
359
- },
360
- {
361
- type: "tree",
362
- label: "树形选择器",
363
- icon: "icon-tree",
364
- span: 24,
365
- display: !0,
366
- dicOption: "static",
367
- dicData: [
368
- {
369
- label: "选项一",
370
- value: 0,
371
- children: [
372
- {
373
- label: "选项1-1",
374
- value: "11"
375
- },
376
- {
377
- label: "选项1-2",
378
- value: "12"
379
- }
380
- ]
381
- },
382
- { label: "选项二", value: "1" },
383
- { label: "选项三", value: "2" }
384
- ],
385
- parent: !0,
386
- // 用于做级联配置
387
- cascaderItem: [],
388
- props: {
389
- label: "label",
390
- value: "value",
391
- desc: "desc"
392
- }
393
- },
394
- {
395
- type: "table",
396
- label: "表格选择器",
397
- icon: "icon-table",
398
- display: !0,
399
- span: 24,
400
- children: {
401
- border: !0,
402
- searchMenuSpan: 6,
403
- searchIcon: !0,
404
- column: [],
405
- props: {
406
- url: "",
407
- method: "get",
408
- rowKey: "id",
409
- needPage: !0,
410
- currentPageKey: "current",
411
- pageSizeKey: "size",
412
- totalKey: "total",
413
- recordsKey: "records",
414
- resKey: "data.data",
415
- auto: !0
416
- }
417
- },
418
- formatter: (l) => l.name,
419
- props: {
420
- label: "name",
421
- value: "id"
422
- }
423
- }
424
- ]
425
- },
426
- {
427
- title: "上传字段",
428
- list: [
429
- {
430
- type: "upload",
431
- label: "上传",
432
- icon: "icon-upload",
433
- span: 24,
434
- display: !0,
435
- showFileList: !0,
436
- multiple: !0,
437
- limit: 10,
438
- // props: {},
439
- propsHttp: {},
440
- headersConfig: [],
441
- dataConfig: []
442
- }
443
- ]
444
- },
445
- {
446
- title: "日期时间字段",
447
- list: [
448
- {
449
- type: "year",
450
- label: "年",
451
- icon: "icon-year",
452
- span: 24,
453
- display: !0,
454
- format: "yyyy",
455
- valueFormat: "yyyy"
456
- },
457
- {
458
- type: "month",
459
- label: "月",
460
- icon: "icon-month",
461
- span: 24,
462
- display: !0,
463
- format: "MM",
464
- valueFormat: "MM"
465
- },
466
- {
467
- type: "week",
468
- label: "周",
469
- icon: "icon-week",
470
- span: 24,
471
- display: !0,
472
- format: "yyyy 第 WW 周"
473
- },
474
- {
475
- type: "date",
476
- label: "日期",
477
- icon: "icon-date",
478
- span: 24,
479
- display: !0,
480
- format: "yyyy-MM-dd",
481
- valueFormat: "yyyy-MM-dd"
482
- },
483
- {
484
- type: "time",
485
- label: "时间",
486
- icon: "icon-time",
487
- span: 24,
488
- display: !0,
489
- format: "HH:mm:ss",
490
- valueFormat: "HH:mm:ss"
491
- },
492
- {
493
- type: "datetime",
494
- label: "日期时间",
495
- icon: "icon-datetime",
496
- span: 24,
497
- display: !0,
498
- format: "yyyy-MM-dd HH:mm:ss",
499
- valueFormat: "yyyy-MM-dd HH:mm:ss"
500
- },
501
- {
502
- type: "daterange",
503
- label: "日期范围",
504
- icon: "icon-date-range",
505
- span: 24,
506
- display: !0,
507
- format: "yyyy-MM-dd",
508
- valueFormat: "yyyy-MM-dd"
509
- },
510
- {
511
- type: "timerange",
512
- label: "时间范围",
513
- icon: "icon-time-range",
514
- span: 24,
515
- display: !0,
516
- format: "HH:mm:ss",
517
- valueFormat: "HH:mm:ss"
518
- },
519
- {
520
- type: "datetimerange",
521
- label: "日期时间范围",
522
- icon: "icon-datetime-range",
523
- span: 24,
524
- display: !0,
525
- format: "yyyy-MM-dd HH:mm:ss",
526
- valueFormat: "yyyy-MM-dd HH:mm:ss"
527
- }
528
- ]
529
- },
530
- {
531
- title: "插件字段(需单独引入依赖)",
532
- list: [
533
- {
534
- type: "u-editor",
535
- component: "fy-u-editor",
536
- label: "富文本",
537
- icon: "icon-richtext",
538
- span: 24,
539
- display: !0,
540
- options: {
541
- action: "",
542
- oss: "",
543
- props: {},
544
- ali: {},
545
- qiniu: {}
546
- }
547
- }
548
- ]
549
- },
550
- {
551
- title: "其他字段",
552
- list: [
553
- {
554
- type: "icon",
555
- label: "图标",
556
- component: "fy-input-icon",
557
- icon: "icon-icon",
558
- span: 24,
559
- display: !0,
560
- params: {
561
- iconList: [
562
- {
563
- label: "基本图标",
564
- list: ["el-icon-info", "el-icon-error", "el-icon-error", "el-icon-success", "el-icon-warning", "el-icon-question"]
565
- },
566
- {
567
- label: "方向图标",
568
- list: ["el-icon-info", "el-icon-back", "el-icon-arrow-left", "el-icon-arrow-down", "el-icon-arrow-right", "el-icon-arrow-up"]
569
- },
570
- {
571
- label: "符号图标",
572
- list: ["el-icon-plus", "el-icon-minus", "el-icon-close", "el-icon-check"]
573
- }
574
- ]
575
- }
576
- },
577
- {
578
- type: "switch",
579
- label: "开关",
580
- icon: "icon-switch",
581
- span: 24,
582
- display: !0,
583
- value: "0",
584
- dicData: [
585
- { label: "", value: "0" },
586
- { label: "", value: "1" }
587
- ]
588
- },
589
- {
590
- type: "rate",
591
- label: "评价",
592
- icon: "icon-star",
593
- span: 24,
594
- display: !0,
595
- max: 5,
596
- value: 0,
597
- texts: ["极差", "失望", "一般", "满意", "惊喜"],
598
- colors: ["#99A9BF", "#F7BA2A", "#FF9900"]
599
- },
600
- {
601
- type: "slider",
602
- label: "滑块",
603
- icon: "icon-slider",
604
- span: 24,
605
- display: !0,
606
- min: 0,
607
- max: 10
608
- },
609
- {
610
- type: "color",
611
- label: "颜色选择器",
612
- icon: "icon-color",
613
- span: 24,
614
- display: !0
615
- }
616
- ]
617
- }
618
- ], $e = {
619
- name: "ConfigCustom",
620
- components: { MonacoEditor: g },
621
- props: {
622
- data: Object
623
- },
624
- data() {
625
- return {
626
- params: this.data.params || {},
627
- event: this.data.event || {},
628
- options: {
629
- fullScreen: !0,
630
- minimap: {
631
- enabled: !1
632
- }
633
- }
634
- };
635
- },
636
- watch: {
637
- "data.params"(l) {
638
- this.params = l || {};
639
- },
640
- "data.event"(l) {
641
- this.event = l || {};
642
- },
643
- params(l) {
644
- try {
645
- this.data.params = y(`(${l})`);
646
- } catch {
647
- }
648
- },
649
- event(l) {
650
- try {
651
- this.data.event = y(`(${l})`);
652
- } catch {
653
- }
654
- }
655
- }
656
- };
657
- var ke = function() {
658
- var e = this, t = e._self._c;
659
- return t("div", [t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("自定义属性:")]), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "300", "key-index": e.data.prop, options: e.options }, model: { value: e.params, callback: function(a) {
660
- e.params = a;
661
- }, expression: "params" } })], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("自定义事件:")]), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "300", "key-index": e.data.prop, options: e.options }, model: { value: e.event, callback: function(a) {
662
- e.event = a;
663
- }, expression: "event" } })], 1)])]);
664
- }, Ce = [], we = /* @__PURE__ */ h(
665
- $e,
666
- ke,
667
- Ce,
668
- !1,
669
- null,
670
- null
671
- );
672
- const Ae = we.exports, Fe = {
673
- name: "ConfigInput",
674
- props: {
675
- data: Object
676
- }
677
- };
678
- var Se = function() {
679
- var e = this, t = e._self._c;
680
- return t("div", [t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
681
- e.$set(e.data, "placeholder", a);
682
- }, expression: "data.placeholder" } })], 1), t(i, { attrs: { label: "前缀" } }, [t(r, { attrs: { clearable: "", placeholder: "前缀" }, model: { value: e.data.prepend, callback: function(a) {
683
- e.$set(e.data, "prepend", a);
684
- }, expression: "data.prepend" } })], 1), t(i, { attrs: { label: "后缀" } }, [t(r, { attrs: { clearable: "", placeholder: "后缀" }, model: { value: e.data.append, callback: function(a) {
685
- e.$set(e.data, "append", a);
686
- }, expression: "data.append" } })], 1), t(i, { attrs: { label: "最大长度" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最大长度" }, model: { value: e.data.maxlength, callback: function(a) {
687
- e.$set(e.data, "maxlength", a);
688
- }, expression: "data.maxlength" } })], 1), e.data.type !== "password" ? t(i, { attrs: { label: "显示计数" } }, [t(c, { model: { value: e.data.showWordLimit, callback: function(a) {
689
- e.$set(e.data, "showWordLimit", a);
690
- }, expression: "data.showWordLimit" } })], 1) : e._e(), e.data.type === "password" ? t(i, { attrs: { label: "显示密码" } }, [t(c, { model: { value: e.data.showPassword, callback: function(a) {
691
- e.$set(e.data, "showPassword", a);
692
- }, expression: "data.showPassword" } })], 1) : e._e()], 1);
693
- }, Oe = [], We = /* @__PURE__ */ h(
694
- Fe,
695
- Se,
696
- Oe,
697
- !1,
698
- null,
699
- null
700
- );
701
- const Ie = We.exports, Ee = {
702
- name: "ConfigTextarea",
703
- props: {
704
- data: Object
705
- }
706
- };
707
- var Be = function() {
708
- var e = this, t = e._self._c;
709
- return t("div", [t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { type: "textarea", autosize: "", clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
710
- e.$set(e.data, "placeholder", a);
711
- }, expression: "data.placeholder" } })], 1), t(i, { attrs: { label: "最大长度" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最大长度" }, model: { value: e.data.maxlength, callback: function(a) {
712
- e.$set(e.data, "maxlength", a);
713
- }, expression: "data.maxlength" } })], 1), t(i, { attrs: { label: "显示计数" } }, [t(c, { model: { value: e.data.showWordLimit, callback: function(a) {
714
- e.$set(e.data, "showWordLimit", a);
715
- }, expression: "data.showWordLimit" } })], 1), t(i, { attrs: { label: "最小行" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最小行", min: 1 }, model: { value: e.data.minRows, callback: function(a) {
716
- e.$set(e.data, "minRows", a);
717
- }, expression: "data.minRows" } })], 1), t(i, { attrs: { label: "最大行" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最大行", min: 2 }, model: { value: e.data.maxRows, callback: function(a) {
718
- e.$set(e.data, "maxRows", a);
719
- }, expression: "data.maxRows" } })], 1)], 1);
720
- }, Te = [], ze = /* @__PURE__ */ h(
721
- Ee,
722
- Be,
723
- Te,
724
- !1,
725
- null,
726
- null
727
- );
728
- const Pe = ze.exports, Re = {
729
- name: "ConfigNumber",
730
- props: {
731
- data: Object
732
- }
733
- };
734
- var De = function() {
735
- var e = this, t = e._self._c;
736
- return t("div", [t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
737
- e.$set(e.data, "placeholder", a);
738
- }, expression: "data.placeholder" } })], 1), t(i, { attrs: { label: "最小值" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最小值" }, model: { value: e.data.minRows, callback: function(a) {
739
- e.$set(e.data, "minRows", a);
740
- }, expression: "data.minRows" } })], 1), t(i, { attrs: { label: "最大值" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最大值" }, model: { value: e.data.maxRows, callback: function(a) {
741
- e.$set(e.data, "maxRows", a);
742
- }, expression: "data.maxRows" } })], 1), t(i, { attrs: { label: "步长" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "步长" }, model: { value: e.data.step, callback: function(a) {
743
- e.$set(e.data, "step", a);
744
- }, expression: "data.step" } })], 1), t(i, { attrs: { label: "数值精度" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "数值精度", min: 0, max: 10 }, model: { value: e.data.precision, callback: function(a) {
745
- e.$set(e.data, "precision", a);
746
- }, expression: "data.precision" } })], 1), t(i, { attrs: { label: "开启控制器", "label-width": "100px" } }, [t(c, { model: { value: e.data.controls, callback: function(a) {
747
- e.$set(e.data, "controls", a);
748
- }, expression: "data.controls" } })], 1), e.data.controls ? t(i, { attrs: { label: "控制器位置", "label-width": "100px" } }, [t(w, { attrs: { label: "" }, model: { value: e.data.controlsPosition, callback: function(a) {
749
- e.$set(e.data, "controlsPosition", a);
750
- }, expression: "data.controlsPosition" } }, [e._v(" 默认 ")]), t(w, { attrs: { label: "right" }, model: { value: e.data.controlsPosition, callback: function(a) {
751
- e.$set(e.data, "controlsPosition", a);
752
- }, expression: "data.controlsPosition" } }, [e._v(" 右 ")])], 1) : e._e()], 1);
753
- }, Me = [], Qe = /* @__PURE__ */ h(
754
- Re,
755
- De,
756
- Me,
757
- !1,
758
- null,
759
- null
760
- );
761
- const Ke = Qe.exports, je = {
762
- name: "ConfigDynamic",
763
- props: {
764
- data: Object
765
- }
766
- };
767
- var Ve = function() {
768
- var e = this, t = e._self._c;
769
- return t("div", [t(i, { attrs: { label: "对齐方式" } }, [t(b, { attrs: { placeholder: "对齐方式", clearable: "" }, model: { value: e.data.children.align, callback: function(a) {
770
- e.$set(e.data.children, "align", a);
771
- }, expression: "data.children.align" } }, [t(d, { attrs: { label: "居左", value: "left" } }), t(d, { attrs: { label: "居中", value: "center" } }), t(d, { attrs: { label: "居右", value: "right" } })], 1)], 1), t(i, { attrs: { label: "头部对齐方式", "label-width": "110px" } }, [t(b, { attrs: { placeholder: "对齐方式", clearable: "" }, model: { value: e.data.children.headerAlign, callback: function(a) {
772
- e.$set(e.data.children, "headerAlign", a);
773
- }, expression: "data.children.headerAlign" } }, [t(d, { attrs: { label: "居左", value: "left" } }), t(d, { attrs: { label: "居中", value: "center" } }), t(d, { attrs: { label: "居右", value: "right" } })], 1)], 1), t(i, { attrs: { label: "表单格式" } }, [t(b, { attrs: { placeholder: "表单格式", clearable: "" }, model: { value: e.data.children.type, callback: function(a) {
774
- e.$set(e.data.children, "type", a);
775
- }, expression: "data.children.type" } }, [t(d, { attrs: { label: "表格", value: "" } }), t(d, { attrs: { label: "表单", value: "form" } })], 1)], 1), e.data.children.type === "form" ? t(i, { attrs: { label: "序号" } }, [t(c, { model: { value: e.data.children.index, callback: function(a) {
776
- e.$set(e.data.children, "index", a);
777
- }, expression: "data.children.index" } })], 1) : e._e(), t(i, { attrs: { label: "添加按钮" } }, [t(c, { model: { value: e.data.children.addBtn, callback: function(a) {
778
- e.$set(e.data.children, "addBtn", a);
779
- }, expression: "data.children.addBtn" } })], 1), t(i, { attrs: { label: "删除按钮" } }, [t(c, { model: { value: e.data.children.delBtn, callback: function(a) {
780
- e.$set(e.data.children, "delBtn", a);
781
- }, expression: "data.children.delBtn" } })], 1)], 1);
782
- }, qe = [], Le = /* @__PURE__ */ h(
783
- je,
784
- Ve,
785
- qe,
786
- !1,
787
- null,
788
- null
789
- );
790
- const Ne = Le.exports, Ge = {
791
- name: "ConfigSwitch",
792
- props: {
793
- data: Object
794
- },
795
- methods: {
796
- handleDicClear() {
797
- this.data.dicData = [
798
- { label: "", value: "0" },
799
- { label: "", value: "1" }
800
- ];
801
- }
802
- }
803
- };
804
- var He = function() {
805
- var e = this, t = e._self._c;
806
- return t("div", [t(i, { attrs: { label: "自定义" } }, [t(p, { staticClass: "danger", attrs: { type: "text" }, on: { click: e.handleDicClear } }, [e._v(" 清空 ")]), e._l(e.data.dicData, function(a, s) {
807
- return t("div", { key: s, staticClass: "dic" }, [t(r, { staticStyle: { "margin-right": "5px" }, attrs: { size: "mini", placeholder: "自定义文字", clearable: "" }, model: { value: a.label, callback: function(n) {
808
- e.$set(a, "label", n);
809
- }, expression: "item.label" } }), t(r, { attrs: { size: "mini", clearable: "", placeholder: "自定义值" }, model: { value: a.value, callback: function(n) {
810
- e.$set(a, "value", n);
811
- }, expression: "item.value" } })], 1);
812
- })], 2)], 1);
813
- }, Ue = [], Je = /* @__PURE__ */ h(
814
- Ge,
815
- He,
816
- Ue,
817
- !1,
818
- null,
819
- "31aa4f25"
820
- );
821
- const Ye = Je.exports, Xe = {
822
- name: "ConfigRate",
823
- props: {
824
- data: Object
825
- },
826
- data() {
827
- return {
828
- textVisible: !1,
829
- textValue: "",
830
- colorValue: ""
831
- };
832
- },
833
- methods: {
834
- handleTextClose(l) {
835
- this.data.texts.splice(this.data.texts.indexOf(l), 1);
836
- },
837
- showTextInput() {
838
- this.textVisible = !0, this.$nextTick(() => {
839
- this.$refs.textTag.$refs.input.focus();
840
- });
841
- },
842
- handleTextConfirm() {
843
- this.textValue && this.data.texts.push(this.textValue), this.textVisible = !1, this.textValue = "";
844
- },
845
- handleColorClose(l) {
846
- this.data.colors.splice(this.data.colors.indexOf(l), 1);
847
- },
848
- handleColorConfirm() {
849
- this.colorValue && this.data.colors.push(this.colorValue), this.colorValue = "";
850
- }
851
- // handleIconClose(tag) {
852
- // this.data.iconClasses.splice(this.data.iconClasses.indexOf(tag), 1);
853
- // },
854
- // showIconInput() {
855
- // this.iconVisible = true;
856
- // this.$nextTick(() => {
857
- // this.$refs.iconTag.$refs.input.focus();
858
- // });
859
- // },
860
- // handleIconConfirm() {
861
- // if (this.iconValue) this.data.iconClasses.push(this.iconValue);
862
- // this.iconVisible = false;
863
- // this.iconValue = '';
864
- // }
865
- }
866
- };
867
- var Ze = function() {
868
- var e = this, t = e._self._c;
869
- return t("div", [t(i, { attrs: { label: "最大星数" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最大星数" }, model: { value: e.data.max, callback: function(a) {
870
- e.$set(e.data, "max", a);
871
- }, expression: "data.max" } })], 1), t(i, { attrs: { label: "是否显示文本", "label-width": "110px" } }, [t(c, { model: { value: e.data.showText, callback: function(a) {
872
- e.$set(e.data, "showText", a);
873
- }, expression: "data.showText" } })], 1), e.data.showText ? t(i, { attrs: { label: "自定义文本", "label-width": "110px" } }, [e._l(e.data.texts, function(a, s) {
874
- return t(K, { key: s, attrs: { size: "small", closable: "" }, on: { close: function(n) {
875
- return e.handleTextClose(a);
876
- } } }, [e._v(" " + e._s(a) + " ")]);
877
- }), e.textVisible ? t(r, { ref: "textTag", staticClass: "input-new-tag", attrs: { size: "mini", clearable: "" }, on: { blur: e.handleTextConfirm }, nativeOn: { keyup: function(a) {
878
- return !a.type.indexOf("key") && e._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : e.handleTextConfirm.apply(null, arguments);
879
- } }, model: { value: e.textValue, callback: function(a) {
880
- e.textValue = a;
881
- }, expression: "textValue" } }) : e._e(), !e.textVisible && e.data.texts.length < e.data.max ? t(p, { staticStyle: { "margin-left": "5px" }, attrs: { size: "mini", icon: "el-icon-plus", circle: "" }, on: { click: e.showTextInput } }) : e._e()], 2) : e._e(), t(i, { attrs: { label: "自定义颜色", "label-width": "110px" } }, [e._l(e.data.colors, function(a, s) {
882
- return t(K, { key: s, style: { color: a }, attrs: { closable: "", size: "small" }, on: { close: function(n) {
883
- return e.handleColorClose(a);
884
- } } }, [e._v(" " + e._s(a) + " ")]);
885
- }), t(N, { staticClass: "color-picker", attrs: { size: "mini" }, on: { change: e.handleColorConfirm }, model: { value: e.colorValue, callback: function(a) {
886
- e.colorValue = a;
887
- }, expression: "colorValue" } })], 2)], 1);
888
- }, et = [], tt = /* @__PURE__ */ h(
889
- Xe,
890
- Ze,
891
- et,
892
- !1,
893
- null,
894
- "befe1506"
895
- );
896
- const at = tt.exports, lt = {
897
- name: "ConfigSlider",
898
- props: {
899
- data: Object
900
- }
901
- };
902
- var st = function() {
903
- var e = this, t = e._self._c;
904
- return t("div", [t(i, { attrs: { label: "最小值" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最小值", max: e.data.max - 1, min: 0 }, model: { value: e.data.min, callback: function(a) {
905
- e.$set(e.data, "min", a);
906
- }, expression: "data.min" } })], 1), t(i, { attrs: { label: "最大值" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "最大值", min: e.data.min + 1 }, model: { value: e.data.max, callback: function(a) {
907
- e.$set(e.data, "max", a);
908
- }, expression: "data.max" } })], 1), t(i, { attrs: { label: "步长" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "步长", min: 1, max: e.data.max - e.data.min }, model: { value: e.data.step, callback: function(a) {
909
- e.$set(e.data, "step", a);
910
- }, expression: "data.step" } })], 1), t(i, { attrs: { label: "显示间隔点", "label-width": "100px" } }, [t(c, { model: { value: e.data.showStops, callback: function(a) {
911
- e.$set(e.data, "showStops", a);
912
- }, expression: "data.showStops" } })], 1), t(i, { attrs: { label: "显示输入框", "label-width": "100px" } }, [t(c, { model: { value: e.data.showInput, callback: function(a) {
913
- e.$set(e.data, "showInput", a);
914
- }, expression: "data.showInput" } })], 1), t(i, { attrs: { label: "范围" } }, [t(c, { model: { value: e.data.range, callback: function(a) {
915
- e.$set(e.data, "range", a);
916
- }, expression: "data.range" } })], 1)], 1);
917
- }, it = [], nt = /* @__PURE__ */ h(
918
- lt,
919
- st,
920
- it,
921
- !1,
922
- null,
923
- null
924
- );
925
- const ot = nt.exports, rt = {
926
- name: "ConfigColor",
927
- props: {
928
- data: Object
929
- }
930
- };
931
- var ct = function() {
932
- var e = this, t = e._self._c;
933
- return t("div", [t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
934
- e.$set(e.data, "placeholder", a);
935
- }, expression: "data.placeholder" } })], 1)], 1);
936
- }, dt = [], pt = /* @__PURE__ */ h(
937
- rt,
938
- ct,
939
- dt,
940
- !1,
941
- null,
942
- null
943
- );
944
- const ut = pt.exports, mt = {
945
- name: "ConfigSelect",
946
- components: { Draggable: S, MonacoEditor: g },
947
- props: {
948
- data: Object
949
- },
950
- data() {
951
- return {
952
- option: {
953
- column: [
954
- {
955
- type: "input",
956
- prop: "key",
957
- label: "key"
958
- },
959
- {
960
- type: "input",
961
- prop: "value",
962
- label: "value"
963
- }
964
- ]
965
- },
966
- options: {
967
- fullScreen: !0,
968
- minimap: {
969
- enabled: !1
970
- }
971
- },
972
- dicFormatter: ""
973
- };
974
- },
975
- watch: {
976
- "data.prop": {
977
- handler() {
978
- const { dicFormatter: l } = this.data;
979
- this.dicFormatter = l ? `${l}` : `(res) => {\r
980
- return res.data\r
981
- }`;
982
- },
983
- immediate: !0
984
- },
985
- dicFormatter: {
986
- handler(l) {
987
- try {
988
- this.data.dicFormatter = y(l);
989
- } catch {
990
- }
991
- }
992
- }
993
- },
994
- methods: {
995
- handleRemoveFields(l) {
996
- this.data.dicData.splice(l, 1);
997
- },
998
- handleAddFields() {
999
- const l = Math.ceil(Math.random() * 99999);
1000
- this.data.dicData.push({ label: `字段${l}`, value: `col_${l}` });
1001
- },
1002
- handleRemoveCascaderItemFields(l) {
1003
- this.data.cascader.splice(l, 1);
1004
- },
1005
- handleAddCascaderItemFields() {
1006
- this.data.cascader || (this.$set(this.data, "cascader", []), delete this.data.cascaderItem), this.data.cascader.push("");
1007
- },
1008
- handleTabClick({ name: l }) {
1009
- l === "remote" && !this.data.dicQueryConfig && (this.data.dicQueryConfig = []);
1010
- }
1011
- }
1012
- };
1013
- var ht = function() {
1014
- var e = this, t = e._self._c;
1015
- return t("div", [e.data.type === "select" ? t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
1016
- e.$set(e.data, "placeholder", a);
1017
- }, expression: "data.placeholder" } })], 1) : e._e(), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("字典配置:")]), t("div", { staticClass: "el-form-item__content" }, [t(Q, { attrs: { stretch: "" }, on: { "tab-click": e.handleTabClick }, model: { value: e.data.dicOption, callback: function(a) {
1018
- e.$set(e.data, "dicOption", a);
1019
- }, expression: "data.dicOption" } }, [t(F, { attrs: { label: "静态数据", name: "static" } }, [t("Draggable", { attrs: { tag: "ul", list: e.data.dicData, group: { name: "dic" }, "ghost-class": "ghost", handle: ".drag-item" } }, e._l(e.data.dicData, function(a, s) {
1020
- return t("li", { key: s }, [t("i", { staticClass: "drag-item el-icon-s-operation", staticStyle: { margin: "0 5px", "font-size": "16px", cursor: "move" } }), t(r, { staticStyle: { "margin-right": "5px" }, attrs: { size: "mini", clearable: "", placeholder: "label" }, model: { value: a.label, callback: function(n) {
1021
- e.$set(a, "label", n);
1022
- }, expression: "item.label" } }), t(r, { style: { "margin-right": e.data.type === "select" ? "5px" : "0" }, attrs: { size: "mini", clearable: "", placeholder: "value" }, model: { value: a.value, callback: function(n) {
1023
- e.$set(a, "value", n);
1024
- }, expression: "item.value" } }), e.data.type === "select" ? t(r, { attrs: { size: "mini", clearable: "", placeholder: "描述" }, model: { value: a.desc, callback: function(n) {
1025
- e.$set(a, "desc", n);
1026
- }, expression: "item.desc" } }) : e._e(), t(p, { staticStyle: { "margin-left": "5px", padding: "4px" }, attrs: { circle: "", plain: "", type: "danger", size: "mini", icon: "el-icon-minus" }, on: { click: function(n) {
1027
- return e.handleRemoveFields(s);
1028
- } } })], 1);
1029
- }), 0), t("div", { staticStyle: { "margin-left": "22px" } }, [t(p, { attrs: { type: "text" }, on: { click: e.handleAddFields } }, [e._v(" 添加列 ")])], 1)], 1), t(F, { attrs: { label: "远端数据", name: "remote" } }, [e._v(" 网址 "), t(r, { attrs: { size: "small", placeholder: "远端数据字典网址" }, model: { value: e.data.dicUrl, callback: function(a) {
1030
- e.$set(e.data, "dicUrl", a);
1031
- }, expression: "data.dicUrl" } }), e._v(" 远程搜索 "), t(c, { model: { value: e.data.remote, callback: function(a) {
1032
- e.$set(e.data, "remote", a);
1033
- }, expression: "data.remote" } }), t("br"), e._v(" 请求方法 "), t(b, { staticStyle: { width: "100%" }, attrs: { placeholder: "请求方法", size: "small" }, model: { value: e.data.dicMethod, callback: function(a) {
1034
- e.$set(e.data, "dicMethod", a);
1035
- }, expression: "data.dicMethod" } }, [t(d, { attrs: { label: "POST", value: "post" } }), t(d, { attrs: { label: "GET", value: "get" } })], 1), e.data.dicMethod === "post" ? t("p", [e._v(" 请求参数 "), t(z, { attrs: { children: e.option }, model: { value: e.data.dicQueryConfig, callback: function(a) {
1036
- e.$set(e.data, "dicQueryConfig", a);
1037
- }, expression: "data.dicQueryConfig" } })], 1) : e._e(), e.data.dicUrl ? t("p", [e._v(" 返回结构 "), t(g, { attrs: { height: "80", "key-index": `dict-formatter-${e.data.prop}`, options: e.options }, model: { value: e.dicFormatter, callback: function(a) {
1038
- e.dicFormatter = a;
1039
- }, expression: "dicFormatter" } })], 1) : e._e()], 1)], 1)], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("字典key配置:")]), t("div", { staticClass: "el-form-item__content" }, [t("ul", e._l(e.data.props, function(a, s) {
1040
- return t("li", { key: s }, [t("span", { staticStyle: { width: "50px" } }, [e._v(e._s(s))]), t(r, { attrs: { size: "mini", clearable: "", placeholder: "key配置" }, model: { value: e.data.props[s], callback: function(n) {
1041
- e.$set(e.data.props, s, n);
1042
- }, expression: "data.props[key]" } })], 1);
1043
- }), 0)])]), e.data.dicOption === "remote" ? t(i, { attrs: { label: "重新请求字典(crud)", "label-width": "150px" } }, [t(c, { model: { value: e.data.dicFlag, callback: function(a) {
1044
- e.$set(e.data, "dicFlag", a);
1045
- }, expression: "data.dicFlag" } })], 1) : e._e(), e.data.type === "select" ? [t(i, { attrs: { label: "是否多选" } }, [t(c, { model: { value: e.data.multiple, callback: function(a) {
1046
- e.$set(e.data, "multiple", a);
1047
- }, expression: "data.multiple" } })], 1), e.data.multiple ? t(i, { attrs: { label: "是否可拖拽", "label-width": "110px" }, scopedSlots: e._u([{ key: "label", fn: function() {
1048
- return [t($, { attrs: { underline: !1, href: "https://avuejs.com/form/form-select.html#%E6%8B%96%E6%8B%BD", target: "_blank" } }, [e._v(" 是否可拖拽 "), t("i", { staticClass: "el-icon-question" })])];
1049
- }, proxy: !0 }], null, !1, 2120444940) }, [t(c, { model: { value: e.data.drag, callback: function(a) {
1050
- e.$set(e.data, "drag", a);
1051
- }, expression: "data.drag" } })], 1) : e._e(), e.data.multiple ? t(i, { attrs: { label: "多选数量限制", "label-width": "110px" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "多选限制", min: 0, max: e.data.dicData.length }, model: { value: e.data.limit, callback: function(a) {
1052
- e.$set(e.data, "limit", a);
1053
- }, expression: "data.limit" } })], 1) : e._e(), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("级联配置:")]), t("div", { staticClass: "el-form-item__content" }, [t("Draggable", { attrs: { tag: "ul", list: e.data.cascaderItem || e.data.cascader, group: { name: "cascaderItem" }, "ghost-class": "ghost", handle: ".drag-item" } }, e._l(e.data.cascaderItem || e.data.cascader, function(a, s) {
1054
- return t("li", { key: s }, [t("i", { staticClass: "drag-item el-icon-s-operation", staticStyle: { margin: "0 5px", "font-size": "16px", cursor: "move" } }), t(r, { attrs: { size: "mini", clearable: "", placeholder: "级联属性值" }, model: { value: e.data.cascader[s], callback: function(n) {
1055
- e.$set(e.data.cascader, s, n);
1056
- }, expression: "data.cascader[index]" } }), t(p, { staticStyle: { "margin-left": "5px", padding: "4px" }, attrs: { circle: "", plain: "", type: "danger", size: "mini", icon: "el-icon-minus" }, on: { click: function(n) {
1057
- return e.handleRemoveCascaderItemFields(s);
1058
- } } })], 1);
1059
- }), 0), t("div", { staticStyle: { "margin-left": "22px" } }, [t(p, { attrs: { type: "text" }, on: { click: e.handleAddCascaderItemFields } }, [e._v(" 添加列 ")])], 1)], 1)]), (e.data.cascaderItem || e.data.cascader) && (e.data.cascaderItem || e.data.cascader).length > 0 ? t(i, { attrs: { label: "级联默认选中", "label-width": "110px" } }, [t(f, { attrs: { "controls-position": "right", placeholder: "级联默认选中", min: 0 }, model: { value: e.data.cascaderIndex, callback: function(a) {
1060
- e.$set(e.data, "cascaderIndex", a);
1061
- }, expression: "data.cascaderIndex" } })], 1) : e._e(), t(i, { attrs: { label: "是否可清空", "label-width": "110px" } }, [t(c, { model: { value: e.data.clearable, callback: function(a) {
1062
- e.$set(e.data, "clearable", a);
1063
- }, expression: "data.clearable" } })], 1), t(i, { attrs: { label: "是否可搜索", "label-width": "110px" } }, [t(c, { model: { value: e.data.filterable, callback: function(a) {
1064
- e.$set(e.data, "filterable", a);
1065
- }, expression: "data.filterable" } })], 1)] : e._e(), ["radio", "checkbox"].includes(e.data.type) ? [e.data.button ? e._e() : t(i, { attrs: { label: "边框" } }, [t(c, { model: { value: e.data.border, callback: function(a) {
1066
- e.$set(e.data, "border", a);
1067
- }, expression: "data.border" } })], 1), e.data.border ? e._e() : t(i, { attrs: { label: "按钮" } }, [t(c, { model: { value: e.data.button, callback: function(a) {
1068
- e.$set(e.data, "button", a);
1069
- }, expression: "data.button" } })], 1)] : e._e(), e.data.border || e.data.button ? t(i, { attrs: { label: "尺寸" } }, [t(M, { attrs: { size: "mini" }, model: { value: e.data.size, callback: function(a) {
1070
- e.$set(e.data, "size", a);
1071
- }, expression: "data.size" } }, [t(A, { attrs: { label: "medium" } }, [e._v(" 正常 ")]), t(A, { attrs: { label: "small" } }, [e._v(" 小 ")]), t(A, { attrs: { label: "mini" } }, [e._v(" 超小 ")])], 1)], 1) : e._e()], 2);
1072
- }, ft = [], bt = /* @__PURE__ */ h(
1073
- mt,
1074
- ht,
1075
- ft,
1076
- !1,
1077
- null,
1078
- null
1079
- );
1080
- const gt = bt.exports, vt = {
1081
- name: "ConfigTree",
1082
- components: { MonacoEditor: g, Draggable: S },
1083
- props: {
1084
- data: Object
1085
- },
1086
- data() {
1087
- return {
1088
- dialogForm: {},
1089
- dialogVisible: !1,
1090
- dialogRules: {
1091
- label: { required: !0, message: "请输入label" },
1092
- value: { required: !0, message: "请输入value" }
1093
- },
1094
- dialogStatus: "add",
1095
- selectData: void 0,
1096
- dialogInputType: "text",
1097
- option: {
1098
- column: [
1099
- {
1100
- type: "input",
1101
- prop: "key",
1102
- label: "key"
1103
- },
1104
- {
1105
- type: "input",
1106
- prop: "value",
1107
- label: "value"
1108
- }
1109
- ]
1110
- },
1111
- options: {
1112
- fullScreen: !0,
1113
- minimap: {
1114
- enabled: !1
1115
- }
1116
- },
1117
- dicFormatter: ""
1118
- };
1119
- },
1120
- watch: {
1121
- "data.prop": {
1122
- handler() {
1123
- this.$set(this.data, "cascader", this.data.cascaderItem), this.$delete(this.data, "cascaderItem");
1124
- const { dicFormatter: l } = this.data;
1125
- this.dicFormatter = l ? `${l}` : `(res) => {\r
1126
- return res.data\r
1127
- }`;
1128
- },
1129
- immediate: !0
1130
- },
1131
- dicFormatter: {
1132
- handler(l) {
1133
- try {
1134
- this.data.dicFormatter = y(l);
1135
- } catch {
1136
- }
1137
- }
1138
- }
1139
- },
1140
- methods: {
1141
- handleRemoveCascaderItemFields(l) {
1142
- this.data.cascader.splice(l, 1);
1143
- },
1144
- handleAddCascaderItemFields() {
1145
- this.data.cascader || (this.$set(this.data, "cascader", []), delete this.data.cascaderItem), this.data.cascader.push("");
1146
- },
1147
- handleTabClick({ name: l }) {
1148
- l === "remote" && !this.data.dicQueryConfig && (this.data.dicQueryConfig = []);
1149
- },
1150
- handleParentNodeAdd() {
1151
- this.selectData = void 0, this.dialogStatus = "add", this.dialogVisible = !0;
1152
- },
1153
- handleNodeAdd(l) {
1154
- this.selectData = l, this.dialogStatus = "add", this.dialogVisible = !0;
1155
- },
1156
- handleNodeRemove(l, e) {
1157
- const t = l.parent, a = t.data.children || t.data, s = a.findIndex((n) => n.id === e.id);
1158
- a.splice(s, 1);
1159
- },
1160
- handleDialogAdd() {
1161
- this.$refs.dialogForm.validate((l) => {
1162
- if (l) {
1163
- const { label: e, value: t } = this.dialogForm;
1164
- if (this.$refs.tree.getNode(t)) this.$message.error("value重复");
1165
- else {
1166
- const s = this.selectData, n = {
1167
- label: e,
1168
- value: this.dialogInputType === "number" ? Number(t) : t
1169
- };
1170
- s ? (s.children || this.$set(s, "children", []), s.children.push(n)) : this.$set(this.data.dicData, this.data.dicData.length, n), this.beforeClose();
1171
- }
1172
- }
1173
- });
1174
- },
1175
- beforeClose() {
1176
- this.$refs.dialogForm.clearValidate(), this.dialogForm = {}, this.dialogVisible = !1;
1177
- }
1178
- }
1179
- };
1180
- var _t = function() {
1181
- var e = this, t = e._self._c;
1182
- return t("div", [t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
1183
- e.$set(e.data, "placeholder", a);
1184
- }, expression: "data.placeholder" } })], 1), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("字典配置:")]), t("div", { staticClass: "el-form-item__content" }, [t(Q, { attrs: { stretch: "" }, on: { "tab-click": e.handleTabClick }, model: { value: e.data.dicOption, callback: function(a) {
1185
- e.$set(e.data, "dicOption", a);
1186
- }, expression: "data.dicOption" } }, [t(F, { attrs: { label: "静态数据", name: "static" } }, [t(oe, { ref: "tree", attrs: { data: e.data.dicData, "default-expand-all": "", draggable: "", "node-key": "value", "expand-on-click-node": !1 }, scopedSlots: e._u([{ key: "default", fn: function({ node: a, data: s }) {
1187
- return [t("span", { staticClass: "custom-tree-node" }, [t("span", [e._v(e._s(a.label))]), t("span", [t(p, { attrs: { type: "text", size: "mini", icon: "el-icon-plus" }, on: { click: function(n) {
1188
- return e.handleNodeAdd(s);
1189
- } } }), t(p, { staticClass: "danger", attrs: { type: "text", size: "mini", icon: "el-icon-delete" }, on: { click: function(n) {
1190
- return e.handleNodeRemove(a, s);
1191
- } } })], 1)])];
1192
- } }]) }), t("div", { staticStyle: { "margin-left": "22px" } }, [t(p, { attrs: { type: "text" }, on: { click: e.handleParentNodeAdd } }, [e._v(" 添加父级 ")])], 1)], 1), t(F, { attrs: { label: "远端数据", name: "remote" } }, [e._v(" 网址 "), t(r, { attrs: { size: "small", placeholder: "远端数据字典网址" }, model: { value: e.data.dicUrl, callback: function(a) {
1193
- e.$set(e.data, "dicUrl", a);
1194
- }, expression: "data.dicUrl" } }), e._v(" 远程搜索 "), t(c, { model: { value: e.data.remote, callback: function(a) {
1195
- e.$set(e.data, "remote", a);
1196
- }, expression: "data.remote" } }), t("br"), e._v(" 请求方法 "), t(b, { staticStyle: { width: "100%" }, attrs: { size: "small", placeholder: "请求方法" }, model: { value: e.data.dicMethod, callback: function(a) {
1197
- e.$set(e.data, "dicMethod", a);
1198
- }, expression: "data.dicMethod" } }, [t(d, { attrs: { label: "POST", value: "post" } }), t(d, { attrs: { label: "GET", value: "get" } })], 1), e.data.dicMethod === "post" ? t("p", [e._v(" 请求参数 "), t(z, { attrs: { children: e.option }, model: { value: e.data.dicQueryConfig, callback: function(a) {
1199
- e.$set(e.data, "dicQueryConfig", a);
1200
- }, expression: "data.dicQueryConfig" } })], 1) : e._e(), e.data.dicUrl ? t("p", [e._v(" 返回结构 "), t(g, { attrs: { height: "80", "key-index": `dict-formatter-${e.data.prop}`, options: e.options }, model: { value: e.dicFormatter, callback: function(a) {
1201
- e.dicFormatter = a;
1202
- }, expression: "dicFormatter" } })], 1) : e._e()], 1)], 1)], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("字典key配置:")]), t("div", { staticClass: "el-form-item__content" }, [t("ul", e._l(e.data.props, function(a, s) {
1203
- return t("li", { key: s }, [t("span", { staticStyle: { width: "50px" } }, [e._v(e._s(s))]), t(r, { attrs: { size: "mini", placeholder: "key配置" }, model: { value: e.data.props[s], callback: function(n) {
1204
- e.$set(e.data.props, s, n);
1205
- }, expression: "data.props[key]" } })], 1);
1206
- }), 0)])]), e.data.dicOption === "remote" ? t(i, { attrs: { label: "重新请求字典(crud)" } }, [t(c, { model: { value: e.data.dicFlag, callback: function(a) {
1207
- e.$set(e.data, "dicFlag", a);
1208
- }, expression: "data.dicFlag" } })], 1) : e._e(), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("级联配置:")]), t("div", { staticClass: "el-form-item__content" }, [t("Draggable", { attrs: { tag: "ul", list: e.data.cascaderItem || e.data.cascader, group: { name: "cascaderItem" }, "ghost-class": "ghost", handle: ".drag-item" } }, e._l(e.data.cascaderItem || e.data.cascader, function(a, s) {
1209
- return t("li", { key: s }, [t("i", { staticClass: "drag-item el-icon-s-operation", staticStyle: { margin: "0 5px", "font-size": "16px", cursor: "move" } }), t(r, { attrs: { size: "mini", clearable: "", placeholder: "级联属性值" }, model: { value: e.data.cascader[s], callback: function(n) {
1210
- e.$set(e.data.cascader, s, n);
1211
- }, expression: "data.cascader[index]" } }), t(p, { staticStyle: { "margin-left": "5px", padding: "4px" }, attrs: { circle: "", plain: "", type: "danger", size: "mini", icon: "el-icon-minus" }, on: { click: function(n) {
1212
- return e.handleRemoveCascaderItemFields(s);
1213
- } } })], 1);
1214
- }), 0), t("div", { staticStyle: { "margin-left": "22px" } }, [t(p, { attrs: { type: "text" }, on: { click: e.handleAddCascaderItemFields } }, [e._v(" 添加列 ")])], 1)], 1)]), e.data.type === "tree" ? [t(i, { attrs: { label: "当有子级时,是否可选择父级", "label-width": "200px" } }, [t(c, { model: { value: e.data.parent, callback: function(a) {
1215
- e.$set(e.data, "parent", a);
1216
- }, expression: "data.parent" } })], 1)] : e._e(), e.data.type === "cascader" ? [t(i, { attrs: { label: "选项分隔符", "label-width": "100px" } }, [t(r, { attrs: { clearable: "", placeholder: "选项分隔符" }, model: { value: e.data.separator, callback: function(a) {
1217
- e.$set(e.data, "separator", a);
1218
- }, expression: "data.separator" } })], 1), t(i, { attrs: { label: "是否显示选中值的完整路径", "label-width": "200px" } }, [t(c, { model: { value: e.data.showAllLevels, callback: function(a) {
1219
- e.$set(e.data, "showAllLevels", a);
1220
- }, expression: "data.showAllLevels" } })], 1), t(i, { attrs: { label: "是否可搜索", "label-width": "100px" } }, [t(c, { model: { value: e.data.filterable, callback: function(a) {
1221
- e.$set(e.data, "filterable", a);
1222
- }, expression: "data.filterable" } })], 1)] : e._e(), t(i, { attrs: { label: "是否多选" } }, [t(c, { model: { value: e.data.multiple, callback: function(a) {
1223
- e.$set(e.data, "multiple", a);
1224
- }, expression: "data.multiple" } })], 1), e.data.type === "tree" && e.data.multiple ? t(i, { attrs: { label: "勾选时,父子不关联", "label-width": "160px" } }, [t(c, { model: { value: e.data.checkStrictly, callback: function(a) {
1225
- e.$set(e.data, "checkStrictly", a);
1226
- }, expression: "data.checkStrictly" } })], 1) : e._e(), t(ne, { attrs: { visible: e.dialogVisible, rules: e.dialogRules, "before-close": e.beforeClose }, on: { "update:visible": function(a) {
1227
- e.dialogVisible = a;
1228
- } }, scopedSlots: e._u([{ key: "footer", fn: function() {
1229
- return [t(p, { on: { click: function(a) {
1230
- e.dialogVisible = !1;
1231
- } } }, [e._v(" 取 消 ")]), e.dialogStatus === "add" ? t(p, { attrs: { type: "primary" }, on: { click: e.handleDialogAdd } }, [e._v(" 确 定 ")]) : e._e()];
1232
- }, proxy: !0 }]) }, [t(I, { ref: "dialogForm", attrs: { model: e.dialogForm, "label-width": "80px" } }, [t(i, { attrs: { label: "label" } }, [t(r, { attrs: { placeholder: "label" }, model: { value: e.dialogForm.label, callback: function(a) {
1233
- e.$set(e.dialogForm, "label", a);
1234
- }, expression: "dialogForm.label" } })], 1), t(i, { attrs: { label: "value" } }, [t(r, { attrs: { placeholder: "value", type: e.dialogInputType }, scopedSlots: e._u([{ key: "append", fn: function() {
1235
- return [t(b, { staticStyle: { width: "100px" }, attrs: { placeholder: "数据类型" }, model: { value: e.dialogInputType, callback: function(a) {
1236
- e.dialogInputType = a;
1237
- }, expression: "dialogInputType" } }, [t(d, { attrs: { label: "String", value: "text" } }), t(d, { attrs: { label: "Number", value: "number" } })], 1)];
1238
- }, proxy: !0 }]), model: { value: e.dialogForm.value, callback: function(a) {
1239
- e.$set(e.dialogForm, "value", a);
1240
- }, expression: "dialogForm.value" } })], 1)], 1)], 1)], 2);
1241
- }, yt = [], xt = /* @__PURE__ */ h(
1242
- vt,
1243
- _t,
1244
- yt,
1245
- !1,
1246
- null,
1247
- "8d588d56"
1248
- );
1249
- const $t = xt.exports, kt = {
1250
- name: "ConfigDate",
1251
- props: {
1252
- data: Object
1253
- }
1254
- };
1255
- var Ct = function() {
1256
- var e = this, t = e._self._c;
1257
- return t("div", [e.data.type.indexOf("range") !== -1 ? [t(i, { attrs: { label: "开始占位内容", "label-width": "110px" } }, [t(r, { attrs: { clearable: "", placeholder: "开始占位内容" }, model: { value: e.data.startPlaceholder, callback: function(a) {
1258
- e.$set(e.data, "startPlaceholder", a);
1259
- }, expression: "data.startPlaceholder" } })], 1), t(i, { attrs: { label: "结束占位内容", "label-width": "110px" } }, [t(r, { attrs: { clearable: "", placeholder: "结束占位内容" }, model: { value: e.data.endPlaceholder, callback: function(a) {
1260
- e.$set(e.data, "endPlaceholder", a);
1261
- }, expression: "data.endPlaceholder" } })], 1)] : t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
1262
- e.$set(e.data, "placeholder", a);
1263
- }, expression: "data.placeholder" } })], 1), t(i, { attrs: { label: "显示格式化", "label-width": "100px" } }, [t(r, { attrs: { clearable: "", placeholder: "显示格式化" }, model: { value: e.data.format, callback: function(a) {
1264
- e.$set(e.data, "format", a);
1265
- }, expression: "data.format" } })], 1), t(i, { attrs: { label: "值格式化" } }, [t(r, { attrs: { clearable: "", placeholder: "值格式化" }, model: { value: e.data.valueFormat, callback: function(a) {
1266
- e.$set(e.data, "valueFormat", a);
1267
- }, expression: "data.valueFormat" } })], 1), ["timerange", "daterange", "datetimerange"].includes(e.data.type) ? t(i, { attrs: { label: "取消范围联动", "label-width": "110px" } }, [t(c, { model: { value: e.data.unlinkPanels, callback: function(a) {
1268
- e.$set(e.data, "unlinkPanels", a);
1269
- }, expression: "data.unlinkPanels" } })], 1) : e._e()], 2);
1270
- }, wt = [], At = /* @__PURE__ */ h(
1271
- kt,
1272
- Ct,
1273
- wt,
1274
- !1,
1275
- null,
1276
- null
1277
- );
1278
- const Ft = At.exports, St = {
1279
- name: "ConfigUpload",
1280
- props: {
1281
- data: Object
1282
- },
1283
- data() {
1284
- return {
1285
- option: {
1286
- column: [
1287
- {
1288
- type: "input",
1289
- prop: "key",
1290
- label: "key"
1291
- },
1292
- {
1293
- type: "input",
1294
- prop: "value",
1295
- label: "value"
1296
- }
1297
- ]
1298
- }
1299
- };
1300
- },
1301
- watch: {
1302
- "data.prop": {
1303
- handler() {
1304
- },
1305
- immediate: !0
1306
- },
1307
- "data.drag"() {
1308
- },
1309
- "data.dragFile"(l) {
1310
- l && this.$delete(this.data, "listType");
1311
- },
1312
- "data.showCanvas"(l) {
1313
- l ? (this.$set(this.data, "canvasOption", {}), this.$set(this.data, "accept", "image/*")) : this.$delete(this.data, "canvasOption");
1314
- }
1315
- }
1316
- };
1317
- var Ot = function() {
1318
- var e = this, t = e._self._c;
1319
- return t("div", [e.data.oss ? e._e() : t(i, { attrs: { label: "上传地址" } }, [t(r, { attrs: { clearable: "", placeholder: "上传地址" }, model: { value: e.data.action, callback: function(a) {
1320
- e.$set(e.data, "action", a);
1321
- }, expression: "data.action" } })], 1), e.data.oss ? e._e() : t(i, { attrs: { label: "接受文件类型", "label-width": "110px" } }, [t(r, { attrs: { clearable: "", placeholder: "接受文件类型,如:image/png,image/jpg" }, model: { value: e.data.accept, callback: function(a) {
1322
- e.$set(e.data, "accept", a);
1323
- }, expression: "data.accept" } })], 1), t(i, { attrs: { label: "OSS" }, scopedSlots: e._u([{ key: "label", fn: function() {
1324
- return [t($, { attrs: { underline: !1, href: "https://avuejs.com/form/form-upload.html#%E9%98%BF%E9%87%8C%E4%BA%91oss%E4%B8%8A%E4%BC%A0", target: "_blank" } }, [e._v(" OSS "), t("i", { staticClass: "el-icon-question" })])];
1325
- }, proxy: !0 }]) }, [t(b, { staticStyle: { width: "100%" }, attrs: { placeholder: "oss不写则为普通上传", clearable: "" }, model: { value: e.data.oss, callback: function(a) {
1326
- e.$set(e.data, "oss", a);
1327
- }, expression: "data.oss" } }, [t(d, { attrs: { label: "阿里", value: "ali" } }), t(d, { attrs: { label: "七牛", value: "qiniu" } })], 1)], 1), t(i, { attrs: { label: "拖拽上传", "label-width": "110px" } }, [t(c, { model: { value: e.data.dragFile, callback: function(a) {
1328
- e.$set(e.data, "dragFile", a);
1329
- }, expression: "data.dragFile" } })], 1), e.data.dragFile ? e._e() : t(i, { attrs: { label: "文件列表类型", "label-width": "110px" } }, [t(b, { attrs: { placeholder: "文件列表类型", clearable: "" }, model: { value: e.data.listType, callback: function(a) {
1330
- e.$set(e.data, "listType", a);
1331
- }, expression: "data.listType" } }, [t(d, { attrs: { label: "附件", value: "text" } }), t(d, { attrs: { label: "照片墙", value: "picture-card" } }), t(d, { attrs: { label: "头像", value: "picture-img" } }), t(d, { attrs: { label: "缩略图", value: "picture" } })], 1)], 1), t(i, { attrs: { label: "拖拽排序", "label-width": "110px" } }, [t(c, { model: { value: e.data.drag, callback: function(a) {
1332
- e.$set(e.data, "drag", a);
1333
- }, expression: "data.drag" } })], 1), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("参数设置:")]), t("div", { staticClass: "el-form-item__content" }, [e._v(" 请求头 "), t(z, { attrs: { children: e.option }, model: { value: e.data.headersConfig, callback: function(a) {
1334
- e.$set(e.data, "headersConfig", a);
1335
- }, expression: "data.headersConfig" } }), e._v(" 请求体 "), t(z, { attrs: { children: e.option }, model: { value: e.data.dataConfig, callback: function(a) {
1336
- e.$set(e.data, "dataConfig", a);
1337
- }, expression: "data.dataConfig" } })], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [t($, { attrs: { underline: !1, href: "https://avuejs.com/form/form-upload.html", target: "_blank" } }, [e._v("上传参数设置 "), t("i", { staticClass: "el-icon-question" })])], 1), t("div", { staticClass: "el-form-item__content" }, [e._v(" 上传成功返回结构体的图片地址 "), t(r, { attrs: { size: "small", placeholder: "上传成功返回结构体的图片地址" }, model: { value: e.data.propsHttp.url, callback: function(a) {
1338
- e.$set(e.data.propsHttp, "url", a);
1339
- }, expression: "data.propsHttp.url" } }), e._v(" 上传成功返回结构体的图片的姓名 "), t(r, { attrs: { size: "small", placeholder: "上传成功返回结构体的图片的姓名" }, model: { value: e.data.propsHttp.name, callback: function(a) {
1340
- e.$set(e.data.propsHttp, "name", a);
1341
- }, expression: "data.propsHttp.name" } }), e._v(" 返回结构体的层次 "), t(r, { attrs: { size: "small", placeholder: "返回结构体的层次" }, model: { value: e.data.propsHttp.res, callback: function(a) {
1342
- e.$set(e.data.propsHttp, "res", a);
1343
- }, expression: "data.propsHttp.res" } }), e._v(" 文件名称 "), t(r, { attrs: { size: "small", placeholder: "文件名称,默认file" }, model: { value: e.data.propsHttp.fileName, callback: function(a) {
1344
- e.$set(e.data.propsHttp, "fileName", a);
1345
- }, expression: "data.propsHttp.fileName" } })], 1)]), t(i, { attrs: { label: "是否显示已上传文件列表", "label-width": "180px" } }, [t(c, { model: { value: e.data.showFileList, callback: function(a) {
1346
- e.$set(e.data, "showFileList", a);
1347
- }, expression: "data.showFileList" } })], 1), t(i, { attrs: { label: "文件大小" } }, [t(f, { staticStyle: { width: "100%" }, attrs: { "controls-position": "right", placeholder: "文件大小限制(字节)", min: 0 }, model: { value: e.data.fileSize, callback: function(a) {
1348
- e.$set(e.data, "fileSize", a);
1349
- }, expression: "data.fileSize" } })], 1), t(i, { attrs: { label: "上传限制提示", "label-width": "110px" } }, [t(r, { attrs: { clearable: "", placeholder: "上传限制提示" }, model: { value: e.data.tip, callback: function(a) {
1350
- e.$set(e.data, "tip", a);
1351
- }, expression: "data.tip" } })], 1), t(i, { attrs: { label: "上传中提示", "label-width": "110px" } }, [t(r, { attrs: { clearable: "", placeholder: "上传中提示" }, model: { value: e.data.loadText, callback: function(a) {
1352
- e.$set(e.data, "loadText", a);
1353
- }, expression: "data.loadText" } })], 1), t(i, { attrs: { label: "是否多文件上传", "label-width": "130px" } }, [t(c, { model: { value: e.data.multiple, callback: function(a) {
1354
- e.$set(e.data, "multiple", a);
1355
- }, expression: "data.multiple" } })], 1), e.data.multiple ? t(i, { attrs: { label: "多文件数量限制", "label-width": "130px" } }, [t(f, { staticStyle: { width: "100%" }, attrs: { "controls-position": "right", placeholder: "多文件上传数量限制", min: 1 }, model: { value: e.data.limit, callback: function(a) {
1356
- e.$set(e.data, "limit", a);
1357
- }, expression: "data.limit" } })], 1) : e._e(), t(i, { attrs: { label: "水印配置,开启后只能上传图片", "label-width": "230px" } }, [t(c, { model: { value: e.data.showCanvas, callback: function(a) {
1358
- e.$set(e.data, "showCanvas", a);
1359
- }, expression: "data.showCanvas" } })], 1), e.data.canvasOption ? t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("水印设置:")]), t("div", { staticClass: "el-form-item__content" }, [e._v(" 水印文字 "), t(r, { attrs: { size: "small", clearable: "", placeholder: "水印文字" }, model: { value: e.data.canvasOption.text, callback: function(a) {
1360
- e.$set(e.data.canvasOption, "text", a);
1361
- }, expression: "data.canvasOption.text" } }), e._v(" 字体类型 "), t(r, { attrs: { size: "small", clearable: "", placeholder: "字体类型" }, model: { value: e.data.canvasOption.fontFamily, callback: function(a) {
1362
- e.$set(e.data.canvasOption, "fontFamily", a);
1363
- }, expression: "data.canvasOption.fontFamily" } }), e._v(" 字体颜色 "), t(re, { attrs: { size: "small", placeholder: "字体颜色" }, model: { value: e.data.canvasOption.color, callback: function(a) {
1364
- e.$set(e.data.canvasOption, "color", a);
1365
- }, expression: "data.canvasOption.color" } }), e._v(" 字体大小 "), t(f, { attrs: { size: "small", "controls-position": "right", placeholder: "字体大小" }, model: { value: e.data.canvasOption.fontSize, callback: function(a) {
1366
- e.$set(e.data.canvasOption, "fontSize", a);
1367
- }, expression: "data.canvasOption.fontSize" } }), e._v(" 文字的透明度 "), t(f, { attrs: { size: "small", "controls-position": "right", placeholder: "文字的透明度", step: 10, min: 10, max: 100 }, model: { value: e.data.canvasOption.opacity, callback: function(a) {
1368
- e.$set(e.data.canvasOption, "opacity", a);
1369
- }, expression: "data.canvasOption.opacity" } }), e._v(" 文字距离图片底部的距离"), t("br"), t(f, { attrs: { "controls-position": "right", placeholder: "文字距离图片底部的距离", size: "small" }, model: { value: e.data.canvasOption.bottom, callback: function(a) {
1370
- e.$set(e.data.canvasOption, "bottom", a);
1371
- }, expression: "data.canvasOption.bottom" } }), e._v(" 文字距离图片右边的距离"), t("br"), t(f, { attrs: { "controls-position": "right", placeholder: "文字距离图片右边的距离", size: "small" }, model: { value: e.data.canvasOption.right, callback: function(a) {
1372
- e.$set(e.data.canvasOption, "right", a);
1373
- }, expression: "data.canvasOption.right" } }), e._v(" 压缩图片比率"), t("br"), t(f, { attrs: { "controls-position": "right", placeholder: "压缩图片比率", step: 0.1, min: 0, max: 1, size: "small" }, model: { value: e.data.canvasOption.ratio, callback: function(a) {
1374
- e.$set(e.data.canvasOption, "ratio", a);
1375
- }, expression: "data.canvasOption.ratio" } })], 1)]) : e._e()], 1);
1376
- }, Wt = [], It = /* @__PURE__ */ h(
1377
- St,
1378
- Ot,
1379
- Wt,
1380
- !1,
1381
- null,
1382
- null
1383
- );
1384
- const Et = It.exports, Bt = {
1385
- name: "ConfigUEditor",
1386
- props: {
1387
- data: Object
1388
- },
1389
- watch: {
1390
- "data.options.oss"(l) {
1391
- l === "ali" ? this.data.options.qiniu = {} : l === "qiniu" && (this.data.options.ali = {});
1392
- }
1393
- }
1394
- };
1395
- var Tt = function() {
1396
- var e = this, t = e._self._c;
1397
- return t("div", [t(i, { attrs: { label: "图片上传地址", "label-width": "110px" } }, [t(r, { attrs: { clearable: "", placeholder: "图片上传地址" }, model: { value: e.data.options.action, callback: function(a) {
1398
- e.$set(e.data.options, "action", a);
1399
- }, expression: "data.options.action" } })], 1), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [t($, { attrs: { underline: !1, href: "https://avuejs.com/plugins/ueditor-plugins.html", target: "_blank" } }, [e._v("参数设置 "), t("i", { staticClass: "el-icon-question" })])], 1), t("div", { staticClass: "el-form-item__content" }, [e._v(" 返回的数据结构层次 "), t(r, { attrs: { size: "small", placeholder: "返回的数据结构层次" }, model: { value: e.data.options.props.res, callback: function(a) {
1400
- e.$set(e.data.options.props, "res", a);
1401
- }, expression: "data.options.props.res" } }), e._v(" 返回结构体图片地址字段 "), t(r, { attrs: { size: "small", placeholder: "返回结构体图片地址字段" }, model: { value: e.data.options.props.url, callback: function(a) {
1402
- e.$set(e.data.options.props, "url", a);
1403
- }, expression: "data.options.props.url" } })], 1)]), t(i, { attrs: { label: "OSS" } }, [t(b, { attrs: { placeholder: "oss不写则为普通上传", clearable: "" }, model: { value: e.data.options.oss, callback: function(a) {
1404
- e.$set(e.data.options, "oss", a);
1405
- }, expression: "data.options.oss" } }, [t(d, { attrs: { label: "阿里", value: "ali" } }), t(d, { attrs: { label: "七牛", value: "qiniu" } })], 1)], 1), e.data.options.oss == "qiniu" ? [t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("七牛oss配置:")]), t("div", { staticClass: "el-form-item__content" }, [e._v(" AK: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "七牛云的密钥(AK)" }, model: { value: e.data.options.qiniu.AK, callback: function(a) {
1406
- e.$set(e.data.options.qiniu, "AK", a);
1407
- }, expression: "data.options.qiniu.AK" } }), e._v(" SK: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "七牛云的密钥(SK)" }, model: { value: e.data.options.qiniu.SK, callback: function(a) {
1408
- e.$set(e.data.options.qiniu, "SK", a);
1409
- }, expression: "data.options.qiniu.SK" } }), e._v(" scope: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "七牛云存储的空间名" }, model: { value: e.data.options.qiniu.scope, callback: function(a) {
1410
- e.$set(e.data.options.qiniu, "scope", a);
1411
- }, expression: "data.options.qiniu.scope" } }), e._v(" url: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "空间的自定义域名" }, model: { value: e.data.options.qiniu.url, callback: function(a) {
1412
- e.$set(e.data.options.qiniu, "url", a);
1413
- }, expression: "data.options.qiniu.url" } }), e._v(" deadline: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "token的过期时间" }, model: { value: e.data.options.qiniu.deadline, callback: function(a) {
1414
- e.$set(e.data.options.qiniu, "deadline", a);
1415
- }, expression: "data.options.qiniu.deadline" } })], 1)])] : e._e(), e.data.options.oss === "ali" ? [t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("七牛oss配置:")]), t("div", { staticClass: "el-form-item__content" }, [e._v(" region: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "region" }, model: { value: e.data.options.ali.region, callback: function(a) {
1416
- e.$set(e.data.options.ali, "region", a);
1417
- }, expression: "data.options.ali.region" } }), e._v(" endpoint: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "endpoint" }, model: { value: e.data.options.ali.endpoint, callback: function(a) {
1418
- e.$set(e.data.options.ali, "endpoint", a);
1419
- }, expression: "data.options.ali.endpoint" } }), e._v(" accessKeyId: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "accessKeyId" }, model: { value: e.data.options.ali.accessKeyId, callback: function(a) {
1420
- e.$set(e.data.options.ali, "accessKeyId", a);
1421
- }, expression: "data.options.ali.accessKeyId" } }), e._v(" accessKeySecret: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "accessKeySecret" }, model: { value: e.data.options.ali.accessKeySecret, callback: function(a) {
1422
- e.$set(e.data.options.ali, "accessKeySecret", a);
1423
- }, expression: "data.options.ali.accessKeySecret" } }), e._v(" bucket: "), t(r, { attrs: { size: "small", clearable: "", placeholder: "bucket " }, model: { value: e.data.options.ali.bucket, callback: function(a) {
1424
- e.$set(e.data.options.ali, "bucket", a);
1425
- }, expression: "data.options.ali.bucket" } })], 1)])] : e._e()], 2);
1426
- }, zt = [], Pt = /* @__PURE__ */ h(
1427
- Bt,
1428
- Tt,
1429
- zt,
1430
- !1,
1431
- null,
1432
- null
1433
- );
1434
- const Rt = Pt.exports, Dt = {
1435
- name: "ConfigMap",
1436
- props: {
1437
- data: Object
1438
- }
1439
- };
1440
- var Mt = function() {
1441
- var e = this, t = e._self._c;
1442
- return t("div", [t(i, { attrs: { label: "默认值" } }, [t("a", { staticStyle: { color: "#409eff" }, attrs: { href: "https://avuejs.com/form/form-input-map.html", target: "_blank" } }, [e._v("详细文档")]), t("br"), t(r, { attrs: { placeholder: "默认值" }, model: { value: e.data.value, callback: function(a) {
1443
- e.$set(e.data, "value", a);
1444
- }, expression: "data.value" } })], 1)], 1);
1445
- }, Qt = [], Kt = /* @__PURE__ */ h(
1446
- Dt,
1447
- Mt,
1448
- Qt,
1449
- !1,
1450
- null,
1451
- null
1452
- );
1453
- const jt = Kt.exports, Vt = {
1454
- name: "ConfigGroup",
1455
- props: {
1456
- data: Object
1457
- },
1458
- data() {
1459
- return {
1460
- iconList: [
1461
- {
1462
- label: "element-ui",
1463
- list: ["el-icon-info", "el-icon-error", "el-icon-success", "el-icon-warning", "el-icon-question"]
1464
- }
1465
- ]
1466
- };
1467
- }
1468
- };
1469
- var qt = function() {
1470
- var e = this, t = e._self._c;
1471
- return t("div", [t(i, { attrs: { label: "图标" } }, [t(ce, { attrs: { "icon-list": e.iconList, placeholder: "图标" }, model: { value: e.data.icon, callback: function(a) {
1472
- e.$set(e.data, "icon", a);
1473
- }, expression: "data.icon" } })], 1), t(i, { attrs: { label: "开启折叠" } }, [t(c, { model: { value: e.data.arrow, callback: function(a) {
1474
- e.$set(e.data, "arrow", a);
1475
- }, expression: "data.arrow" } })], 1), e.data.arrow ? t(i, { attrs: { label: "默认展开" } }, [t(c, { model: { value: e.data.collapse, callback: function(a) {
1476
- e.$set(e.data, "collapse", a);
1477
- }, expression: "data.collapse" } })], 1) : e._e()], 1);
1478
- }, Lt = [], Nt = /* @__PURE__ */ h(
1479
- Vt,
1480
- qt,
1481
- Lt,
1482
- !1,
1483
- null,
1484
- null
1485
- );
1486
- const Gt = Nt.exports, Ht = {
1487
- name: "ConfigArray",
1488
- props: {
1489
- data: Object
1490
- }
1491
- };
1492
- var Ut = function() {
1493
- var e = this, t = e._self._c;
1494
- return t("div", [t(i, { attrs: { label: "占位内容" } }, [t(r, { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
1495
- e.$set(e.data, "placeholder", a);
1496
- }, expression: "data.placeholder" } })], 1), t(i, { attrs: { label: "尺寸" } }, [t(M, { attrs: { size: "mini" }, model: { value: e.data.size, callback: function(a) {
1497
- e.$set(e.data, "size", a);
1498
- }, expression: "data.size" } }, [t(A, { attrs: { label: "medium" } }, [e._v(" 正常 ")]), t(A, { attrs: { label: "small" } }, [e._v(" 小 ")]), t(A, { attrs: { label: "mini" } }, [e._v(" 超小 ")])], 1)], 1)], 1);
1499
- }, Jt = [], Yt = /* @__PURE__ */ h(
1500
- Ht,
1501
- Ut,
1502
- Jt,
1503
- !1,
1504
- null,
1505
- null
1506
- );
1507
- const Xt = Yt.exports, Zt = {
1508
- name: "ConfigTitle",
1509
- props: {
1510
- data: Object
1511
- },
1512
- data() {
1513
- return {
1514
- options: ["100", "200", "300", "400", "500", "600", "700", "800", "900", "blod", "bloder", "inherit", "initial", "lighter", "normal", "revert", "unset"]
1515
- };
1516
- }
1517
- };
1518
- var ea = function() {
1519
- var e = this, t = e._self._c;
1520
- return t("div", [t(i, { attrs: { label: "文本对齐" } }, [t(M, { model: { value: e.data.styles.textAlign, callback: function(a) {
1521
- e.$set(e.data.styles, "textAlign", a);
1522
- }, expression: "data.styles.textAlign" } }, [t(w, { attrs: { label: "left" } }, [e._v(" 左 ")]), t(w, { attrs: { label: "center" } }, [e._v(" 中 ")]), t(w, { attrs: { label: "right" } }, [e._v(" 右 ")])], 1)], 1), t(i, { attrs: { label: "颜色" } }, [t(N, { attrs: { size: "mini" }, model: { value: e.data.styles.color, callback: function(a) {
1523
- e.$set(e.data.styles, "color", a);
1524
- }, expression: "data.styles.color" } })], 1), t(i, { attrs: { label: "字体大小" } }, [t(r, { attrs: { clearable: "", placeholder: "字体大小" }, model: { value: e.data.styles.fontSize, callback: function(a) {
1525
- e.$set(e.data.styles, "fontSize", a);
1526
- }, expression: "data.styles.fontSize" } })], 1), t(i, { attrs: { label: "粗体" } }, [t(b, { attrs: { placeholder: "粗体", clearable: "" }, model: { value: e.data.styles.fontWeight, callback: function(a) {
1527
- e.$set(e.data.styles, "fontWeight", a);
1528
- }, expression: "data.styles.fontWeight" } }, e._l(e.options, function(a) {
1529
- return t(d, { key: a, attrs: { label: a, value: a } });
1530
- }), 1)], 1)], 1);
1531
- }, ta = [], aa = /* @__PURE__ */ h(
1532
- Zt,
1533
- ea,
1534
- ta,
1535
- !1,
1536
- null,
1537
- null
1538
- );
1539
- const la = aa.exports, sa = [
1540
- {
1541
- label: "输入框",
1542
- value: "input"
1543
- },
1544
- {
1545
- label: "选择框",
1546
- value: "select"
1547
- },
1548
- {
1549
- label: "密码框",
1550
- value: "password"
1551
- },
1552
- {
1553
- label: "数字框",
1554
- value: "number"
1555
- },
1556
- {
1557
- label: "上传框",
1558
- value: "upload"
1559
- },
1560
- {
1561
- label: "颜色选择器",
1562
- value: "color"
1563
- },
1564
- {
1565
- label: "地图选择器",
1566
- value: "map"
1567
- },
1568
- {
1569
- label: "图标选择器",
1570
- value: "icon"
1571
- },
1572
- {
1573
- label: "树型下拉框",
1574
- value: "tree"
1575
- },
1576
- {
1577
- label: "单选框",
1578
- value: "radio"
1579
- },
1580
- {
1581
- label: "多选",
1582
- value: "checkbox"
1583
- },
1584
- {
1585
- label: "开关框",
1586
- value: "switch"
1587
- },
1588
- {
1589
- label: "文本框",
1590
- value: "textarea"
1591
- },
1592
- {
1593
- label: "时间框",
1594
- value: "time"
1595
- },
1596
- {
1597
- label: "时间范围",
1598
- value: "timerange"
1599
- },
1600
- {
1601
- label: "级联框",
1602
- value: "cascader"
1603
- },
1604
- {
1605
- label: "日期框",
1606
- value: "date"
1607
- },
1608
- {
1609
- label: "日期时间框",
1610
- value: "datetime"
1611
- },
1612
- {
1613
- label: "日期时间范围",
1614
- value: "datetimerange"
1615
- },
1616
- {
1617
- label: "多个日期",
1618
- value: "dates"
1619
- },
1620
- {
1621
- label: "月",
1622
- value: "month"
1623
- },
1624
- {
1625
- label: "周",
1626
- value: "week"
1627
- },
1628
- {
1629
- label: "年",
1630
- value: "year"
1631
- }
1632
- ], ia = {
1633
- name: "AfdColumn",
1634
- props: {
1635
- column: {
1636
- type: Array,
1637
- default: () => []
1638
- }
1639
- },
1640
- emits: ["submit"],
1641
- data() {
1642
- return {
1643
- fields: sa,
1644
- visible: !1,
1645
- list: []
1646
- };
1647
- },
1648
- watch: {
1649
- column: {
1650
- handler(l) {
1651
- this.list = l;
1652
- },
1653
- deep: !0,
1654
- immediate: !0
1655
- }
1656
- },
1657
- methods: {
1658
- handleSubmit() {
1659
- this.$emit("submit", _(this.list)), this.visible = !1;
1660
- },
1661
- handleDic(l) {
1662
- console.log(l), this.$message.error("暂未实现");
1663
- }
1664
- }
1665
- };
1666
- var na = function() {
1667
- var e = this, t = e._self._c;
1668
- return t(E, { attrs: { visible: e.visible, size: "80%", "append-to-body": "" }, on: { "update:visible": function(a) {
1669
- e.visible = a;
1670
- } } }, [t(G, { attrs: { data: e.list, border: "" } }, [t(C, { attrs: { align: "center", width: "60" }, scopedSlots: e._u([{ key: "header", fn: function() {
1671
- return [t(p, { attrs: { icon: "el-icon-plus", type: "primary", circle: "", size: "mini" }, on: { click: function(a) {
1672
- return e.list.push({});
1673
- } } })];
1674
- }, proxy: !0 }, { key: "default", fn: function({ $index: a }) {
1675
- return [t(p, { attrs: { icon: "el-icon-minus", type: "danger", circle: "", size: "mini" }, on: { click: function(s) {
1676
- return e.list.splice(a, 1);
1677
- } } })];
1678
- } }]) }), t(C, { attrs: { label: "字段名", prop: "label", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: a }) {
1679
- return [t(r, { attrs: { placeholder: "请输入 字段名" }, model: { value: a.label, callback: function(s) {
1680
- e.$set(a, "label", s);
1681
- }, expression: "row.label" } })];
1682
- } }]) }), t(C, { attrs: { label: "Prop", prop: "prop", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: a }) {
1683
- return [t(r, { attrs: { placeholder: "请输入 prop" }, model: { value: a.prop, callback: function(s) {
1684
- e.$set(a, "prop", s);
1685
- }, expression: "row.prop" } })];
1686
- } }]) }), t(C, { attrs: { label: "类型", prop: "type", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: a }) {
1687
- return [t(b, { staticStyle: { width: "100%" }, attrs: { placeholder: "请选择 类型", filterable: "" }, model: { value: a.type, callback: function(s) {
1688
- e.$set(a, "type", s);
1689
- }, expression: "row.type" } }, e._l(e.fields, function(s) {
1690
- return t(d, { key: s.value, attrs: { label: s.value, value: s.value } });
1691
- }), 1)];
1692
- } }]) }), t(C, { attrs: { label: "搜索", prop: "search", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: a }) {
1693
- return [t(c, { model: { value: a.search, callback: function(s) {
1694
- e.$set(a, "search", s);
1695
- }, expression: "row.search" } })];
1696
- } }]) }), t(C, { attrs: { label: "操作", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: a }) {
1697
- return [["select", "cascader", "tree", "radio", "checkbox"].includes(a.type) ? [t(p, { attrs: { type: "text" }, on: { click: function(s) {
1698
- return e.handleDic(a);
1699
- } } }, [e._v(" 字典配置 ")])] : e._e()];
1700
- } }]) })], 1), t("span", { staticClass: "afd-drawer-foot" }, [t(p, { attrs: { type: "primary" }, on: { click: e.handleSubmit } }, [e._v("确定")]), t(p, { on: { click: function(a) {
1701
- e.visible = !1;
1702
- } } }, [e._v("取消")])], 1)], 1);
1703
- }, oa = [], ra = /* @__PURE__ */ h(
1704
- ia,
1705
- na,
1706
- oa,
1707
- !1,
1708
- null,
1709
- null
1710
- );
1711
- const Y = ra.exports, ca = {
1712
- name: "ConfigTable",
1713
- components: { MonacoEditor: g, AfdColumn: Y },
1714
- props: {
1715
- data: Object
1716
- },
1717
- data() {
1718
- return {
1719
- options: {
1720
- fullScreen: !0,
1721
- minimap: {
1722
- enabled: !1
1723
- }
1724
- },
1725
- onLoad: "",
1726
- formatter: ""
1727
- };
1728
- },
1729
- watch: {
1730
- "data.prop": {
1731
- handler() {
1732
- const { onLoad: l, formatter: e } = this.data;
1733
- this.onLoad = l ? `${l}` : "", this.formatter = e ? `${e}` : "";
1734
- },
1735
- immediate: !0
1736
- },
1737
- "data.children.props": {
1738
- handler(l) {
1739
- this.handleOnLoad(l);
1740
- },
1741
- deep: !0
1742
- },
1743
- onLoad: {
1744
- handler(l) {
1745
- try {
1746
- this.data.onLoad = y(l);
1747
- } catch (e) {
1748
- console.error(e);
1749
- }
1750
- }
1751
- }
1752
- },
1753
- methods: {
1754
- handleColumn(l) {
1755
- this.data.children.column = l;
1756
- },
1757
- handleOnLoad(l) {
1758
- const { url: e, method: t, needPage: a, currentPageKey: s, pageSizeKey: n, totalKey: o, recordsKey: m, resKey: u, auto: x } = l;
1759
- if (!x) return;
1760
- if (!e) {
1761
- this.onLoad = "(res, cb) => { }";
1762
- return;
1763
- }
1764
- let { props: v } = this.data;
1765
- v || (v = { label: "label", value: "value" });
1766
- const { value: k } = v, te = `(res, cb) => {
1767
- let { page, value, data } = res
1768
- if (!page) page = { currentPage: 1, pageSize: 10 }
1769
- const { currentPage, pageSize } = page
1770
- let params = { ...data, ${s || "current"}: currentPage, ${n || "page"}: pageSize }
1771
-
1772
- if (value) params['${k}'] = value
1773
-
1774
- if ('${t || "get"}' == 'get') params = { params: { ...params } }
1775
-
1776
- this.$axios['${t}']('${e}', params).then(res => {
1777
- const response = this.getAsVal(res, '${u || "data.data"}')
1778
- if (!response) this.$message.error('未查询到数据或者返回层级配置错误')
1779
-
1780
- let result = {}
1781
- if (${a}) {
1782
- const total = this.getAsVal(response, '${o || "total"}')
1783
- if (total || total == 0) {
1784
- result.total = total
1785
- } else {
1786
- this.$message.error('总条数配置错误')
1787
- return
1788
- }
1789
- const records = this.getAsVal(response, '${m || "records"}')
1790
- if (records) {
1791
- result.data = records
1792
- } else {
1793
- this.$message.error('列表配置错误')
1794
- return
1795
- }
1796
- } else result = { total: response.length, data: response }
1797
-
1798
- if (value) {
1799
- const records = result.data
1800
- if (records && records.length > 0) cb(records[0])
1801
- else this.$message.error('根据${k}: ' + value + ' 查询不到结果')
1802
- } else cb(result)
1803
- })
1804
- }`;
1805
- this.onLoad = te;
1806
- }
1807
- }
1808
- };
1809
- var da = function() {
1810
- var e = this, t = e._self._c;
1811
- return t("div", [t(i, { attrs: { label: "字段配置" } }, [t(p, { attrs: { type: "primary", size: "small" }, on: { click: function(a) {
1812
- e.$refs.column.visible = !0;
1813
- } } }, [e._v(" 字段配置 ")])], 1), t(i, { attrs: { label: "边框" } }, [t(c, { model: { value: e.data.children.border, callback: function(a) {
1814
- e.$set(e.data.children, "border", a);
1815
- }, expression: "data.children.border" } })], 1), t(i, { attrs: { label: "label" } }, [t(r, { attrs: { placeholder: "label", clearable: "" }, model: { value: e.data.props.label, callback: function(a) {
1816
- e.$set(e.data.props, "label", a);
1817
- }, expression: "data.props.label" } })], 1), t(i, { attrs: { label: "value" } }, [t(r, { attrs: { placeholder: "value", clearable: "" }, model: { value: e.data.props.value, callback: function(a) {
1818
- e.$set(e.data.props, "value", a);
1819
- }, expression: "data.props.value" } })], 1), t(i, { attrs: { label: "请求地址" } }, [t(r, { attrs: { type: "textarea", placeholder: "请求地址", autosize: "" }, model: { value: e.data.children.props.url, callback: function(a) {
1820
- e.$set(e.data.children.props, "url", a);
1821
- }, expression: "data.children.props.url" } })], 1), t(i, { attrs: { label: "请求方法" } }, [t(b, { attrs: { placeholder: "请求方法", clearable: "" }, model: { value: e.data.children.props.method, callback: function(a) {
1822
- e.$set(e.data.children.props, "method", a);
1823
- }, expression: "data.children.props.method" } }, [t(d, { attrs: { label: "GET", value: "get" } }), t(d, { attrs: { label: "POST", value: "post" } })], 1)], 1), t(i, { attrs: { label: "分页" } }, [t(c, { model: { value: e.data.children.props.needPage, callback: function(a) {
1824
- e.$set(e.data.children.props, "needPage", a);
1825
- }, expression: "data.children.props.needPage" } })], 1), e.data.children.props.needPage ? t(i, { attrs: { label: "当前页" } }, [t(r, { attrs: { placeholder: "当前页", clearable: "" }, model: { value: e.data.children.props.currentPageKey, callback: function(a) {
1826
- e.$set(e.data.children.props, "currentPageKey", a);
1827
- }, expression: "data.children.props.currentPageKey" } })], 1) : e._e(), e.data.children.props.needPage ? t(i, { attrs: { label: "每页条数" } }, [t(r, { attrs: { placeholder: "每页条数", clearable: "" }, model: { value: e.data.children.props.pageSizeKey, callback: function(a) {
1828
- e.$set(e.data.children.props, "pageSizeKey", a);
1829
- }, expression: "data.children.props.pageSizeKey" } })], 1) : e._e(), e.data.children.props.needPage ? t(i, { attrs: { label: "总条数" } }, [t(r, { attrs: { placeholder: "总条数", clearable: "" }, model: { value: e.data.children.props.totalKey, callback: function(a) {
1830
- e.$set(e.data.children.props, "totalKey", a);
1831
- }, expression: "data.children.props.totalKey" } })], 1) : e._e(), e.data.children.props.needPage ? t(i, { attrs: { label: "列表" } }, [t(r, { attrs: { placeholder: "列表", clearable: "" }, model: { value: e.data.children.props.recordsKey, callback: function(a) {
1832
- e.$set(e.data.children.props, "recordsKey", a);
1833
- }, expression: "data.children.props.recordsKey" } })], 1) : e._e(), t(i, { attrs: { label: "返回层级" } }, [t(r, { attrs: { placeholder: "返回层级", clearable: "" }, model: { value: e.data.children.props.resKey, callback: function(a) {
1834
- e.$set(e.data.children.props, "resKey", a);
1835
- }, expression: "data.children.props.resKey" } })], 1), t(i, { attrs: { label: "自动生成" } }, [t(c, { model: { value: e.data.children.props.auto, callback: function(a) {
1836
- e.$set(e.data.children.props, "auto", a);
1837
- }, expression: "data.children.props.auto" } })], 1), t("div", { staticClass: "el-form--label-top" }, [t("div", { staticClass: "el-form-item" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [t(B, { attrs: { placement: "top-start", width: 200, trigger: "hover", content: "填写以上配置后会自动生成,若觉得生成的不对请自行修改或关闭自动生成" }, scopedSlots: e._u([{ key: "reference", fn: function() {
1838
- return [t($, { attrs: { href: "https://avuejs.com/form/form-input-table.html", underline: !1, target: "_blank" } }, [e._v(" onLoad: "), t("i", { staticClass: "el-icon-question" })])];
1839
- }, proxy: !0 }]) })], 1), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "200", "key-index": `table-onload-${e.data.prop}`, options: e.options }, model: { value: e.onLoad, callback: function(a) {
1840
- e.onLoad = a;
1841
- }, expression: "onLoad" } })], 1)]), t("div", { staticClass: "el-form-item" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("formatter:")]), t("div", { staticClass: "el-form-item__content" }, [t(g, { attrs: { height: "200", "key-index": `table-formatter-${e.data.prop}`, options: e.options }, model: { value: e.formatter, callback: function(a) {
1842
- e.formatter = a;
1843
- }, expression: "formatter" } })], 1)])]), t(Y, { ref: "column", attrs: { column: e.data.children.column }, on: { submit: e.handleColumn } })], 1);
1844
- }, pa = [], ua = /* @__PURE__ */ h(
1845
- ca,
1846
- da,
1847
- pa,
1848
- !1,
1849
- null,
1850
- null
1851
- );
1852
- const ma = ua.exports, ha = ["year", "month", "week", "date", "datetime", "time", "daterange", "timerange", "datetimerange", "dates"], fa = {
1853
- name: "WidgetConfig",
1854
- components: {
1855
- ConfigCustom: Ae,
1856
- ConfigInput: Ie,
1857
- ConfigTextarea: Pe,
1858
- ConfigNumber: Ke,
1859
- ConfigDynamic: Ne,
1860
- ConfigSwitch: Ye,
1861
- ConfigRate: at,
1862
- ConfigSlider: ot,
1863
- ConfigColor: ut,
1864
- ConfigSelect: gt,
1865
- ConfigTree: $t,
1866
- ConfigDate: Ft,
1867
- ConfigUpload: Et,
1868
- ConfigUEditor: Rt,
1869
- ConfigMap: jt,
1870
- ConfigGroup: Gt,
1871
- ConfigArray: Xt,
1872
- ConfigTitle: la,
1873
- ConfigEvent: J,
1874
- ConfigTable: ma
1875
- },
1876
- props: {
1877
- data: Object,
1878
- defaultValues: Object
1879
- },
1880
- data() {
1881
- return {
1882
- fields: D,
1883
- collapse: ["1", "2", "3"],
1884
- validator: {
1885
- type: null,
1886
- required: null,
1887
- pattern: null,
1888
- length: null
1889
- }
1890
- };
1891
- },
1892
- computed: {
1893
- getComponent() {
1894
- const l = "config-", { type: e, component: t } = this.data;
1895
- if ((!e || t) && e !== "u-editor")
1896
- return `${l}custom`;
1897
- let a = "input";
1898
- return [void 0, "input", "password", "url"].includes(e) ? a = "input" : ha.includes(e) ? a = "date" : ["array", "img"].includes(e) ? a = "array" : ["tree", "cascader"].includes(e) ? a = "tree" : ["radio", "checkbox", "select"].includes(e) ? a = "select" : a = e, l + a;
1899
- }
1900
- },
1901
- watch: {
1902
- "data.required"(l) {
1903
- l ? this.validator.required = { required: !0, message: `${this.data.label}必须填写` } : this.validator.required = null, this.generateRule();
1904
- },
1905
- "data.pattern"(l) {
1906
- l ? this.validator.pattern = { pattern: new RegExp(l), message: `${this.data.label}格式不匹配` } : this.validator.pattern = null, this.generateRule();
1907
- }
1908
- },
1909
- methods: {
1910
- handleChangeType(l) {
1911
- if (!l) return;
1912
- let e;
1913
- for (const t of this.fields)
1914
- if (e = t.list.find((a) => a.type === l), e) break;
1915
- if (e)
1916
- for (const t in e)
1917
- e && Object.prototype.hasOwnProperty.call(e, t) && !["icon", "label", "span"].includes(t) && (this.data[t] = e[t]);
1918
- },
1919
- generateRule() {
1920
- const l = [];
1921
- Object.keys(this.validator).forEach((e) => {
1922
- this.validator[e] && l.push(this.validator[e]);
1923
- }), l.length === 0 ? delete this.data.rules : this.data.rules = l;
1924
- }
1925
- }
1926
- };
1927
- var ba = function() {
1928
- var e = this, t = e._self._c;
1929
- return t("div", { staticClass: "widget-config" }, [e.data && Object.keys(e.data).length > 0 ? t(I, { attrs: { "label-suffix": ":", "label-position": "left", "label-width": "90px", size: "small" } }, [t(ie, { model: { value: e.collapse, callback: function(a) {
1930
- e.collapse = a;
1931
- }, expression: "collapse" } }, [t(R, { attrs: { name: "1", title: "基本属性" } }, [e.data.type && !e.data.component ? t(i, { attrs: { label: "类型" } }, [t(b, { staticStyle: { width: "100%" }, attrs: { placeholder: "请选择类型" }, on: { change: e.handleChangeType }, model: { value: e.data.type, callback: function(a) {
1932
- e.$set(e.data, "type", a);
1933
- }, expression: "data.type" } }, e._l(e.fields, function(a) {
1934
- return t(se, { key: a.title, attrs: { label: a.title } }, e._l(a.list, function(s) {
1935
- return t(d, { key: s.type, attrs: { label: s.label, value: s.type } });
1936
- }), 1);
1937
- }), 1)], 1) : e._e(), t(i, { attrs: { label: "属性值" } }, [t(r, { attrs: { clearable: "", placeholder: "属性值" }, model: { value: e.data.prop, callback: function(a) {
1938
- e.$set(e.data, "prop", a);
1939
- }, expression: "data.prop" } })], 1), t(i, { attrs: { label: "标题" } }, [t(r, { attrs: { clearable: "", placeholder: "标题" }, model: { value: e.data.label, callback: function(a) {
1940
- e.$set(e.data, "label", a);
1941
- }, expression: "data.label" } })], 1), ["group", "dynamic", "title"].includes(e.data.type) ? e._e() : t(i, { attrs: { label: "标题宽度" } }, [t(f, { staticStyle: { width: "100%" }, attrs: { min: 80, step: 10, "controls-position": "right", placeholder: "标签宽度" }, model: { value: e.data.labelWidth, callback: function(a) {
1942
- e.$set(e.data, "labelWidth", a);
1943
- }, expression: "data.labelWidth" } })], 1), e.data.subfield ? e._e() : t(i, { attrs: { label: "标签位置" } }, [t(b, { attrs: { placeholder: "标签位置", clearable: "" }, model: { value: e.data.labelPosition, callback: function(a) {
1944
- e.$set(e.data, "labelPosition", a);
1945
- }, expression: "data.labelPosition" } }, [t(d, { attrs: { label: "上", value: "top" } }), t(d, { attrs: { label: "左", value: "left" } }), t(d, { attrs: { label: "右", value: "right" } })], 1)], 1), e.data.subfield ? t(i, { attrs: { label: "宽度" } }, [t(f, { staticStyle: { width: "100%" }, attrs: { "controls-position": "right", placeholder: "宽度", min: 100 }, model: { value: e.data.width, callback: function(a) {
1946
- e.$set(e.data, "width", a);
1947
- }, expression: "data.width" } })], 1) : e._e(), !e.data.subfield && !["group"].includes(e.data.type) ? t(i, { attrs: { label: "表单栅格" } }, [t(f, { staticStyle: { width: "100%" }, attrs: { "controls-position": "right", placeholder: "表单栅格", min: 2, max: 24 }, model: { value: e.data.span, callback: function(a) {
1948
- e.$set(e.data, "span", a);
1949
- }, expression: "data.span" } })], 1) : e._e(), ["cascader", "checkbox", "radio", "select", "tree", "upload", "img", "array", "slider", "timerange", "daterange", "datetimerange"].includes(
1950
- e.data.type
1951
- ) ? t(i, { attrs: { label: "数据类型" }, scopedSlots: e._u([{ key: "label", fn: function() {
1952
- return [t($, { attrs: { underline: !1, href: "https://avuejs.com/docs/datatype.html", target: "_blank" } }, [e._v(" 数据类型 "), t("i", { staticClass: "el-icon-question" })])];
1953
- }, proxy: !0 }], null, !1, 3051713203) }, [t(b, { attrs: { placeholder: "数据类型", clearable: "" }, model: { value: e.data.dataType, callback: function(a) {
1954
- e.$set(e.data, "dataType", a);
1955
- }, expression: "data.dataType" } }, [t(d, { attrs: { label: "String", value: "string" } }), t(d, { attrs: { label: "Number", value: "number" } }), t(d, { attrs: { label: "Array", value: "array" } })], 1)], 1) : e._e(), t(i, { attrs: { label: "字段提示" }, scopedSlots: e._u([{ key: "label", fn: function() {
1956
- return [t($, { attrs: { underline: !1, href: "https://avuejs.com/form/form-tip.html", target: "_blank" } }, [e._v(" 字段提示 "), t("i", { staticClass: "el-icon-question" })])];
1957
- }, proxy: !0 }], null, !1, 708991366) }, [t(r, { attrs: { clearable: "", placeholder: "字段提示" }, model: { value: e.data.tip, callback: function(a) {
1958
- e.$set(e.data, "tip", a);
1959
- }, expression: "data.tip" } })], 1), e.data.tip && !["upload"].includes(e.data.type) ? t(i, { attrs: { label: "字段提示位置", "label-width": "110px" } }, [t(b, { attrs: { placeholder: "字段提示位置", clearable: "" }, model: { value: e.data.tipPlacement, callback: function(a) {
1960
- e.$set(e.data, "tipPlacement", a);
1961
- }, expression: "data.tipPlacement" } }, [t(d, { attrs: { label: "上", value: "top" } }), t(d, { attrs: { label: "下", value: "bottom" } }), t(d, { attrs: { label: "左", value: "left" } }), t(d, { attrs: { label: "右", value: "right" } })], 1)], 1) : e._e(), t(i, { attrs: { label: "标题提示" }, scopedSlots: e._u([{ key: "label", fn: function() {
1962
- return [t($, { attrs: { underline: !1, href: "https://avuejs.com/form/form-tip.html", target: "_blank" } }, [e._v(" 标题提示 "), t("i", { staticClass: "el-icon-question" })])];
1963
- }, proxy: !0 }], null, !1, 1033131739) }, [t(r, { attrs: { clearable: "", placeholder: "标题提示" }, model: { value: e.data.labelTip, callback: function(a) {
1964
- e.$set(e.data, "labelTip", a);
1965
- }, expression: "data.labelTip" } })], 1), e.data.labelTip && !["upload"].includes(e.data.type) ? t(i, { attrs: { label: "标题提示位置", "label-width": "110px" } }, [t(b, { attrs: { placeholder: "标题提示位置", clearable: "" }, model: { value: e.data.labelTipPlacement, callback: function(a) {
1966
- e.$set(e.data, "labelTipPlacement", a);
1967
- }, expression: "data.labelTipPlacement" } }, [t(d, { attrs: { label: "上", value: "top" } }), t(d, { attrs: { label: "下", value: "bottom" } }), t(d, { attrs: { label: "左", value: "left" } }), t(d, { attrs: { label: "右", value: "right" } })], 1)], 1) : e._e(), ["color", "dynamic", "group", "ueditor", "upload", "map"].includes(e.data.type) ? e._e() : t(i, { attrs: { label: "默认值" } }, [e.defaultValues && e.defaultValues[e.data.type] ? [t(b, { attrs: { "allow-create": "", clearable: "", filterable: "", placeholder: "默认值" }, model: { value: e.data.value, callback: function(a) {
1968
- e.$set(e.data, "value", a);
1969
- }, expression: "data.value" } }, e._l(e.defaultValues[e.data.type], function(a) {
1970
- return t(d, { key: a.value, attrs: { label: a.label, value: a.value } });
1971
- }), 1)] : [t(r, { attrs: { clearable: "", placeholder: "默认值" }, model: { value: e.data.value, callback: function(a) {
1972
- e.$set(e.data, "value", a);
1973
- }, expression: "data.value" } })]], 2), t(i, { attrs: { label: "详情模式" } }, [t(c, { model: { value: e.data.detail, callback: function(a) {
1974
- e.$set(e.data, "detail", a);
1975
- }, expression: "data.detail" } })], 1), t(i, { attrs: { label: "是否只读" } }, [t(c, { model: { value: e.data.readonly, callback: function(a) {
1976
- e.$set(e.data, "readonly", a);
1977
- }, expression: "data.readonly" } })], 1), t(i, { attrs: { label: "是否禁用" } }, [t(c, { model: { value: e.data.disabled, callback: function(a) {
1978
- e.$set(e.data, "disabled", a);
1979
- }, expression: "data.disabled" } })], 1), t(i, { attrs: { label: "是否可见" } }, [t(c, { model: { value: e.data.display, callback: function(a) {
1980
- e.$set(e.data, "display", a);
1981
- }, expression: "data.display" } })], 1), t(i, { attrs: { label: "是否必填" } }, [t(c, { model: { value: e.data.required, callback: function(a) {
1982
- e.$set(e.data, "required", a);
1983
- }, expression: "data.required" } }), e.data.required ? t(r, { attrs: { placeholder: "正则表达式" }, model: { value: e.data.pattern, callback: function(a) {
1984
- e.$set(e.data, "pattern", a);
1985
- }, expression: "data.pattern" } }) : e._e()], 1)], 1), t(R, { attrs: { name: "2", title: "组件属性" } }, [t(e.getComponent, { tag: "Component", attrs: { data: e.data, "default-values": e.defaultValues } })], 1), ["group"].includes(e.data.type) ? e._e() : t(R, { attrs: { name: "3", title: "事件属性" } }, [t(J, { attrs: { data: e.data } })], 1)], 1)], 1) : [t(L, { staticStyle: { "margin-top": "100%" }, attrs: { desc: "拖拽字段进行配置" } })]], 2);
1986
- }, ga = [], va = /* @__PURE__ */ h(
1987
- fa,
1988
- ba,
1989
- ga,
1990
- !1,
1991
- null,
1992
- null
1993
- );
1994
- const X = va.exports, _a = {
1995
- name: "WidgetFormItem",
1996
- components: { FyUEditor: () => import("../fy-u-editor/index.mjs") },
1997
- props: {
1998
- item: {
1999
- type: Object,
2000
- default: () => ({})
2001
- },
2002
- params: {
2003
- type: Object,
2004
- default: () => ({})
2005
- }
2006
- },
2007
- computed: {
2008
- vBind() {
2009
- const l = Object.assign(_(this.item), this.params, {
2010
- size: this.item.size || "small",
2011
- dic: this.item.dicData ? this.item.dicData.map((t) => {
2012
- if (!this.item.props) return t;
2013
- const { label: a, value: s, desc: n } = this.item.props;
2014
- return !a || !s ? t : {
2015
- [a]: t.label,
2016
- [s]: t.value,
2017
- [n]: t.desc
2018
- };
2019
- }) : void 0,
2020
- rules: this.item.pattern ? this.item.rules.map((t) => (t.pattern && (t.pattern = new RegExp(this.item.pattern)), t)) : this.item.rules
2021
- });
2022
- return ["change", "blur", "click", "focus"].forEach((t) => delete l[t]), l.event && delete l.event, l;
2023
- }
2024
- },
2025
- methods: {
2026
- getComponent(l, e) {
2027
- let a = "input";
2028
- return e || (["array", "img", "url"].includes(l) ? a = "array" : l === "select" ? a = "select" : l === "radio" ? a = "radio" : l === "checkbox" ? a = "checkbox" : ["time", "timerange"].includes(l) ? a = "time" : ["dates", "date", "datetime", "datetimerange", "daterange", "week", "month", "year"].includes(l) ? a = "date" : l === "cascader" ? a = "cascader" : l === "number" ? a = "input-number" : l === "password" ? a = "input" : l === "switch" ? a = "switch" : l === "rate" ? a = "rate" : l === "upload" ? a = "upload" : l === "slider" ? a = "slider" : l === "dynamic" ? a = "dynamic" : l === "icon" ? a = "input-icon" : l === "color" ? a = "input-color" : l === "map" && (a = "input-map"), "fy-" + a);
2029
- },
2030
- getPlaceholder(l) {
2031
- const e = l.label;
2032
- return [
2033
- "select",
2034
- "checkbox",
2035
- "radio",
2036
- "tree",
2037
- "color",
2038
- "dates",
2039
- "date",
2040
- "datetime",
2041
- "datetimerange",
2042
- "daterange",
2043
- "week",
2044
- "month",
2045
- "year",
2046
- "map",
2047
- "icon"
2048
- ].includes(l.type) ? `请选择 ${e}` : `请输入 ${e}`;
2049
- }
2050
- }
2051
- };
2052
- var ya = function() {
2053
- var e = this, t = e._self._c;
2054
- return t("div", [e.item.type === "title" ? t("div", { staticStyle: { "margin-left": "5px" }, style: e.item.styles }, [e._v(" " + e._s(e.item.value) + " ")]) : t(e.getComponent(e.item.type, e.item.component), e._b({ tag: "Component", attrs: { multiple: !1, placeholder: e.item.placeholder || e.getPlaceholder(e.item), value: ["time", "timerange", "checkbox"].includes(e.item.type) ? e.item.dicData : void 0 } }, "Component", e.vBind, !1), [e.params.html ? t("span", { domProps: { innerHTML: e._s(e.params.html) } }) : e._e()])], 1);
2055
- }, xa = [], $a = /* @__PURE__ */ h(
2056
- _a,
2057
- ya,
2058
- xa,
2059
- !1,
2060
- null,
2061
- null
2062
- );
2063
- const O = $a.exports, ka = {
2064
- name: "WidgetFormTable",
2065
- components: { WidgetFormItem: O, Draggable: S },
2066
- props: {
2067
- data: Object,
2068
- column: Object,
2069
- select: Object,
2070
- index: Number
2071
- },
2072
- data() {
2073
- return {
2074
- selectWidget: this.select
2075
- };
2076
- },
2077
- watch: {
2078
- select(l) {
2079
- this.selectWidget = l;
2080
- },
2081
- selectWidget: {
2082
- handler(l) {
2083
- this.$emit("update:select", l);
2084
- },
2085
- deep: !0
2086
- }
2087
- },
2088
- methods: {
2089
- handleSelectWidget(l) {
2090
- this.selectWidget = this.data.column[l];
2091
- },
2092
- handleWidgetClear(l) {
2093
- this.data.column[l].children.column = [], this.selectWidget = this.data.column[l], this.$emit("change");
2094
- },
2095
- handleWidgetDelete(l) {
2096
- this.data.column.length - 1 === l ? l === 0 ? this.selectWidget = {} : this.handleSelectWidget(l - 1) : this.handleSelectWidget(l + 1), this.$nextTick(() => {
2097
- this.data.column.splice(l, 1), this.$emit("change");
2098
- });
2099
- },
2100
- handleWidgetCloneTable(l) {
2101
- const e = _(this.data.column[l]);
2102
- e.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`, e.children.column.forEach((t) => {
2103
- t.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`;
2104
- }), this.data.column.splice(l, 0, e), this.$nextTick(() => {
2105
- this.handleSelectWidget(l + 1), this.$emit("change");
2106
- });
2107
- },
2108
- handleWidgetTableAdd(l, e) {
2109
- let t = l.newIndex;
2110
- const a = l.item;
2111
- if (t === 1 && t > e.children.column.length - 1 && (t = 0), ["子表单", "富文本", "坐标拾取器", "分组"].includes(a.textContent)) {
2112
- e.children.column.splice(t, 1);
2113
- return;
2114
- }
2115
- const s = _(e.children.column[t]);
2116
- s.prop || (s.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`), s.subfield = !0, delete s.icon, this.$set(e.children.column, t, { ...s }), this.selectWidget = e.children.column[t], this.$emit("change");
2117
- },
2118
- handleWidgetTableSelect(l) {
2119
- this.selectWidget = l;
2120
- },
2121
- handleWidgetTableClone(l, e) {
2122
- const t = _(e);
2123
- t.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`, this.$set(l.children.column, l.children.column.length, { ...t }), this.$nextTick(() => {
2124
- this.selectWidget = l.children.column[l.children.column.length - 1], this.$emit("change");
2125
- });
2126
- },
2127
- handleWidgetTableDelete(l, e) {
2128
- l.children.column.length - 1 === e ? e === 0 ? this.selectWidget = l : this.selectWidget = l.children.column[e - 1] : this.selectWidget = l.children.column[e + 1], this.$nextTick(() => {
2129
- l.children.column.splice(e, 1), this.$emit("change");
2130
- });
2131
- }
2132
- }
2133
- };
2134
- var Ca = function() {
2135
- var e = this, t = e._self._c;
2136
- return t("div", [t("h3", { directives: [{ name: "show", rawName: "v-show", value: e.column.label, expression: "column.label" }], staticStyle: { margin: "10px" } }, [e._v(" " + e._s(e.column.label) + " ")]), t("Draggable", { staticClass: "widget-form-table__content", attrs: { list: e.column.children.column, group: { name: "form" }, "ghost-class": "ghost", animation: 200, handle: ".widget-form-table__item" }, on: { add: function(a) {
2137
- return e.handleWidgetTableAdd(a, e.column);
2138
- }, end: function(a) {
2139
- return e.$emit("change");
2140
- } } }, [e.column.children.column.length > 0 ? e._l(e.column.children.column, function(a, s) {
2141
- return t("div", { key: s, staticClass: "widget-form-table__item", class: { active: e.selectWidget.prop === a.prop, required: a.required }, style: {
2142
- minWidth: a.width ? `${a.width}px` : "33.3%",
2143
- width: a.width ? `${a.width}px` : "33.3%"
2144
- }, on: { click: function(n) {
2145
- return n.stopPropagation(), e.handleWidgetTableSelect(a);
2146
- } } }, [t(G, { attrs: { data: [a], border: "" } }, [t(C, { attrs: { prop: a.prop, label: a.label, align: e.column.children.align, "header-align": e.column.children.headerAlign } }, [t(O, { attrs: { item: a, params: e.column.params } }), e.selectWidget.prop === a.prop ? t(p, { staticClass: "widget-table-action-delete", attrs: { title: "删除", circle: "", plain: "", size: "small", type: "danger" }, on: { click: function(n) {
2147
- return n.stopPropagation(), e.handleWidgetTableDelete(e.column, s);
2148
- } } }, [t("i", { staticClass: "iconfont icon-delete" })]) : e._e(), e.selectWidget.prop === a.prop ? t(p, { staticClass: "widget-table-action-clone", attrs: { title: "复制", circle: "", plain: "", size: "small", type: "primary" }, on: { click: function(n) {
2149
- return n.stopPropagation(), e.handleWidgetTableClone(e.column, a);
2150
- } } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1)], 1)], 1);
2151
- }) : [t(L, { staticStyle: { width: "100%" }, attrs: { size: "50", desc: "拖拽字段至此" } })]], 2), e.selectWidget.prop === e.column.prop ? t(p, { staticClass: "widget-action-delete", attrs: { title: "删除", circle: "", plain: "", size: "small", type: "danger" }, on: { click: function(a) {
2152
- return a.stopPropagation(), e.handleWidgetDelete(e.index);
2153
- } } }, [t("i", { staticClass: "iconfont icon-delete" })]) : e._e(), e.selectWidget.prop === e.column.prop ? t(p, { staticClass: "widget-action-clear", attrs: { title: "清空", circle: "", plain: "", size: "small", type: "warning" }, on: { click: function(a) {
2154
- return a.stopPropagation(), e.handleWidgetClear(e.index);
2155
- } } }, [t("i", { staticClass: "iconfont icon-clear" })]) : e._e(), e.selectWidget.prop === e.column.prop ? t(p, { staticClass: "widget-action-clone", attrs: { title: "复制", circle: "", plain: "", size: "small", type: "primary" }, on: { click: function(a) {
2156
- return a.stopPropagation(), e.handleWidgetCloneTable(e.index);
2157
- } } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1);
2158
- }, wa = [], Aa = /* @__PURE__ */ h(
2159
- ka,
2160
- Ca,
2161
- wa,
2162
- !1,
2163
- null,
2164
- null
2165
- );
2166
- const P = Aa.exports, Fa = {
2167
- name: "WidgetFormGroup",
2168
- components: { WidgetFormItem: O, WidgetFormTable: P, Draggable: S },
2169
- props: {
2170
- data: Object,
2171
- column: Object,
2172
- select: Object,
2173
- index: Number
2174
- },
2175
- data() {
2176
- return {
2177
- selectWidget: this.select
2178
- };
2179
- },
2180
- watch: {
2181
- select(l) {
2182
- this.selectWidget = l;
2183
- },
2184
- selectWidget: {
2185
- handler(l) {
2186
- this.$emit("update:select", l);
2187
- },
2188
- deep: !0
2189
- }
2190
- },
2191
- methods: {
2192
- handleSelectWidget(l) {
2193
- this.selectWidget = this.data.column[l];
2194
- },
2195
- handleWidgetClear(l) {
2196
- this.data.column[l].children.column = [], this.selectWidget = this.data.column[l], this.$emit("change");
2197
- },
2198
- handleWidgetDelete(l) {
2199
- this.data.column.length - 1 === l ? l === 0 ? this.selectWidget = {} : this.handleSelectWidget(l - 1) : this.handleSelectWidget(l + 1), this.$nextTick(() => {
2200
- this.data.column.splice(l, 1), this.$emit("change");
2201
- });
2202
- },
2203
- handleWidgetCloneTable(l) {
2204
- const e = _(this.data.column[l]);
2205
- e.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`, e.children.column.forEach((t) => {
2206
- t.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`;
2207
- }), this.data.column.splice(l, 0, e), this.$nextTick(() => {
2208
- this.handleSelectWidget(l + 1), this.$emit("change");
2209
- });
2210
- },
2211
- handleWidgetTableSelect(l) {
2212
- this.selectWidget = l;
2213
- },
2214
- handleWidgetTableClone(l, e) {
2215
- const t = _(e);
2216
- t.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`, this.$set(l.children.column, l.children.column.length, { ...t }), this.$nextTick(() => {
2217
- this.selectWidget = l.children.column[l.children.column.length - 1], this.$emit("change");
2218
- });
2219
- },
2220
- handleWidgetTableDelete(l, e) {
2221
- l.children.column.length - 1 === e ? e === 0 ? this.selectWidget = l : this.selectWidget = l.children.column[e - 1] : this.selectWidget = l.children.column[e + 1], this.$nextTick(() => {
2222
- l.children.column.splice(e, 1), this.$emit("change");
2223
- });
2224
- },
2225
- handleWidgetGroupAdd(l, e) {
2226
- let t = l.newIndex;
2227
- const a = l.item;
2228
- if (t === 1 && t > e.children.column.length - 1 && (t = 0), ["分组"].includes(a.textContent)) {
2229
- e.children.column.splice(t, 1);
2230
- return;
2231
- }
2232
- const s = _(e.children.column[t]);
2233
- s.prop || (s.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`), delete s.icon, s.type === "dynamic" ? s.span = 24 : s.span = 12, this.$set(e.children.column, t, { ...s }), this.selectWidget = e.children.column[t], this.$emit("change");
2234
- }
2235
- }
2236
- };
2237
- var Sa = function() {
2238
- var e = this, t = e._self._c;
2239
- return t("div", [t("h4", { directives: [{ name: "show", rawName: "v-show", value: e.column.label, expression: "column.label" }], staticClass: "widget-form-group__head" }, [t("i", { directives: [{ name: "show", rawName: "v-show", value: e.column.icon, expression: "column.icon" }], class: e.column.icon, staticStyle: { "margin-right": "10px" } }), e._v(e._s(e.column.label) + " ")]), t("Draggable", { staticClass: "widget-form-group__body", attrs: { list: e.column.children.column, group: { name: "form" }, "ghost-class": "ghost", animation: 200 }, on: { add: function(a) {
2240
- return e.handleWidgetGroupAdd(a, e.column);
2241
- }, end: function(a) {
2242
- return e.$emit("change");
2243
- } } }, [e._l(e.column.children.column, function(a, s) {
2244
- return [a.type === "dynamic" ? t("div", { key: s, staticClass: "widget-form-table", class: { active: e.selectWidget.prop === a.prop }, on: { click: function(n) {
2245
- return n.stopPropagation(), e.handleWidgetTableSelect(a);
2246
- } } }, [t(P, { attrs: { data: e.column.children, column: a, index: s, select: e.selectWidget }, on: { "update:select": function(n) {
2247
- e.selectWidget = n;
2248
- }, change: function(n) {
2249
- return e.$emit("change");
2250
- } } })], 1) : t(H, { key: s, attrs: { md: a.span || 12, xs: 24, offset: a.offset || 0 } }, [t(i, { staticClass: "widget-form-group__item", class: { active: e.selectWidget.prop === a.prop, required: a.required }, attrs: { label: a.label, prop: a.prop }, nativeOn: { click: function(n) {
2251
- return n.stopPropagation(), e.handleWidgetTableSelect(a);
2252
- } } }, [t(O, { attrs: { item: a, params: e.column.params } }), e.selectWidget.prop === a.prop ? t(p, { staticClass: "widget-form-group__item--delete", attrs: { title: "删除", circle: "", plain: "", type: "danger" }, on: { click: function(n) {
2253
- return n.stopPropagation(), e.handleWidgetTableDelete(e.column, s);
2254
- } } }, [t("i", { staticClass: "iconfont icon-delete" })]) : e._e(), e.selectWidget.prop === a.prop ? t(p, { staticClass: "widget-form-group__item--clone", attrs: { title: "复制", circle: "", plain: "", type: "primary" }, on: { click: function(n) {
2255
- return n.stopPropagation(), e.handleWidgetTableClone(e.column, a);
2256
- } } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1)], 1)];
2257
- })], 2), e.selectWidget.prop === e.column.prop ? t(p, { staticClass: "widget-action-delete", attrs: { title: "删除", circle: "", plain: "", size: "small", type: "danger" }, on: { click: function(a) {
2258
- return a.stopPropagation(), e.handleWidgetDelete(e.index);
2259
- } } }, [t("i", { staticClass: "iconfont icon-delete" })]) : e._e(), e.selectWidget.prop === e.column.prop ? t(p, { staticClass: "widget-action-clear", attrs: { title: "清空", circle: "", plain: "", size: "small", type: "warning" }, on: { click: function(a) {
2260
- return a.stopPropagation(), e.handleWidgetClear(e.index);
2261
- } } }, [t("i", { staticClass: "iconfont icon-clear" })]) : e._e(), e.selectWidget.prop === e.column.prop ? t(p, { staticClass: "widget-action-clone", attrs: { title: "复制", circle: "", plain: "", size: "small", type: "primary" }, on: { click: function(a) {
2262
- return a.stopPropagation(), e.handleWidgetCloneTable(e.index);
2263
- } } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1);
2264
- }, Oa = [], Wa = /* @__PURE__ */ h(
2265
- Fa,
2266
- Sa,
2267
- Oa,
2268
- !1,
2269
- null,
2270
- null
2271
- );
2272
- const Z = Wa.exports, Ia = {
2273
- name: "WidgetForm",
2274
- components: { Draggable: S, WidgetFormItem: O, WidgetFormTable: P, WidgetFormGroup: Z },
2275
- props: {
2276
- data: Object,
2277
- select: Object
2278
- },
2279
- data() {
2280
- return {
2281
- selectWidget: this.select,
2282
- form: {}
2283
- };
2284
- },
2285
- watch: {
2286
- select(l) {
2287
- this.selectWidget = l;
2288
- },
2289
- selectWidget: {
2290
- handler(l) {
2291
- this.$emit("update:select", l);
2292
- },
2293
- deep: !0
2294
- }
2295
- },
2296
- methods: {
2297
- handleSelectWidget(l) {
2298
- this.selectWidget = this.data.column[l];
2299
- },
2300
- handleWidgetAdd(l) {
2301
- const e = l.newIndex, t = _(this.data.column[e]);
2302
- t.prop || (t.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`), delete t.icon, delete t.subfield, t.type === "title" && (delete t.label, this.form[t.prop] = t.value), this.$set(this.data.column, e, t), this.handleSelectWidget(e), this.$emit("change");
2303
- },
2304
- handleWidgetDelete(l) {
2305
- this.data.column.length - 1 === l ? l === 0 ? this.selectWidget = {} : this.handleSelectWidget(l - 1) : this.handleSelectWidget(l + 1), this.$nextTick(() => {
2306
- this.data.column.splice(l, 1), this.$emit("change");
2307
- });
2308
- },
2309
- handleWidgetClone(l) {
2310
- const e = _(this.data.column[l]);
2311
- e.prop = `a${Date.now()}${Math.ceil(Math.random() * 99999)}`, this.data.column.push(e), this.$nextTick(() => {
2312
- this.handleSelectWidget(this.data.column.length - 1), this.$emit("change");
2313
- });
2314
- }
2315
- }
2316
- };
2317
- var Ea = function() {
2318
- var e = this, t = e._self._c;
2319
- return t("div", { staticClass: "widget-form-container" }, [t(I, { ref: "widgetForm", attrs: { "label-position": e.data.labelPosition || "left", "label-width": e.data.labelWidth ? `${e.data.labelWidth}px` : "100px", "label-suffix": e.data.labelSuffix, model: e.form, size: "small" } }, [t(de, { attrs: { gutter: e.data.gutter } }, [t("Draggable", { staticClass: "widget-form-list", attrs: { list: e.data.column, group: { name: "form" }, "ghost-class": "ghost", animation: 300 }, on: { add: e.handleWidgetAdd, end: function(a) {
2320
- return e.$emit("change");
2321
- } } }, [e._l(e.data.column, function(a, s) {
2322
- return [a.type === "dynamic" ? t("div", { key: s, staticClass: "widget-form-table", class: { active: e.selectWidget.prop === a.prop }, on: { click: function(n) {
2323
- return e.handleSelectWidget(s);
2324
- } } }, [t(P, { attrs: { data: e.data, column: a, index: s, select: e.selectWidget }, on: { "update:select": function(n) {
2325
- e.selectWidget = n;
2326
- }, change: function(n) {
2327
- return e.$emit("change");
2328
- } } })], 1) : a.type === "group" ? t("div", { key: s, staticClass: "widget-form-group", class: { active: e.selectWidget.prop === a.prop }, on: { click: function(n) {
2329
- return e.handleSelectWidget(s);
2330
- } } }, [t(Z, { attrs: { data: e.data, column: a, index: s, select: e.selectWidget }, on: { "update:select": function(n) {
2331
- e.selectWidget = n;
2332
- }, change: function(n) {
2333
- return e.$emit("change");
2334
- } } })], 1) : t(H, { key: s, attrs: { md: a.span || 12, xs: 24, offset: a.offset || 0 } }, [t(i, { staticClass: "widget-form-item", class: [{ active: e.selectWidget.prop === a.prop, required: a.required }, `avue-form__item--${a.labelPosition}` || ""], attrs: { label: a.label, "label-width": a.labelWidth && `${a.labelWidth}px`, prop: a.prop }, nativeOn: { click: function(n) {
2335
- return e.handleSelectWidget(s);
2336
- } } }, [t(O, { attrs: { item: a, params: a.params } }), e.selectWidget.prop === a.prop ? t(p, { staticClass: "widget-action-delete", attrs: { title: "删除", circle: "", plain: "", size: "small", type: "danger" }, on: { click: function(n) {
2337
- return n.stopPropagation(), e.handleWidgetDelete(s);
2338
- } } }, [t("i", { staticClass: "iconfont icon-delete" })]) : e._e(), e.selectWidget.prop === a.prop ? t(p, { staticClass: "widget-action-clone", attrs: { title: "复制", circle: "", plain: "", size: "small", type: "primary" }, on: { click: function(n) {
2339
- return n.stopPropagation(), e.handleWidgetClone(s);
2340
- } } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1)], 1)];
2341
- })], 2)], 1)], 1)], 1);
2342
- }, Ba = [], Ta = /* @__PURE__ */ h(
2343
- Ia,
2344
- Ea,
2345
- Ba,
2346
- !1,
2347
- null,
2348
- null
2349
- );
2350
- const ee = Ta.exports, za = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUMAAADXCAYAAACAszPmAAAAAXNSR0IArs4c6QAADXRJREFUeAHt3cuLZGcZB+BvLk2PM0ZxFMdJXEQCYRIialrUmPgXuM0qkI3GnVl4ScBtUEFFXOhCEBQ3oiDi36BGkWQ0gpgIZgK59EhIxhBn0nMfz+nqwq6e6upT019933vqPAVxuuty3vc8b/fPU3UufWB9ff1GciNAgMDABQ6363/y5MmBM8y3+mfPnmU2H5lnEwgt0P5OHwzdoeYIECBQSEAYFoJWhgCB2ALCMPZ8dEeAQCEBYVgIWhkCBGILCMPY89EdAQKFBIRhIWhlCBCILbB5aE3sFnVHgEAtgfaQk0Xddh7St6haO+vstj4zw/DPr26knz/3dnrr4vXN199/cjV9/cHjm19/9w/n0nP/vjSx3I9/aDU9+VA/Hv/e0+fSX89O9v/J21fTVz876n9ixeb4ZlEDnaOFqU/t+gMx9cXuJDAAgZlvk3/6l/8HYWtx9frynKxy/vIo4LfP+Nn1S+nbv3tz+12+JkBgIAIH2tPxdttqeOTXo03kb306pZUmNg/NjM5+ibW5/s7VyZ6feiala839v3h49hk57dbfbma2DCdNfddvgUX+PO/8HVpUrZ11pk2krT3zbfL4RW0ILlMQtut18EBK714Zr6F/CRAYusDMMPxE8xnhlWZTaeXg5aE7WX8CBJZcYGYYPrG1s2RRm69Lbmv1CBDokcDMMOzRemRp9f7bj6RrS7STKAuKhRAYiMDMMGwPn2lvj941DI2vPPC+YayotSRA4CaBmfuH2+MIdx5LeNMS3EGAAIElEJi5ZbgE6zfXKoy3hMcHjs/14q0nd9mNfyvL9RoCBBYrIAy3+doK3obhSwIDE5j5NnlgFlaXAIEBC8zcMmzPNR7dJs/hjer13Bsp/fZMSv+9Murw3mZ/yBfvHX39k3+k9MJ/Jju/p3n8sW2Pjx8dn3kz+1zrs2n24ynr49POpX7gw0fS45+x02c8N//mFyj5sU/JWtOkZobh+LOzvhxn+JsXU7qw7RS79tS6Zbmdv3TzudR/evViOv/7N9M3Pvf+ZVlN60GgmsDMc5PHXfUlDL/29Kjjpz6V0pFDy3UK4bRzqb/5bEpXmozc61zq8Rz9S4DAdIE9z03+TnOc4eHmU8VHPjJ9AVHvPdScd+xc6qjT0ReBmAIzd6D8rT3OcMc1/2Kuxqir9jPCu97TbBXOfPMfeQ30RoBALYGlio3xzpJamOoSINBfgZlh+MFjh9LrF66lJ/84WsGPNXuX+3Cl6758xrnfH5v2XOrLy7SXaL8gXk9gHwIzw/Cx+9+bfvzsW+ncxmhPZvTfuxfPXUntWSRDOZf6oZXmOKLmmowvvPB6uuOOOzZ/DF577bV04cKFiR+JY8eOeZzPIH4+XnnllbSxsTHx87+2tjbx/W7fzAzD+06sph99/sTU144Pu5n6YHNnjcfb4wPbs0iGEoa72bufwFAFVlZW0tWro+PrrlzZOuC4I0anQ2s6Lqv608YHS3//weqtFGngZ/9sjh9qbo+vvatIPUUI9EngpZdeSm0gdtky3PPQmj6t+BB7/fsb14a42taZQCeBo0ePpsuXu1+lf+bb5HHFoeyQGK+vfwkQ6L/AiRPTP+Lbbc06heFuL452/ymn6UYbiX4I9EZgqcLwS1sXXeiNvkYJEFiYQHtkRXs7depUpxpLFYad1niJnnTfBw6l5sxDNwIEpgjsPMRsylMm7lqqMGwv09XehrKFaC/yaN7+l0AOgaUKw53XK8wBZBkECAxDYOaFGoZB0N+1/MEzG6n9z40Agf0LLNWW4fHmwtznmotyP7F1LnV7Jesv3DNC6nKl651blvu9kvVHm8/0vrx1QPQPT2+knccFzvP4r56/lJ5/c9uVa5vVOtucN378iE8N9/9rYAnLKNCehjrPbanC8OHm7zv/8l8pvb11nGXtc6kvXrzYzCLP2SHr56834Td56e4TRw+kR+87Ms+8PZfAYATG5+t3XeFOp+MN5aDrrn+DofXY67mnT5/enMHdd9/ddRaeR4DAAgRuu+22PZfa/k77zHBPJk8gQKCPAu1xhuNjDbv0v1Rvk7ussOcQIDAMgXmPM7RlOIyfC2tJgMAeArYM9wC61Yfn3ZN1q3W8jgCBPALCMI/jTUuZd0/WTQtwBwECRQWEYVFuxQgQKCUw77szYbigyYz3YtlCXBCwxRLYQ2De3z1huAforT48756sW63jdQQI5BHoFIZ7HWCcpxVLIUCAQD6B8bsz1zPMZ2pJBAj0UGDed2eOM+zhkLVMgEB+gU5vk/OXXf4lzrsna/lFrCGB2ALCcEHzmXdP1oLasFgCBDoKCMOOUJ5GgEC/BOZ9d9YpDF3Ca/4fgjNnzqTV1dXNS30dPOij2fkFvYLA/gTmfXfWKQz319IwX339+vXU7s16+eWX05133rmJ0O7q37mHq/1/r/HQPM7Hz8eFicCY5/djfX39pt+vGzdupLW1tYll7vaNMNxNJtP9KysrmZZkMQQIzBJog6/9b/vt8OHuEedK19vkuh5c3uVK19sW60sCBIILuNJ18AFpjwCBcgI+2S9nrRIBAoEFhGHg4WiNAIFyAsKwnLVKBAgEFhCGgYejNQIEygkIw3LWKhEgEFhAGAYejtYIECgnIAzLWatEgEBgAWEYeDhaI0CgnIAwLGetEgECgQWEYeDhaI0AgXICnc5i7nrObrm2VSJAgEBeAVuGeT0tjQCBngoIw54OTtsECOQVEIZ5PS2NAIGeCgjDng5O2wQI5BXotAPF30DJi25pBAjEE7BlGG8mOiJAoIKAMKyAriQBAvEEhGG8meiIAIEKAsKwArqSBAjEExCG8WaiIwIEKggIwwroShIgEE9AGMabiY4IEKggIAwroCtJgEA8AWEYbyY6IkCggoAwrICuJAEC8QSEYbyZ6IgAgQoCwrACupIECMQTEIbxZqIjAgQqCAjDCuhKEiAQT0AYxpuJjggQqCAgDCugK0mAQDyBThd39dfx4g1ORwQI5BWwZZjX09IIEOipgDDs6eC0TYBAXgFhmNfT0ggQ6KmAMOzp4LRNgEBegU47UPx1vLzolkaAQDwBW4bxZqIjAgQqCAjDCuhKEiAQT0AYxpuJjggQqCAgDCugK0mAQDwBYRhvJjoiQKCCgDCsgK4kAQLxBIRhvJnoiACBCgLCsAK6kgQIxBMQhvFmoiMCBCoICMMK6EoSIBBPQBjGm4mOCBCoICAMK6ArSYBAPAFhGG8mOiJAoIKAMKyAriQBAvEEhGG8meiIAIEKAsKwArqSBAjEE+h0cVd/HS/e4HREgEBeAVuGeT0tjQCBngoIw54OTtsECOQVEIZ5PS2NAIGeCgjDng5O2wQI5BXotAPFX8fLi25pBAjEE7BlGG8mOiJAoIKAMKyAriQBAvEEhGG8meiIAIEKAsKwArqSBAjEExCG8WaiIwIEKggIwwroShIgEE9AGMabiY4IEKggIAwroCtJgEA8AWEYbyY6IkCggoAwrICuJAEC8QSEYbyZ6IgAgQoCwrACupIECMQTEIbxZqIjAgQqCAjDCuhKEiAQT0AYxpuJjggQqCDQ6XqG/iBUhckoSYBAUQFbhkW5FSNAIKqAMIw6GX0RIFBUQBgW5VaMAIGoAsIw6mT0RYBAUQFhWJRbMQIEogp02pvsr+NFHZ++CBDIJWDLMJek5RAg0GsBYdjr8WmeAIFcAsIwl6TlECDQawFh2OvxaZ4AgVwCwjCXpOUQINBrAWHY6/FpngCBXALCMJek5RAg0GsBYdjr8WmeAIFcAsIwl6TlECDQawFh2OvxaZ4AgVwCwjCXpOUQINBrAWHY6/FpngCBXALCMJek5RAg0GsBYdjr8WmeAIFcAp0u4eUPQuXithwCBKIK2DKMOhl9ESBQVEAYFuVWjACBqALCMOpk9EWAQFEBYViUWzECBKIKCMOok9EXAQJFBYRhUW7FCBCIKiAMo05GXwQIFBUQhkW5FSNAIKqAMIw6GX0RIFBUQBgW5VaMAIGoAsIw6mT0RYBAUQFhWJRbMQIEogoIw6iT0RcBAkUFhGFRbsUIEIgqIAyjTkZfBAgUFRCGRbkVI0AgqoAwjDoZfREgUFRAGBblVowAgagCwjDqZPRFgEBRAWFYlFsxAgSiCgjDqJPRFwECRQWEYVFuxQgQiCogDKNORl8ECBQVEIZFuRUjQCCqgDCMOhl9ESBQVEAYFuVWjACBqALCMOpk9EWAQFEBYViUWzECBKIKCMOok9EXAQJFBYRhUW7FCBCIKiAMo05GXwQIFBUQhkW5FSNAIKqAMIw6GX0RIFBUQBgW5VaMAIGoAsIw6mT0RYBAUQFhWJRbMQIEogoIw6iT0RcBAkUFhGFRbsUIEIgqIAyjTkZfBAgUFRCGRbkVI0AgqoAwjDoZfREgUFRAGBblVowAgagCwjDqZPRFgEBRAWFYlFsxAgSiCgjDqJPRFwECRQWEYVFuxQgQiCogDKNORl8ECBQVEIZFuRUjQCCqgDCMOhl9ESBQVEAYFuVWjACBqALCMOpk9EWAQFEBYViUWzECBKIKCMOok9EXAQJFBYRhUW7FCBCIKiAMo05GXwQIFBUQhkW5FSNAIKqAMIw6GX0RIFBU4H8RUTV123y9kQAAAABJRU5ErkJggg==", Pa = (l) => new Function(`return ${l}`)(), Ra = {
2351
- data() {
2352
- return {
2353
- historySteps: {
2354
- index: 0,
2355
- maxStep: 20,
2356
- steps: [],
2357
- storage: !1
2358
- }
2359
- };
2360
- },
2361
- watch: {
2362
- historySteps: {
2363
- handler(l) {
2364
- l.storage ? localStorage.setItem("avue-form-history", T(l)) : localStorage.removeItem("avue-form-history");
2365
- },
2366
- deep: !0
2367
- }
2368
- },
2369
- methods: {
2370
- initHistory(l) {
2371
- if (l.storage) {
2372
- const a = localStorage.getItem("avue-form-history");
2373
- if (a) {
2374
- this.historySteps = Pa(a);
2375
- const { index: s, steps: n } = this.historySteps;
2376
- return W(n[s]);
2377
- }
2378
- }
2379
- this.historySteps = {
2380
- ...this.historySteps,
2381
- ...l
2382
- };
2383
- const { index: e, steps: t } = this.historySteps;
2384
- return W(t[e]);
2385
- },
2386
- handleHistoryChange(l) {
2387
- this.historySteps.index === this.historySteps.maxStep - 1 ? this.historySteps.steps.shift() : this.historySteps.index++, this.historySteps.steps[this.historySteps.index] = W(l), this.historySteps.index < this.historySteps.steps.length - 1 && (this.historySteps.steps = this.historySteps.steps.slice(0, this.historySteps.index + 1));
2388
- },
2389
- handleUndo() {
2390
- return this.historySteps.index !== 0 && this.historySteps.index--, W(this.historySteps.steps[this.historySteps.index]);
2391
- },
2392
- handleRedo() {
2393
- return this.historySteps.index !== this.historySteps.steps.length - 1 && this.historySteps.index++, W(this.historySteps.steps[this.historySteps.index]);
2394
- }
2395
- }
2396
- }, Da = {
2397
- name: "FyFormDesign",
2398
- components: { Draggable: S, WidgetForm: ee, FormConfig: U, WidgetConfig: X, MonacoEditor: g },
2399
- mixins: [Ra],
2400
- props: {
2401
- options: {
2402
- type: [Object, String],
2403
- default: () => ({
2404
- column: []
2405
- })
2406
- },
2407
- storage: {
2408
- type: Boolean,
2409
- default: !1
2410
- },
2411
- asideLeftWidth: {
2412
- type: [String, Number],
2413
- default: "270px"
2414
- },
2415
- asideRightWidth: {
2416
- type: [String, Number],
2417
- default: "380px"
2418
- },
2419
- showGithubStar: Boolean,
2420
- toolbar: {
2421
- type: Array,
2422
- default: () => ["import", "generate", "preview", "clear"]
2423
- },
2424
- undoRedo: {
2425
- type: Boolean,
2426
- default: !0
2427
- },
2428
- includeFields: {
2429
- type: Array,
2430
- default: () => {
2431
- const l = [];
2432
- return D.forEach((e) => {
2433
- e.list.forEach((t) => {
2434
- l.push(t.type);
2435
- });
2436
- }), l;
2437
- }
2438
- },
2439
- customFields: {
2440
- type: Array
2441
- },
2442
- defaultValues: {
2443
- type: Object
2444
- }
2445
- },
2446
- data() {
2447
- return {
2448
- widgetEmpty: za,
2449
- fields: D,
2450
- widgetForm: {
2451
- column: [],
2452
- labelPosition: "left",
2453
- labelSuffix: ":",
2454
- labelWidth: 120,
2455
- gutter: 0,
2456
- menuBtn: !0,
2457
- submitBtn: !0,
2458
- submitText: "提交",
2459
- emptyBtn: !0,
2460
- emptyText: "清空",
2461
- menuPosition: "center"
2462
- },
2463
- option: {},
2464
- configTab: "form",
2465
- widgetFormSelect: {},
2466
- previewVisible: !1,
2467
- generateJsonVisible: !1,
2468
- importJsonVisible: !1,
2469
- importJson: {},
2470
- form: {},
2471
- configOption: {
2472
- generateType: "json",
2473
- space: 2,
2474
- quoteType: "single",
2475
- dropQuotesOnKeys: !0
2476
- }
2477
- };
2478
- },
2479
- computed: {
2480
- leftWidth() {
2481
- return typeof this.asideLeftWidth == "string" ? this.asideLeftWidth : `${this.asideLeftWidth}px`;
2482
- },
2483
- rightWidth() {
2484
- return typeof this.asideRightWidth == "string" ? this.asideRightWidth : `${this.asideRightWidth}px`;
2485
- }
2486
- },
2487
- watch: {
2488
- options: {
2489
- handler(l) {
2490
- let e = l;
2491
- if (typeof e == "string")
2492
- try {
2493
- e = y(`(${e})`);
2494
- } catch {
2495
- console.error("非法配置"), e = { column: [] };
2496
- }
2497
- this.transAvueOptionsToFormDesigner(e).then((t) => {
2498
- this.widgetForm = { ...this.widgetForm, ...t };
2499
- });
2500
- },
2501
- deep: !0
2502
- },
2503
- widgetFormSelect: {
2504
- handler() {
2505
- this.configTab === "form" && (this.configTab = "widget");
2506
- },
2507
- deep: !0
2508
- }
2509
- },
2510
- mounted() {
2511
- this.handleLoadStorage(), this.handleLoadCss();
2512
- },
2513
- methods: {
2514
- // 组件初始化时加载本地存储中的options(需开启storage),若不存在则读取用户配置的options
2515
- async handleLoadStorage() {
2516
- let l = this.options;
2517
- if (typeof l == "string")
2518
- try {
2519
- l = y(l);
2520
- } catch {
2521
- console.error("非法配置"), l = { column: [] };
2522
- }
2523
- l.column || (l.column = []), this.widgetForm = this.initHistory({
2524
- index: 0,
2525
- maxStep: 20,
2526
- steps: [await this.transAvueOptionsToFormDesigner({ ...this.widgetForm, ...l })],
2527
- storage: this.storage
2528
- }), this.undoRedo && (window.addEventListener("keydown", this.undoRedoHandler, !1), this.$once("hook:beforeDestroy", () => {
2529
- document.removeEventListener("click", this.undoRedoHandler);
2530
- }));
2531
- },
2532
- undoRedoHandler(l) {
2533
- (l.metaKey && !l.shiftKey && l.keyCode === 90 || l.ctrlKey && !l.shiftKey && l.keyCode === 90) && (this.widgetForm = this.handleUndo()), (l.metaKey && l.shiftKey && l.keyCode === 90 || l.ctrlKey && l.shiftKey && l.keyCode === 90 || l.ctrlKey && l.keyCode === 89) && (this.widgetForm = this.handleRedo());
2534
- },
2535
- // 加载icon
2536
- handleLoadCss() {
2537
- const l = document.getElementsByTagName("head")[0], e = document.createElement("link");
2538
- e.rel = "stylesheet", e.type = "text/css", e.href = "https://at.alicdn.com/t/font_1254447_zc9iezc230c.css", l.appendChild(e);
2539
- },
2540
- // Avue文档链接
2541
- handleAvueDoc() {
2542
- window.open("https://avuejs.com/form/form.html", "_blank");
2543
- },
2544
- // 左侧字段点击
2545
- handleFieldClick(l) {
2546
- const e = this.widgetForm.column.findIndex((a) => a.prop === this.widgetFormSelect.prop) + 1;
2547
- let t = 0;
2548
- e === -1 ? (this.widgetForm.column.push(l), t = this.widgetForm.column.length - 1) : (this.widgetForm.column.splice(e, 0, l), t = e), this.$refs.widgetForm.handleWidgetAdd({ newIndex: t });
2549
- },
2550
- // 预览 - 弹窗
2551
- handlePreview() {
2552
- !this.widgetForm.column || this.widgetForm.column.length === 0 ? this.$message.error("没有需要展示的内容") : this.transformToAvueOptions(this.widgetForm, !0).then((l) => {
2553
- this.option = l, this.previewVisible = !0;
2554
- });
2555
- },
2556
- // 导入JSON - 弹窗 - 确定
2557
- handleImportJsonSubmit() {
2558
- try {
2559
- this.transAvueOptionsToFormDesigner(this.importJson).then((l) => {
2560
- this.widgetForm = l, this.importJsonVisible = !1, this.handleHistoryChange(this.widgetForm);
2561
- });
2562
- } catch (l) {
2563
- this.$message.error(l.message);
2564
- }
2565
- },
2566
- // 生成JSON - 弹窗
2567
- handleGenerateJson() {
2568
- this.transformToAvueOptions(this.widgetForm).then((l) => {
2569
- this.option = l, this.generateJsonVisible = !0;
2570
- });
2571
- },
2572
- // 生成JSON - 弹窗 - 确定
2573
- handleGenerate() {
2574
- this.transformToAvueOptions(this.widgetForm).then((l) => {
2575
- this.configOption.generateType && this.configOption.generateType === "string" ? this.$emit(
2576
- "submit",
2577
- T(l, {
2578
- minify: !0,
2579
- ...this.configOption
2580
- })
2581
- ) : this.$emit("submit", l);
2582
- });
2583
- },
2584
- // 生成JSON - 弹窗 - 拷贝
2585
- handleCopy() {
2586
- this.transformToAvueOptions(this.widgetForm).then((l) => {
2587
- this.$Clipboard({
2588
- text: T(l, {
2589
- minify: !0,
2590
- ...this.configOption
2591
- })
2592
- }).then(() => {
2593
- this.$message.success("复制成功");
2594
- }).catch(() => {
2595
- this.$message.error("复制失败");
2596
- });
2597
- });
2598
- },
2599
- // 预览 - 弹窗 - 确定
2600
- handlePreviewSubmit(l, e) {
2601
- e ? this.$alert(this.form).then(() => {
2602
- e();
2603
- }).catch(() => {
2604
- e();
2605
- }) : this.$refs.form.validate((t, a) => {
2606
- t && this.$alert(this.form).then(() => {
2607
- a();
2608
- }).catch(() => {
2609
- a();
2610
- });
2611
- });
2612
- },
2613
- // 预览 - 弹窗 - 关闭前
2614
- handleBeforeClose() {
2615
- this.$refs.form.resetForm(), this.form = {}, this.previewVisible = !1;
2616
- },
2617
- // 清空
2618
- handleClear() {
2619
- this.widgetForm && this.widgetForm.column && this.widgetForm.column.length > 0 ? this.$confirm("确定要清空吗?", "警告", {
2620
- type: "warning"
2621
- }).then(() => {
2622
- this.$set(this.widgetForm, "column", []), this.$set(this, "form", {}), this.$set(this, "widgetFormSelect", {}), this.handleHistoryChange(this.widgetForm);
2623
- }).catch(() => {
2624
- }) : this.$message.error("没有需要清空的内容");
2625
- },
2626
- // 表单设计器配置项 转化为 Avue配置项
2627
- transformToAvueOptions(l, e = !1) {
2628
- return new Promise((t, a) => {
2629
- try {
2630
- const s = _(l);
2631
- for (const n in s)
2632
- q(s[n]) && delete s[n];
2633
- for (let n = 0; n < s.column.length; n++) {
2634
- const o = s.column[n];
2635
- if (e && (["change", "blur", "click", "focus"].forEach((u) => {
2636
- o[u] && (o[u] = y(`${o[u]}`.replace(/this/g, "_this")));
2637
- }), o.event && Object.keys(o.event).forEach((u) => {
2638
- o.event[u] = y(`${o.event[u]}`.replace(/this/g, "_this"));
2639
- })), o.type === "dynamic" && o.children && o.children.column && o.children.column.length > 0)
2640
- o.children.column.forEach((u) => {
2641
- delete u.subfield;
2642
- }), this.transformToAvueOptions(o.children, e).then((u) => {
2643
- o.children = u;
2644
- });
2645
- else if (o.type === "group") {
2646
- s.group || (s.group = []);
2647
- const m = {
2648
- label: o.label,
2649
- icon: o.icon,
2650
- prop: o.prop,
2651
- arrow: o.arrow,
2652
- collapse: o.collapse,
2653
- display: o.display
2654
- };
2655
- this.transformToAvueOptions(o.children, e).then((u) => {
2656
- m.column = u.column, s.group.push(m);
2657
- }), s.column.splice(n, 1), n--;
2658
- } else if (["checkbox", "radio", "tree", "cascader", "select"].includes(o.type)) {
2659
- if (o.dicOption === "static") {
2660
- delete o.dicUrl, delete o.dicMethod, delete o.dicQuery, delete o.dicQueryConfig;
2661
- const { label: m, value: u, desc: x } = o.props;
2662
- o.dicData.forEach((v) => {
2663
- if (v.label) {
2664
- const k = v.label;
2665
- delete v.label, v[m] = k;
2666
- }
2667
- if (v.value) {
2668
- const k = v.value;
2669
- delete v.value, v[u] = k;
2670
- }
2671
- if (v.desc) {
2672
- const k = v.desc;
2673
- delete v.desc, v[x] = k;
2674
- }
2675
- });
2676
- } else if (o.dicOption === "remote")
2677
- if (delete o.dicData, o.dicQueryConfig && o.dicQueryConfig.length > 0) {
2678
- const m = {};
2679
- o.dicQueryConfig.forEach((u) => {
2680
- u.key && u.value && (m[u.key] = u.value);
2681
- }), o.dicQuery = m, delete o.dicQueryConfig;
2682
- } else delete o.dicQueryConfig;
2683
- delete o.dicOption;
2684
- } else if (["upload"].includes(o.type)) {
2685
- if (o.headersConfig && o.headersConfig.length > 0) {
2686
- const m = {};
2687
- o.headersConfig.forEach((u) => {
2688
- u.key && u.value && (m[u.key] = u.value);
2689
- }), o.headers = m;
2690
- } else delete o.headers;
2691
- if (delete o.headersConfig, o.dataConfig && o.dataConfig.length > 0) {
2692
- const m = {};
2693
- o.dataConfig.forEach((u) => {
2694
- u.key && u.value && (m[u.key] = u.value);
2695
- }), o.data = m;
2696
- } else delete o.data;
2697
- delete o.dataConfig;
2698
- }
2699
- for (const m in o)
2700
- q(o[m]) && delete o[m];
2701
- }
2702
- t(s);
2703
- } catch (s) {
2704
- a(s);
2705
- }
2706
- });
2707
- },
2708
- // Avue配置项 转化为 表单设计器配置项
2709
- transAvueOptionsToFormDesigner(l) {
2710
- typeof l == "string" && (l = y(l));
2711
- const e = _(l);
2712
- return new Promise((t, a) => {
2713
- try {
2714
- if (e.column && e.column.length > 0 && e.column.forEach((s) => {
2715
- if (s.type === "dynamic" && s.children && s.children.column && s.children.column.length > 0)
2716
- s.children.column.forEach((o) => {
2717
- o.subfield = !0;
2718
- }), this.transAvueOptionsToFormDesigner(s.children).then((o) => {
2719
- s.children = o;
2720
- });
2721
- else if (["checkbox", "radio", "tree", "cascader", "select"].includes(s.type)) {
2722
- if (!s.dicData && s.dicQuery && typeof s.dicQuery == "object") {
2723
- const n = [];
2724
- for (const o in s.dicQuery)
2725
- n.push({
2726
- key: o,
2727
- value: s.dicQuery[o],
2728
- $cellEdit: !0
2729
- });
2730
- s.dicQueryConfig = n;
2731
- }
2732
- s.dicUrl ? s.dicOption = "remote" : s.dicOption = "static", s.dicData ? s.props && s.dicData.forEach((n) => {
2733
- const { label: o, value: m, desc: u } = s.props;
2734
- if (o) {
2735
- const x = n[o];
2736
- delete n[o], n.label = x;
2737
- }
2738
- if (m) {
2739
- const x = n[m];
2740
- delete n[m], n.value = x;
2741
- }
2742
- if (u) {
2743
- const x = n[u];
2744
- delete n[u], n.desc = x;
2745
- }
2746
- }) : s.dicData = [];
2747
- } else if (["upload"].includes(s.type)) {
2748
- if (s.headers && typeof s.headers == "object") {
2749
- const n = [];
2750
- for (const o in s.headers)
2751
- n.push({
2752
- key: o,
2753
- value: s.headers[o],
2754
- $cellEdit: !0
2755
- });
2756
- s.headersConfig = n;
2757
- } else s.headersConfig = [];
2758
- if (s.data && typeof s.data == "object") {
2759
- const n = [];
2760
- for (const o in s.data)
2761
- n.push({
2762
- key: o,
2763
- value: s.data[o],
2764
- $cellEdit: !0
2765
- });
2766
- s.dataConfig = n;
2767
- } else s.dataConfig = [];
2768
- }
2769
- }), e.group && e.group.length > 0) {
2770
- for (let s = 0; s < e.group.length; s++) {
2771
- e.column || (e.column = []);
2772
- const n = e.group[s], o = {
2773
- type: "group",
2774
- label: n.label,
2775
- icon: n.icon,
2776
- prop: n.prop,
2777
- arrow: n.arrow,
2778
- collapse: n.collapse,
2779
- display: n.display
2780
- };
2781
- this.transAvueOptionsToFormDesigner(n).then((m) => {
2782
- o.children = m, e.column.push(o);
2783
- });
2784
- }
2785
- delete e.group;
2786
- }
2787
- t(e);
2788
- } catch (s) {
2789
- a(s);
2790
- }
2791
- });
2792
- },
2793
- async getData(l = "json", e = {}) {
2794
- if (l === "string")
2795
- return T(await this.transformToAvueOptions(this.widgetForm), {
2796
- minify: !0,
2797
- ...e
2798
- });
2799
- if (l === "app") {
2800
- const t = await this.transformToAvueOptions(this.widgetForm);
2801
- return this.parseJson(t), t;
2802
- } else return await this.transformToAvueOptions(this.widgetForm);
2803
- },
2804
- parseJson(l) {
2805
- for (const e in l) {
2806
- const t = l[e];
2807
- t && t.length > 0 && typeof t == "object" || typeof t == "object" ? this.parseJson(t) : typeof t == "function" && (l[e] = `${t}`);
2808
- }
2809
- }
2810
- }
2811
- };
2812
- var Ma = function() {
2813
- var e = this, t = e._self._c;
2814
- return t(V, { staticClass: "form-designer" }, [t(j, { attrs: { width: e.leftWidth } }, [t("div", { staticClass: "fields-list" }, [e.customFields && e.customFields.length > 0 ? [e.customFields[0].title && e.customFields[0].list && e.customFields[0].list.length > 0 ? [e._l(e.customFields, function(a, s) {
2815
- return [t("div", { key: `f_${s}`, staticClass: "field-title" }, [e._v(" " + e._s(a.title) + " ")]), t("Draggable", { key: `d_${s}`, attrs: { tag: "ul", list: a.list, group: { name: "form", pull: "clone", put: !1 }, "ghost-class": "ghost", sort: !1 } }, [e._l(a.list, function(n, o) {
2816
- return [t("li", { key: `c_${o}`, staticClass: "field-label" }, [t("a", { on: { click: function(m) {
2817
- return e.handleFieldClick(n);
2818
- } } }, [t("i", { staticClass: "icon iconfont", class: n.icon }), t("span", [e._v(e._s(n.title || n.label))])])])];
2819
- })], 2)];
2820
- })] : [t($, { staticClass: "field-title", attrs: { underline: !1, href: "https://github.com/sscfaith/avue-form-design/blob/master/CHANGELOG.md#2020-09-22", target: "_blank" } }, [e._v(" 自定义字段 "), t("i", { staticClass: "el-icon-question" })]), t("Draggable", { attrs: { tag: "ul", list: e.customFields, group: { name: "form", pull: "clone", put: !1 }, "ghost-class": "ghost", sort: !1 } }, [e._l(e.customFields, function(a, s) {
2821
- return [a.tips ? t(me, { key: s, attrs: { effect: "dark", content: a.tips } }, [t("li", { key: s, staticClass: "field-label" }, [t("a", { staticStyle: { padding: "0 5px" }, on: { click: function(n) {
2822
- return e.handleFieldClick(a);
2823
- } } }, [t("i", { class: a.icon }), t("span", { staticStyle: { "margin-left": "5px" } }, [e._v(e._s(a.title || a.label))])])])]) : t("li", { key: s, staticClass: "field-label" }, [t("a", { staticStyle: { padding: "0 5px" }, on: { click: function(n) {
2824
- return e.handleFieldClick(a);
2825
- } } }, [t("i", { class: a.icon }), t("span", { staticStyle: { "margin-left": "5px" } }, [e._v(e._s(a.title || a.label))])])])];
2826
- })], 2)]] : e._e(), e._l(e.fields, function(a, s) {
2827
- return t("div", { key: s }, [a.list.find((n) => e.includeFields.includes(n.type)) ? [t("div", { staticClass: "field-title" }, [e._v(" " + e._s(a.title) + " ")]), t("Draggable", { attrs: { tag: "ul", list: a.list, group: { name: "form", pull: "clone", put: !1 }, "ghost-class": "ghost", sort: !1 } }, [e._l(a.list, function(n, o) {
2828
- return [e.includeFields.includes(n.type) ? t("li", { key: `c_${o}`, staticClass: "field-label" }, [t("a", { on: { click: function(m) {
2829
- return e.handleFieldClick(n);
2830
- } } }, [t("i", { staticClass: "icon iconfont", class: n.icon }), t("span", [e._v(e._s(n.title || n.label))])])]) : e._e()];
2831
- })], 2)] : e._e()], 2);
2832
- })], 2)]), t(V, { staticClass: "widget-container", attrs: { direction: "vertical" } }, [t(ue, { staticClass: "widget-container-header" }, [t("div", [e.undoRedo ? [t(p, { attrs: { type: "text", size: "medium", icon: "el-icon-refresh-left", disabled: e.historySteps.index === 0 }, on: { click: function(a) {
2833
- e.widgetForm = e.handleUndo();
2834
- } } }, [e._v(" 撤销 ")]), t(p, { attrs: { type: "text", size: "medium", icon: "el-icon-refresh-right", disabled: e.historySteps.index === e.historySteps.steps.length - 1 }, on: { click: function(a) {
2835
- e.widgetForm = e.handleRedo();
2836
- } } }, [e._v(" 重做 ")])] : e._e()], 2), t("div", { staticStyle: { display: "flex", "align-items": "center" } }, [e.showGithubStar ? t("iframe", { staticStyle: { "margin-left": "10px" }, attrs: { src: "https://ghbtns.com/github-btn.html?user=sscfaith&repo=avue-form-design&type=star&count=true", frameborder: "0", scrolling: "0", width: "100", height: "20", title: "GitHub" } }) : e._e(), e._t("toolbar-left"), e.toolbar.includes("avue-doc") ? t(p, { attrs: { type: "text", size: "medium", icon: "el-icon-document" }, on: { click: e.handleAvueDoc } }, [e._v(" Avue文档 ")]) : e._e(), e.toolbar.includes("import") ? t(p, { attrs: { type: "text", size: "medium", icon: "el-icon-upload2" }, on: { click: function(a) {
2837
- e.importJsonVisible = !0;
2838
- } } }, [e._v(" 导入JSON ")]) : e._e(), e.toolbar.includes("generate") ? t(p, { attrs: { type: "text", size: "medium", icon: "el-icon-download" }, on: { click: e.handleGenerateJson } }, [e._v(" 生成JSON ")]) : e._e(), e.toolbar.includes("preview") ? t(p, { attrs: { type: "text", size: "medium", icon: "el-icon-view" }, on: { click: e.handlePreview } }, [e._v(" 预览 ")]) : e._e(), e.toolbar.includes("clear") ? t(p, { staticClass: "danger", attrs: { type: "text", size: "medium", icon: "el-icon-delete" }, on: { click: e.handleClear } }, [e._v(" 清空 ")]) : e._e(), e._t("toolbar")], 2)]), t(pe, { style: { background: e.widgetForm.column.length === 0 ? `url(${e.widgetEmpty}) no-repeat 50%` : "" } }, [t(ee, { ref: "widgetForm", attrs: { data: e.widgetForm, select: e.widgetFormSelect }, on: { "update:select": function(a) {
2839
- e.widgetFormSelect = a;
2840
- }, change: function(a) {
2841
- return e.handleHistoryChange(e.widgetForm);
2842
- } } })], 1)], 1), t(j, { staticClass: "widget-config-container", attrs: { width: e.rightWidth } }, [t(Q, { attrs: { stretch: "" }, model: { value: e.configTab, callback: function(a) {
2843
- e.configTab = a;
2844
- }, expression: "configTab" } }, [t(F, { staticStyle: { padding: "0 10px" }, attrs: { label: "字段属性", name: "widget" } }, [t(X, { attrs: { data: e.widgetFormSelect, "default-values": e.defaultValues } })], 1), t(F, { staticStyle: { padding: "0 10px" }, attrs: { label: "表单属性", name: "form", lazy: "" } }, [t(U, { attrs: { data: e.widgetForm } })], 1)], 1)], 1), t(E, { attrs: { title: "导入JSON", visible: e.importJsonVisible, size: "50%", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(a) {
2845
- e.importJsonVisible = a;
2846
- } } }, [t(g, { attrs: { "key-index": "import", height: "82%" }, model: { value: e.importJson, callback: function(a) {
2847
- e.importJson = a;
2848
- }, expression: "importJson" } }), t("div", { staticClass: "afd-drawer-foot" }, [t(p, { attrs: { size: "medium", type: "primary" }, on: { click: e.handleImportJsonSubmit } }, [e._v(" 确定 ")]), t(p, { attrs: { size: "medium", type: "danger" }, on: { click: function(a) {
2849
- e.importJsonVisible = !1;
2850
- } } }, [e._v(" 取消 ")])], 1)], 1), t(E, { attrs: { title: "生成JSON", visible: e.generateJsonVisible, size: "50%", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(a) {
2851
- e.generateJsonVisible = a;
2852
- } } }, [t(g, { attrs: { "key-index": "generate", height: "82%", "read-only": !0 }, model: { value: e.option, callback: function(a) {
2853
- e.option = a;
2854
- }, expression: "option" } }), t("div", { staticClass: "afd-drawer-foot" }, [t(p, { attrs: { size: "medium", type: "primary" }, on: { click: e.handleGenerate } }, [e._v(" 生成 ")]), t(B, { attrs: { placement: "top", trigger: "hover", width: "350px" }, scopedSlots: e._u([{ key: "reference", fn: function() {
2855
- return [t(p, { staticStyle: { "margin-left": "10px" }, attrs: { size: "medium", type: "primary" }, on: { click: e.handleCopy } }, [e._v(" 复制 ")])];
2856
- }, proxy: !0 }]) }, [t(I, { staticStyle: { padding: "0 20px" }, attrs: { "label-suffix": ":", "label-width": "180px", "label-position": "left" }, model: { value: e.configOption, callback: function(a) {
2857
- e.configOption = a;
2858
- }, expression: "configOption" } }, [t(i, { attrs: { label: "类型" } }, [t(B, { staticStyle: { "margin-right": "15px" }, attrs: { placement: "top-start", trigger: "hover", content: "复制json对象" }, scopedSlots: e._u([{ key: "reference", fn: function() {
2859
- return [t(w, { attrs: { label: "json" }, model: { value: e.configOption.generateType, callback: function(a) {
2860
- e.$set(e.configOption, "generateType", a);
2861
- }, expression: "configOption.generateType" } }, [e._v(" json ")])];
2862
- }, proxy: !0 }]) }), t(B, { attrs: { placement: "top-start", trigger: "hover", content: "复制string字符串,可直接用于后端保存无需再次处理。" }, scopedSlots: e._u([{ key: "reference", fn: function() {
2863
- return [t(w, { attrs: { label: "string" }, model: { value: e.configOption.generateType, callback: function(a) {
2864
- e.$set(e.configOption, "generateType", a);
2865
- }, expression: "configOption.generateType" } }, [e._v(" string ")])];
2866
- }, proxy: !0 }]) })], 1), t(i, { attrs: { label: "缩进长度-空格数量" } }, [t(le, { attrs: { "show-stops": "", marks: { 1: "1", 2: "2", 3: "3", 4: "4" }, min: 1, max: 4, step: 1 }, model: { value: e.configOption.space, callback: function(a) {
2867
- e.$set(e.configOption, "space", a);
2868
- }, expression: "configOption.space" } })], 1), t(i, { attrs: { label: "引号类型" } }, [t(c, { attrs: { "active-value": "single", "inactive-value": "double", "active-text": "单引号", "inactive-text": "双引号" }, model: { value: e.configOption.quoteType, callback: function(a) {
2869
- e.$set(e.configOption, "quoteType", a);
2870
- }, expression: "configOption.quoteType" } })], 1), t(i, { attrs: { label: "移除key的引号" } }, [t(c, { model: { value: e.configOption.dropQuotesOnKeys, callback: function(a) {
2871
- e.$set(e.configOption, "dropQuotesOnKeys", a);
2872
- }, expression: "configOption.dropQuotesOnKeys" } })], 1), t(i, { attrs: { label: "移除数字字符串的引号" } }, [t(c, { model: { value: e.configOption.dropQuotesOnNumbers, callback: function(a) {
2873
- e.$set(e.configOption, "dropQuotesOnNumbers", a);
2874
- }, expression: "configOption.dropQuotesOnNumbers" } })], 1)], 1)], 1)], 1)], 1), t(E, { attrs: { title: "预览", visible: e.previewVisible, size: "60%", "append-to-body": "", "before-close": e.handleBeforeClose }, on: { "update:visible": function(a) {
2875
- e.previewVisible = a;
2876
- } } }, [e.previewVisible ? t(ae, { ref: "form", staticClass: "afd-preview-form", attrs: { option: e.option }, on: { submit: e.handlePreviewSubmit }, model: { value: e.form, callback: function(a) {
2877
- e.form = a;
2878
- }, expression: "form" } }) : e._e(), t("div", { staticClass: "afd-drawer-foot" }, [t(p, { attrs: { size: "medium", type: "primary" }, on: { click: e.handlePreviewSubmit } }, [e._v(" 确定 ")]), t(p, { attrs: { size: "medium", type: "danger" }, on: { click: e.handleBeforeClose } }, [e._v(" 取消 ")])], 1)], 1)], 1);
2879
- }, Qa = [], Ka = /* @__PURE__ */ h(
2880
- Da,
2881
- Ma,
2882
- Qa,
2883
- !1,
2884
- null,
2885
- null
2886
- );
2887
- const Tl = Ka.exports;
2888
- export {
2889
- Tl as default
2890
- };
1
+ import { t as e } from "../chunks/FyFormDesign.DEWT6LsX.mjs";
2
+ export { e as default };