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