@web-utils/component 2.7.29 → 2.7.31

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 (329) hide show
  1. package/dist/chunks/{config.7dec2bf2.js → config.75161c38.js} +29 -29
  2. package/dist/chunks/confirmable-mixin.851d6299.js +137 -0
  3. package/dist/chunks/dataformat.b8c8c01a.js +237 -0
  4. package/dist/chunks/detail.6135ade5.js +55 -0
  5. package/dist/chunks/dic.e57b75f2.js +215 -0
  6. package/dist/chunks/{event.fc358074.js → event.812c361c.js} +54 -23
  7. package/dist/chunks/{form-input-mixin.760cd65d.js → form-input-mixin.3e63b57f.js} +4 -4
  8. package/dist/chunks/{form-item-mixin.fa314b67.js → form-item-mixin.a56c101a.js} +44 -17
  9. package/dist/chunks/{form-pick-mixin.c4e0391b.js → form-pick-mixin.822300f3.js} +1 -1
  10. package/dist/chunks/{init.e0133910.js → init.38cbb3a2.js} +41 -21
  11. package/dist/chunks/{input-number-mixin.6849fa63.js → input-number-mixin.44b78389.js} +4 -4
  12. package/dist/chunks/{mixins.6a394a6c.js → mixins.e1939731.js} +3 -2
  13. package/dist/chunks/{packages.419bde01.js → packages.c4ea639d.js} +12 -6
  14. package/dist/chunks/{permission.07c49abf.js → permission.9c766972.js} +6 -1
  15. package/dist/chunks/slot.55598d0f.js +35 -0
  16. package/dist/chunks/{tab-mixin.9d568df9.js → tab-mixin.9d848bf6.js} +29 -11
  17. package/dist/chunks/util.b0d0b0ad.js +478 -0
  18. package/dist/chunks/{utils.d7f73f8d.js → utils.2a3ffac9.js} +89 -24
  19. package/dist/chunks/{utils.f44207f4.js → utils.a8891d2c.js} +9 -5
  20. package/dist/chunks/vueComponentNormalizer.9c6b8b3d.js +59 -0
  21. package/dist/components/address-input/index.js +30 -17
  22. package/dist/components/address-input/style.css +15 -1
  23. package/dist/components/affix/index.js +78 -28
  24. package/dist/components/affix/style.css +5 -1
  25. package/dist/components/aside-menu/index.js +14 -8
  26. package/dist/components/aside-menu/style.css +9 -1
  27. package/dist/components/avatar/index.js +33 -15
  28. package/dist/components/avatar/style.css +57 -1
  29. package/dist/components/awesome-button/index.js +45 -31
  30. package/dist/components/base.css +410 -1
  31. package/dist/components/capsule-tab/index.js +13 -7
  32. package/dist/components/capsule-tab/style.css +32 -1
  33. package/dist/components/card/index.js +33 -20
  34. package/dist/components/card/style.css +90 -1
  35. package/dist/components/carousel/index.js +18 -12
  36. package/dist/components/carousel/style.css +41 -1
  37. package/dist/components/chat/index.js +245 -139
  38. package/dist/components/chat/style.css +279 -1
  39. package/dist/components/chunk-file-uploader/index.js +63 -29
  40. package/dist/components/chunk-file-uploader/style.css +4 -1
  41. package/dist/components/chunk-file-uploader-button/index.js +15 -9
  42. package/dist/components/chunk-file-uploader-button/style.css +17 -1
  43. package/dist/components/chunk-file-uploader-drop/index.js +45 -27
  44. package/dist/components/chunk-file-uploader-drop/style.css +12 -1
  45. package/dist/components/chunk-file-uploader-file/index.js +150 -73
  46. package/dist/components/chunk-file-uploader-file/style.css +125 -1
  47. package/dist/components/chunk-file-uploader-files/index.js +15 -9
  48. package/dist/components/chunk-file-uploader-files/style.css +9 -1
  49. package/dist/components/chunk-file-uploader-list/index.js +16 -10
  50. package/dist/components/chunk-file-uploader-list/style.css +9 -1
  51. package/dist/components/chunk-file-uploader-un-support/index.js +18 -10
  52. package/dist/components/chunk-file-uploader-un-support/style.css +6 -1
  53. package/dist/components/code-mirror-editor/index.js +75 -47
  54. package/dist/components/code-mirror-editor/style.css +17 -1
  55. package/dist/components/color-picker/index.js +62 -39
  56. package/dist/components/column/index.js +54 -29
  57. package/dist/components/column-default/index.js +47 -33
  58. package/dist/components/column-dynamic/index.js +26 -19
  59. package/dist/components/column-menu/index.js +98 -86
  60. package/dist/components/column-slot/index.js +135 -75
  61. package/dist/components/comment/index.js +28 -15
  62. package/dist/components/comment/style.css +92 -1
  63. package/dist/components/confirm-button/index.js +7 -5
  64. package/dist/components/confirmable/index.js +5 -4
  65. package/dist/components/context-menu/index.js +54 -32
  66. package/dist/components/context-menu/style.css +88 -1
  67. package/dist/components/count-up/index.js +55 -38
  68. package/dist/components/custom-scrollbar/index.js +45 -21
  69. package/dist/components/data-box/index.js +22 -16
  70. package/dist/components/data-box/style.css +58 -1
  71. package/dist/components/data-card/index.js +21 -15
  72. package/dist/components/data-card/style.css +46 -1
  73. package/dist/components/data-cardtext/index.js +19 -13
  74. package/dist/components/data-cardtext/style.css +36 -1
  75. package/dist/components/data-display/index.js +22 -16
  76. package/dist/components/data-display/style.css +37 -1
  77. package/dist/components/data-icons/index.js +23 -17
  78. package/dist/components/data-icons/style.css +53 -1
  79. package/dist/components/data-imgtext/index.js +26 -20
  80. package/dist/components/data-imgtext/style.css +70 -1
  81. package/dist/components/data-operatext/index.js +20 -14
  82. package/dist/components/data-operatext/style.css +81 -1
  83. package/dist/components/data-panel/index.js +21 -15
  84. package/dist/components/data-panel/style.css +37 -1
  85. package/dist/components/data-pay/index.js +29 -23
  86. package/dist/components/data-pay/style.css +102 -1
  87. package/dist/components/data-price/index.js +19 -13
  88. package/dist/components/data-price/style.css +81 -1
  89. package/dist/components/data-progress/index.js +26 -20
  90. package/dist/components/data-progress/style.css +30 -1
  91. package/dist/components/data-rotate/index.js +21 -15
  92. package/dist/components/data-rotate/style.css +50 -1
  93. package/dist/components/data-table-picker/index.js +47 -28
  94. package/dist/components/data-tabs/index.js +22 -16
  95. package/dist/components/data-tabs/style.css +70 -1
  96. package/dist/components/dialog-column/index.js +46 -33
  97. package/dist/components/dialog-excel/index.js +102 -53
  98. package/dist/components/dialog-filter/index.js +64 -51
  99. package/dist/components/dialog-form/index.js +56 -115
  100. package/dist/components/dialog-form/style.css +10 -1
  101. package/dist/components/dynamic-table/index.js +66 -42
  102. package/dist/components/dynamic-table/style.css +30 -1
  103. package/dist/components/e-charts/index.js +127 -46
  104. package/dist/components/e-charts/style.css +10 -1
  105. package/dist/components/easy-popup/index.js +32 -14
  106. package/dist/components/easy-popup/style.css +18 -1
  107. package/dist/components/editable-progress/index.js +64 -31
  108. package/dist/components/editable-progress/style.css +37 -1
  109. package/dist/components/editable-tree/index.js +513 -287
  110. package/dist/components/editable-tree/style.css +82 -1
  111. package/dist/components/egd-collapse/index.js +25 -12
  112. package/dist/components/egd-collapse-item/index.js +41 -25
  113. package/dist/components/element-dialog/index.js +101 -48
  114. package/dist/components/element-dialog/style.css +88 -1
  115. package/dist/components/empty-view/index.js +13 -7
  116. package/dist/components/empty-view/style.css +17 -1
  117. package/dist/components/error-view/index.js +12 -6
  118. package/dist/components/error-view/style.css +17 -1
  119. package/dist/components/flex-column/index.js +39 -17
  120. package/dist/components/flex-item/index.js +59 -24
  121. package/dist/components/flex-row/index.js +39 -17
  122. package/dist/components/flex-scroller/index.js +13 -7
  123. package/dist/components/flex-scroller/style.css +20 -1
  124. package/dist/components/flow/index.js +116 -64
  125. package/dist/components/flow/style.css +44 -1
  126. package/dist/components/flow-node/index.js +29 -21
  127. package/dist/components/flow-viewer/index.js +97 -52
  128. package/dist/components/flow-viewer/style.css +19 -1
  129. package/dist/components/form-button/index.js +12 -8
  130. package/dist/components/form-cascader/index.js +55 -40
  131. package/dist/components/form-checkbox-group/index.js +90 -60
  132. package/dist/components/form-checkbox-group/style.css +51 -1
  133. package/dist/components/form-date-picker/index.js +113 -44
  134. package/dist/components/form-group/index.js +23 -17
  135. package/dist/components/form-group/style.css +76 -1
  136. package/dist/components/form-holder/index.js +41 -30
  137. package/dist/components/form-input/index.js +42 -31
  138. package/dist/components/form-input-email/index.js +47 -30
  139. package/dist/components/form-input-id-card/index.js +40 -29
  140. package/dist/components/form-input-number/index.js +50 -38
  141. package/dist/components/form-input-number/style.css +12 -1
  142. package/dist/components/form-input-phone-number/index.js +40 -29
  143. package/dist/components/form-input-time/index.js +40 -29
  144. package/dist/components/form-item/index.js +99 -47
  145. package/dist/components/form-item/style.css +11 -1
  146. package/dist/components/form-item-config-provider/index.js +9 -8
  147. package/dist/components/form-item-group/index.js +69 -43
  148. package/dist/components/form-item-group/style.css +30 -1
  149. package/dist/components/form-radio-group/index.js +77 -53
  150. package/dist/components/form-radio-group/style.css +53 -1
  151. package/dist/components/form-select/index.js +71 -51
  152. package/dist/components/form-switch/index.js +41 -30
  153. package/dist/components/form-temp/index.js +49 -29
  154. package/dist/components/form-textarea/index.js +45 -34
  155. package/dist/components/form-view/index.js +152 -81
  156. package/dist/components/form-view/style.css +158 -1
  157. package/dist/components/fy-array/index.js +51 -43
  158. package/dist/components/fy-array/style.css +18 -1
  159. package/dist/components/fy-article/index.js +24 -13
  160. package/dist/components/fy-article/style.css +40 -1
  161. package/dist/components/fy-cascader/index.js +39 -29
  162. package/dist/components/fy-checkbox/index.js +38 -27
  163. package/dist/components/fy-checkbox/style.css +15 -1
  164. package/dist/components/fy-code/index.js +19 -12
  165. package/dist/components/fy-curd/index.js +290 -152
  166. package/dist/components/fy-curd/style.css +239 -1
  167. package/dist/components/fy-date/index.js +24 -18
  168. package/dist/components/fy-date/style.css +21 -1
  169. package/dist/components/fy-dialog-form/index.js +127 -54
  170. package/dist/components/fy-draggable/index.js +196 -73
  171. package/dist/components/fy-draggable/style.css +136 -1
  172. package/dist/components/fy-dynamic/index.js +116 -73
  173. package/dist/components/fy-dynamic/style.css +35 -1
  174. package/dist/components/fy-empty/index.js +15 -9
  175. package/dist/components/fy-empty/style.css +24 -1
  176. package/dist/components/fy-form/index.js +399 -221
  177. package/dist/components/fy-form/style.css +79 -1
  178. package/dist/components/fy-form-design/index.js +2267 -1630
  179. package/dist/components/fy-form-design/style.css +578 -1
  180. package/dist/components/fy-form-menu/index.js +43 -35
  181. package/dist/components/fy-input/index.js +46 -35
  182. package/dist/components/fy-input-color/index.js +40 -33
  183. package/dist/components/fy-input-icon/index.js +58 -37
  184. package/dist/components/fy-input-icon/style.css +39 -1
  185. package/dist/components/fy-input-map/index.js +113 -68
  186. package/dist/components/fy-input-map/style.css +50 -1
  187. package/dist/components/fy-input-number/index.js +29 -24
  188. package/dist/components/fy-input-table/index.js +82 -48
  189. package/dist/components/fy-input-table/style.css +10 -1
  190. package/dist/components/fy-input-tree/index.js +104 -60
  191. package/dist/components/fy-input-tree/style.css +25 -1
  192. package/dist/components/fy-progress/index.js +15 -10
  193. package/dist/components/fy-radio/index.js +20 -14
  194. package/dist/components/fy-radio/style.css +12 -1
  195. package/dist/components/fy-rate/index.js +21 -15
  196. package/dist/components/fy-rate/style.css +9 -1
  197. package/dist/components/fy-select/index.js +73 -55
  198. package/dist/components/fy-select/style.css +25 -1
  199. package/dist/components/fy-slider/index.js +22 -17
  200. package/dist/components/fy-switch/index.js +17 -12
  201. package/dist/components/fy-tabs/index.js +20 -12
  202. package/dist/components/fy-tabs/style.css +6 -0
  203. package/dist/components/fy-time/index.js +29 -18
  204. package/dist/components/fy-title/index.js +16 -8
  205. package/dist/components/fy-title/style.css +11 -1
  206. package/dist/components/fy-tree/index.js +135 -72
  207. package/dist/components/fy-tree/style.css +46 -1
  208. package/dist/components/fy-u-editor/index.js +172 -67
  209. package/dist/components/fy-u-editor/style.css +15 -1
  210. package/dist/components/fy-upload/index.js +317 -148
  211. package/dist/components/fy-upload/style.css +60 -1
  212. package/dist/components/guide-steps/index.js +31 -17
  213. package/dist/components/guide-steps/style.css +34 -1
  214. package/dist/components/header-menu/index.js +86 -66
  215. package/dist/components/header-search/index.js +92 -60
  216. package/dist/components/highlight-j-s/index.js +28 -15
  217. package/dist/components/highlight-j-s/style.css +21 -1
  218. package/dist/components/icon-card/index.js +13 -7
  219. package/dist/components/icon-card/style.css +56 -1
  220. package/dist/components/icon-temp/index.js +12 -6
  221. package/dist/components/icon-temp/style.css +21 -1
  222. package/dist/components/iframe-window/index.js +20 -14
  223. package/dist/components/iframe-window/style.css +20 -1
  224. package/dist/components/image-cropper/index.js +71 -162
  225. package/dist/components/image-cropper/style.css +34 -1
  226. package/dist/components/image-preview/index.js +78 -170
  227. package/dist/components/image-preview/style.css +72 -1
  228. package/dist/components/image-viewer/index.js +40 -22
  229. package/dist/components/image-viewer/style.css +21 -1
  230. package/dist/components/input-number/index.js +122 -56
  231. package/dist/components/input-number/style.css +15 -1
  232. package/dist/components/input-number-range/index.js +32 -20
  233. package/dist/components/input-number-range/style.css +12 -1
  234. package/dist/components/keep-view-alive/index.js +68 -21
  235. package/dist/components/keyboard/index.js +217 -132
  236. package/dist/components/keyboard/style.css +547 -1
  237. package/dist/components/license/index.js +81 -35
  238. package/dist/components/loading-view/index.js +12 -6
  239. package/dist/components/loading-view/style.css +17 -1
  240. package/dist/components/login/index.js +91 -62
  241. package/dist/components/login/style.css +25 -1
  242. package/dist/components/name-avatar/index.js +32 -10
  243. package/dist/components/name-avatar/style.css +35 -1
  244. package/dist/components/nav-bar/index.js +21 -11
  245. package/dist/components/nav-bar/style.css +17 -1
  246. package/dist/components/not-implement/index.js +16 -8
  247. package/dist/components/not-implement/style.css +15 -1
  248. package/dist/components/notice/index.js +40 -27
  249. package/dist/components/notice/style.css +54 -1
  250. package/dist/components/page/index.js +13 -7
  251. package/dist/components/page/style.css +12 -1
  252. package/dist/components/page-header/index.js +15 -9
  253. package/dist/components/page-header/style.css +14 -1
  254. package/dist/components/page-index/index.js +62 -37
  255. package/dist/components/page-index/style.css +23 -1
  256. package/dist/components/page-index-top/index.js +53 -34
  257. package/dist/components/page-skeleton/index.js +15 -9
  258. package/dist/components/page-skeleton/style.css +23 -1
  259. package/dist/components/page-skeleton-new/index.js +15 -9
  260. package/dist/components/page-skeleton-new/style.css +42 -1
  261. package/dist/components/pageable-table/index.js +187 -106
  262. package/dist/components/pageable-table/style.css +72 -1
  263. package/dist/components/pageable-view/index.js +164 -80
  264. package/dist/components/pageable-view/style.css +69 -1
  265. package/dist/components/photo-swipe/index.js +92 -46
  266. package/dist/components/process-designer/index.js +961 -772
  267. package/dist/components/process-designer/style.css +1186 -1
  268. package/dist/components/properties-panel/index.js +1488 -1044
  269. package/dist/components/properties-panel/style.css +122 -1
  270. package/dist/components/queue/index.js +24 -12
  271. package/dist/components/record-video/index.js +53 -27
  272. package/dist/components/record-video/style.css +53 -1
  273. package/dist/components/resize-observer/index.js +52 -18
  274. package/dist/components/resize-observer/style.css +31 -1
  275. package/dist/components/search/index.js +41 -22
  276. package/dist/components/search/style.css +57 -1
  277. package/dist/components/search-popover/index.js +153 -91
  278. package/dist/components/search-popover/style.css +93 -1
  279. package/dist/components/sign/index.js +138 -35
  280. package/dist/components/sign/style.css +12 -1
  281. package/dist/components/sign-panel/index.js +96 -46
  282. package/dist/components/sign-panel/style.css +97 -1
  283. package/dist/components/skeleton/index.js +22 -12
  284. package/dist/components/skeleton/style.css +61 -1
  285. package/dist/components/split-pane/index.js +125 -60
  286. package/dist/components/split-pane/style.css +100 -1
  287. package/dist/components/stateful/index.js +8 -5
  288. package/dist/components/stateful/style.css +33 -1
  289. package/dist/components/static-pageable-table/index.js +22 -15
  290. package/dist/components/static-pageable-table/style.css +9 -1
  291. package/dist/components/swiper/index.js +127 -58
  292. package/dist/components/swiper/style.css +43 -1
  293. package/dist/components/tab/index.js +34 -16
  294. package/dist/components/tab/style.css +122 -1
  295. package/dist/components/tab-item/index.js +14 -9
  296. package/dist/components/table-column/index.js +26 -17
  297. package/dist/components/table-page/index.js +42 -23
  298. package/dist/components/table-view/index.js +162 -87
  299. package/dist/components/table-view/style.css +95 -1
  300. package/dist/components/tag-render/index.js +41 -22
  301. package/dist/components/tag-render/style.css +33 -1
  302. package/dist/components/text-ellipsis/index.js +48 -26
  303. package/dist/components/text-ellipsis/style.css +9 -1
  304. package/dist/components/tinymce-editor/index.js +80 -60
  305. package/dist/components/tinymce-editor/style.css +43 -1
  306. package/dist/components/tinymce-wrapper/index.js +77 -41
  307. package/dist/components/tinymce-wrapper/style.css +36 -1
  308. package/dist/components/toolbar/index.js +46 -25
  309. package/dist/components/toolbar/style.css +39 -1
  310. package/dist/components/toolbar-button/index.js +46 -35
  311. package/dist/components/toolbar-button/style.css +21 -1
  312. package/dist/components/trigger/index.js +15 -8
  313. package/dist/components/verify/index.js +15 -8
  314. package/dist/components/verify/style.css +15 -1
  315. package/dist/components/vue-tags-input/index.js +233 -113
  316. package/dist/components/vue-tags-input/style.css +688 -1
  317. package/dist/components/watermark/index.js +33 -14
  318. package/dist/components/watermark/style.css +11 -1
  319. package/dist/index.css +2434 -1750
  320. package/dist/index.es.js +15982 -9409
  321. package/package.json +4 -4
  322. package/web-types.json +1 -1
  323. package/dist/chunks/confirmable-mixin.35bd1934.js +0 -104
  324. package/dist/chunks/dataformat.9cc4428a.js +0 -158
  325. package/dist/chunks/detail.544c52b0.js +0 -29
  326. package/dist/chunks/dic.9de2fe5a.js +0 -135
  327. package/dist/chunks/slot.a7387ecc.js +0 -27
  328. package/dist/chunks/util.89913643.js +0 -261
  329. package/dist/chunks/vueComponentNormalizer.77ec6792.js +0 -32
@@ -22,35 +22,35 @@ const config = {
22
22
  filterBtnIcon: "el-icon-tickets",
23
23
  refreshBtnIcon: "el-icon-refresh",
24
24
  // 显隐
25
- viewBtn: !1,
26
- editBtn: !0,
27
- copyBtn: !1,
28
- cancelBtn: !0,
29
- addBtn: !0,
30
- addRowBtn: !1,
31
- printBtn: !1,
32
- excelBtn: !1,
33
- delBtn: !0,
34
- cellBtn: !1,
35
- dateBtn: !1,
36
- updateBtn: !0,
37
- saveBtn: !0,
38
- refreshBtn: !0,
39
- columnBtn: !0,
40
- filterBtn: !1,
41
- queryBtn: !0,
42
- menuBtn: !1,
43
- searchBtn: !0,
44
- clearBtn: !0,
45
- selectClearBtn: !0,
46
- searchShow: !0,
47
- tip: !0,
25
+ viewBtn: false,
26
+ editBtn: true,
27
+ copyBtn: false,
28
+ cancelBtn: true,
29
+ addBtn: true,
30
+ addRowBtn: false,
31
+ printBtn: false,
32
+ excelBtn: false,
33
+ delBtn: true,
34
+ cellBtn: false,
35
+ dateBtn: false,
36
+ updateBtn: true,
37
+ saveBtn: true,
38
+ refreshBtn: true,
39
+ columnBtn: true,
40
+ filterBtn: false,
41
+ queryBtn: true,
42
+ menuBtn: false,
43
+ searchBtn: true,
44
+ clearBtn: true,
45
+ selectClearBtn: true,
46
+ searchShow: true,
47
+ tip: true,
48
48
  dialogWidth: "60%",
49
- dialogDrag: !1,
50
- formFullscreen: !1,
51
- pageBackground: !0,
52
- page: !0,
53
- menu: !0,
49
+ dialogDrag: false,
50
+ formFullscreen: false,
51
+ pageBackground: true,
52
+ page: true,
53
+ menu: true,
54
54
  indexLabel: "#",
55
55
  indexWidth: 50,
56
56
  indexFixed: "left",
@@ -58,7 +58,7 @@ const config = {
58
58
  selectionFixed: "left",
59
59
  expandWidth: 60,
60
60
  expandFixed: "left",
61
- filterMultiple: !0,
61
+ filterMultiple: true,
62
62
  calcHeight: 300,
63
63
  width: "100%",
64
64
  searchGutter: 20,
@@ -0,0 +1,137 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __async = (__this, __arguments, generator) => {
21
+ return new Promise((resolve, reject) => {
22
+ var fulfilled = (value) => {
23
+ try {
24
+ step(generator.next(value));
25
+ } catch (e) {
26
+ reject(e);
27
+ }
28
+ };
29
+ var rejected = (value) => {
30
+ try {
31
+ step(generator.throw(value));
32
+ } catch (e) {
33
+ reject(e);
34
+ }
35
+ };
36
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
37
+ step((generator = generator.apply(__this, __arguments)).next());
38
+ });
39
+ };
40
+ import Loading from "element-ui/lib/loading";
41
+ import MessageBox from "element-ui/lib/message-box";
42
+ import { isFunction } from "@web-utils/core";
43
+ function onClick(e, props, listeners) {
44
+ return __async(this, null, function* () {
45
+ const { stop, prevent, message, loadable, loadingText, confirmable, confirmType, confirmText } = props;
46
+ if (stop) {
47
+ e.stopPropagation();
48
+ }
49
+ if (prevent) {
50
+ e.preventDefault();
51
+ }
52
+ const { before, click, cancel, after } = listeners;
53
+ if (isFunction(click)) {
54
+ try {
55
+ let pass = true;
56
+ if (isFunction(before)) {
57
+ pass = yield before(e);
58
+ }
59
+ if (pass === false) {
60
+ return;
61
+ }
62
+ if (confirmable) {
63
+ yield MessageBox.confirm(message || confirmText, { type: confirmType });
64
+ }
65
+ let loadingInstance;
66
+ if (loadable) {
67
+ loadingInstance = Loading.service({ background: "rgba(0,0,0,0.3)", text: loadingText });
68
+ }
69
+ try {
70
+ yield click(e);
71
+ } catch (e2) {
72
+ }
73
+ if (loadable) {
74
+ loadingInstance.close();
75
+ }
76
+ if (isFunction(after)) {
77
+ yield after(e);
78
+ }
79
+ } catch (e2) {
80
+ if (isFunction(cancel)) {
81
+ yield cancel(e2);
82
+ }
83
+ }
84
+ }
85
+ });
86
+ }
87
+ const confirmableMixin = {
88
+ functional: true,
89
+ props: {
90
+ stop: {
91
+ type: Boolean,
92
+ default: true
93
+ },
94
+ prevent: {
95
+ type: Boolean,
96
+ default: true
97
+ },
98
+ text: {
99
+ type: String,
100
+ default: ""
101
+ },
102
+ message: {
103
+ type: String,
104
+ default: "你确定要删除该记录吗?"
105
+ },
106
+ confirmable: {
107
+ type: Boolean,
108
+ default: true
109
+ },
110
+ confirmText: {
111
+ type: String,
112
+ default: "你确定要删除该记录吗?"
113
+ },
114
+ confirmType: {
115
+ type: String,
116
+ default: "warning"
117
+ },
118
+ loadable: Boolean,
119
+ loadingText: {
120
+ type: String,
121
+ default: "正在处理中请稍候..."
122
+ },
123
+ tag: {
124
+ type: String,
125
+ default: "i"
126
+ }
127
+ },
128
+ render(createElement, { props, data, children, listeners }) {
129
+ return createElement(props.tag, __spreadProps(__spreadValues({}, data), {
130
+ on: { click: (e) => onClick(e, props, listeners) },
131
+ props
132
+ }), children || props.text);
133
+ }
134
+ };
135
+ export {
136
+ confirmableMixin as c
137
+ };
@@ -0,0 +1,237 @@
1
+ import { isBlank } from "@web-utils/core";
2
+ import { n as findObject, M as MULTIPLE_LIST, A as ARRAY_VALUE_LIST, R as RANGE_LIST, p as detailDataType, f as ARRAY_LIST, K as KEY_COMPONENT_NAME, q as createObj, S as SELECT_LIST, c as DIC_SPLIT, j as DATE_LIST, I as INPUT_LIST } from "./util.b0d0b0ad.js";
3
+ const lang = {
4
+ common: {
5
+ condition: "条件",
6
+ display: "显示",
7
+ hide: "隐藏"
8
+ },
9
+ tip: {
10
+ select: "请选择",
11
+ input: "请输入"
12
+ },
13
+ check: {
14
+ checkAll: "全选"
15
+ },
16
+ upload: {
17
+ upload: "点击上传",
18
+ tip: "将文件拖到此处,或"
19
+ },
20
+ time: {
21
+ start: "开始",
22
+ end: "结束"
23
+ },
24
+ date: {
25
+ start: "开始",
26
+ end: "结束",
27
+ t: "今日",
28
+ y: "昨日",
29
+ n: "近7天",
30
+ a: "全部"
31
+ },
32
+ form: {
33
+ printBtn: "打 印",
34
+ mockBtn: "模 拟",
35
+ submitBtn: "提 交",
36
+ emptyBtn: "清 空"
37
+ },
38
+ crud: {
39
+ filter: {
40
+ addBtn: "新增条件",
41
+ clearBtn: "清空数据",
42
+ resetBtn: "清空条件",
43
+ cancelBtn: "取 消",
44
+ submitBtn: "确 定"
45
+ },
46
+ column: {
47
+ name: "列名",
48
+ hide: "隐藏",
49
+ fixed: "冻结",
50
+ filters: "过滤",
51
+ sortable: "排序",
52
+ index: "顺序",
53
+ width: "宽度"
54
+ },
55
+ tipStartTitle: "当前表格已选择",
56
+ tipEndTitle: "项",
57
+ editTitle: "编 辑",
58
+ copyTitle: "复 制",
59
+ addTitle: "新 增",
60
+ viewTitle: "查 看",
61
+ filterTitle: "过滤条件",
62
+ showTitle: "列显隐",
63
+ menu: "操作",
64
+ addBtn: "新 增",
65
+ show: "显 示",
66
+ hide: "隐 藏",
67
+ open: "展 开",
68
+ shrink: "收 缩",
69
+ printBtn: "打 印",
70
+ excelBtn: "导 出",
71
+ updateBtn: "修 改",
72
+ cancelBtn: "取 消",
73
+ searchBtn: "搜 索",
74
+ emptyBtn: "清 空",
75
+ menuBtn: "功 能",
76
+ saveBtn: "保 存",
77
+ viewBtn: "查 看",
78
+ editBtn: "编 辑",
79
+ copyBtn: "复 制",
80
+ delBtn: "删 除"
81
+ }
82
+ };
83
+ const getValueByPath = (object, prop) => {
84
+ prop = prop || "";
85
+ const paths = prop.split(".");
86
+ let current = object;
87
+ let result = null;
88
+ for (let i = 0, j = paths.length; i < j; i++) {
89
+ const path = paths[i];
90
+ if (!current)
91
+ break;
92
+ if (i === j - 1) {
93
+ result = current[path];
94
+ break;
95
+ }
96
+ current = current[path];
97
+ }
98
+ return result;
99
+ };
100
+ const translate = (path) => getValueByPath(lang, path);
101
+ const calcCascader = (list = []) => {
102
+ list.forEach((ele) => {
103
+ const cascader = ele.cascader;
104
+ if (!isBlank(cascader)) {
105
+ const parentProp = ele.prop;
106
+ cascader.forEach((citem) => {
107
+ const column = findObject(list, citem);
108
+ if (column === -1)
109
+ return;
110
+ column.parentProp = parentProp;
111
+ });
112
+ }
113
+ });
114
+ return list;
115
+ };
116
+ let count = 0;
117
+ const calcCount = (ele, spanDefault = 12, init = false) => {
118
+ if (init)
119
+ count = 0;
120
+ const spanAll = 24;
121
+ count = count + (ele.span || spanDefault) + (ele.offset || 0);
122
+ if (count === spanAll) {
123
+ count = 0;
124
+ } else if (count > spanAll) {
125
+ count = (ele.span || spanDefault) + (ele.offset || 0);
126
+ } else if (ele.row && count !== spanAll) {
127
+ ele.count = spanAll - count;
128
+ count = 0;
129
+ }
130
+ return ele;
131
+ };
132
+ const initVal = (value, safe) => {
133
+ const { type, multiple, dataType, separator = DIC_SPLIT, alone, emitPath, range } = safe;
134
+ let list = value;
135
+ if (MULTIPLE_LIST.includes(type) && multiple === true || ARRAY_VALUE_LIST.includes(type) && emitPath !== false || RANGE_LIST.includes(type) && range === true) {
136
+ if (!Array.isArray(list)) {
137
+ if (isBlank(list)) {
138
+ list = [];
139
+ } else {
140
+ list = `${list}`.split(separator) || [];
141
+ }
142
+ }
143
+ list.forEach((ele, index) => {
144
+ list[index] = detailDataType(ele, dataType);
145
+ });
146
+ if (ARRAY_LIST.includes(type) && isBlank(list) && alone)
147
+ list = [""];
148
+ } else {
149
+ list = detailDataType(list, dataType);
150
+ }
151
+ return list;
152
+ };
153
+ const getSearchType = (column) => {
154
+ const type = column.type;
155
+ const range = column.searchRange;
156
+ let result = type;
157
+ if (column.searchType)
158
+ return column.searchType;
159
+ if (["radio", "checkbox", "switch"].includes(type)) {
160
+ result = "select";
161
+ } else if (DATE_LIST.includes(type)) {
162
+ const rangeKey = "range";
163
+ if (range) {
164
+ if (!type.includes(rangeKey)) {
165
+ result = type + rangeKey;
166
+ } else {
167
+ result = type;
168
+ }
169
+ } else
170
+ result = type.replace(rangeKey, "");
171
+ } else if (["textarea"].includes(type)) {
172
+ result = "input";
173
+ }
174
+ return result;
175
+ };
176
+ const getComponent = (type, component) => {
177
+ let result = type || "input";
178
+ if (!isBlank(component)) {
179
+ return component;
180
+ } else if (ARRAY_LIST.includes(type)) {
181
+ result = "array";
182
+ } else if (["time", "timerange"].includes(type)) {
183
+ result = "time";
184
+ } else if (DATE_LIST.includes(type)) {
185
+ result = "date";
186
+ } else if (["password", "textarea", "search"].includes(type)) {
187
+ result = "input";
188
+ } else if (INPUT_LIST.includes(type)) {
189
+ result = `input-${type}`;
190
+ }
191
+ return KEY_COMPONENT_NAME + result;
192
+ };
193
+ const formInitVal = (list = []) => {
194
+ let tableForm = {};
195
+ list.forEach((ele) => {
196
+ if (ARRAY_VALUE_LIST.includes(ele.type) && ele.emitPath !== false || MULTIPLE_LIST.includes(ele.type) && ele.multiple || ele.dataType === "array") {
197
+ tableForm[ele.prop] = [];
198
+ } else if (RANGE_LIST.includes(ele.type) && ele.range === true) {
199
+ tableForm[ele.prop] = [0, 0];
200
+ } else if (["rate", "slider", "number"].includes(ele.type) || ele.dataType === "number") {
201
+ tableForm[ele.prop] = void 0;
202
+ } else {
203
+ tableForm[ele.prop] = "";
204
+ }
205
+ if (ele.bind) {
206
+ tableForm = createObj(tableForm, ele.bind);
207
+ }
208
+ if (!isBlank(ele.value)) {
209
+ tableForm[ele.prop] = ele.value;
210
+ }
211
+ });
212
+ return {
213
+ tableForm
214
+ };
215
+ };
216
+ const getPlaceholder = function(column) {
217
+ const placeholder = column.placeholder;
218
+ const label = column.label;
219
+ if (isBlank(placeholder)) {
220
+ if (SELECT_LIST.includes(column.type)) {
221
+ return `${translate("tip.select")} ${label}`;
222
+ } else {
223
+ return `${translate("tip.input")} ${label}`;
224
+ }
225
+ }
226
+ return placeholder;
227
+ };
228
+ export {
229
+ getPlaceholder as a,
230
+ calcCount as b,
231
+ calcCascader as c,
232
+ getSearchType as d,
233
+ formInitVal as f,
234
+ getComponent as g,
235
+ initVal as i,
236
+ translate as t
237
+ };
@@ -0,0 +1,55 @@
1
+ import { isBlank } from "@web-utils/core";
2
+ import { formatDate } from "@web-utils/integrations/dayjs";
3
+ import { g as getAsVal, M as MULTIPLE_LIST, A as ARRAY_VALUE_LIST, c as DIC_SPLIT, e as strCorNum, f as ARRAY_LIST, b as DIC_SHOW_SPLIT, h as getPasswordChar, j as DATE_LIST, k as findByValue } from "./util.b0d0b0ad.js";
4
+ const detail = (row = {}, column = {}, option = {}, dic = []) => {
5
+ let result = row[column.prop];
6
+ const type = column.type;
7
+ const separator = column.separator;
8
+ if (column.bind)
9
+ result = getAsVal(row, column.bind);
10
+ if (isBlank(result)) {
11
+ result = "";
12
+ } else {
13
+ const selectFlag = MULTIPLE_LIST.includes(column.type) && column.multiple;
14
+ const arrayFlag = ARRAY_VALUE_LIST.includes(column.type);
15
+ if ((["string", "number"].includes(column.dataType) || selectFlag || arrayFlag) && !Array.isArray(result)) {
16
+ result = `${result}`.split(separator || DIC_SPLIT);
17
+ if (column.dataType === "number")
18
+ result = strCorNum(result);
19
+ }
20
+ if (ARRAY_LIST.includes(type)) {
21
+ if (Array.isArray(result)) {
22
+ result = result.join(separator || DIC_SHOW_SPLIT);
23
+ } else {
24
+ result = result.split(separator || DIC_SPLIT).join(separator || DIC_SHOW_SPLIT);
25
+ }
26
+ } else if (type === "password") {
27
+ result = getPasswordChar(result, "*");
28
+ } else if (DATE_LIST.includes(type) && column.format) {
29
+ const format = column.format.replace("dd", "DD").replace("yyyy", "YYYY");
30
+ const formatValue = formatDate(Date.now(), "YYYY-MM-DD");
31
+ if (type.indexOf("range") !== -1) {
32
+ let date1 = result[0] || "";
33
+ let date2 = result[1] || "";
34
+ if (type === "timerange" && date1.length <= 8 && date2.length < 8) {
35
+ date1 = `${formatValue} ${date1}`;
36
+ date2 = `${formatValue} ${date2}`;
37
+ }
38
+ result = [formatDate(date1, format), formatDate(date2, format)].join(column.separator || "~");
39
+ } else {
40
+ if (type === "time" && result.length <= 8) {
41
+ result = `${formatValue} ${result}`;
42
+ }
43
+ result = formatDate(result, format);
44
+ }
45
+ }
46
+ result = findByValue(dic, result, column.props || option.props);
47
+ }
48
+ if (column.formatter && typeof column.formatter === "function") {
49
+ result = column.formatter(row, row[column.prop], result, column);
50
+ }
51
+ return result;
52
+ };
53
+ export {
54
+ detail as d
55
+ };