@web-utils/component 2.7.30 → 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 (330) 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 +54 -34
  100. package/dist/components/dialog-form/style.css +10 -0
  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 +69 -51
  225. package/dist/components/image-cropper/style.css +34 -1
  226. package/dist/components/image-preview/index.js +77 -46
  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 +15944 -9317
  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
  330. package/dist/components/fy-dialog-form/style.css +0 -1
@@ -1,9 +1,10 @@
1
1
  const uploaderMixin = {
2
2
  inject: ["uploader"]
3
- }, supportMixin = {
3
+ };
4
+ const supportMixin = {
4
5
  data() {
5
6
  return {
6
- support: !0
7
+ support: true
7
8
  };
8
9
  },
9
10
  mounted() {
@@ -47,12 +47,18 @@ const list = {
47
47
  title: "需要引入mock模拟数据包",
48
48
  github: "https://github.com/Colingo/mock"
49
49
  }
50
- }, packages = (() => ({
51
- logs: function(name) {
52
- const obj = list[name], log = createLogger(name);
53
- log.warning(obj.title), log.warning(`CDN:${obj.url || "-"}`), log.warning(`GITHUB:${obj.github || "-"}`);
54
- }
55
- }))();
50
+ };
51
+ const packages = (() => {
52
+ return {
53
+ logs: function(name) {
54
+ const obj = list[name];
55
+ const log = createLogger(name);
56
+ log.warning(obj.title);
57
+ log.warning(`CDN:${obj.url || "-"}`);
58
+ log.warning(`GITHUB:${obj.github || "-"}`);
59
+ }
60
+ };
61
+ })();
56
62
  export {
57
63
  packages as p
58
64
  };
@@ -1,6 +1,11 @@
1
1
  const permission = (() => {
2
2
  function init(el, binding) {
3
- binding.value === !1 ? el.style.display = "none" : el.style.display = "";
3
+ const value = binding.value;
4
+ if (value === false) {
5
+ el.style.display = "none";
6
+ } else {
7
+ el.style.display = "";
8
+ }
4
9
  }
5
10
  return {
6
11
  bind(el, binding) {
@@ -0,0 +1,35 @@
1
+ const slot = {
2
+ methods: {
3
+ getSlotName(item = {}, type = "D", slot2) {
4
+ const result = {
5
+ F: "Form",
6
+ H: "Header",
7
+ E: "Error",
8
+ L: "Label",
9
+ S: "Search",
10
+ T: "Type",
11
+ D: ""
12
+ };
13
+ const name = item.prop + result[type];
14
+ if (slot2)
15
+ return slot2[name];
16
+ return name;
17
+ },
18
+ getSlotList(list = [], slot2, propList) {
19
+ propList = propList.map((ele) => ele.prop);
20
+ return Object.keys(slot2).filter((ele) => {
21
+ let result = false;
22
+ if (!propList.includes(ele)) {
23
+ list.forEach((name) => {
24
+ if (ele.includes(name))
25
+ result = true;
26
+ });
27
+ }
28
+ return result;
29
+ });
30
+ }
31
+ }
32
+ };
33
+ export {
34
+ slot as s
35
+ };
@@ -1,15 +1,23 @@
1
1
  const parentMixin = {
2
2
  mounted() {
3
- this.value >= 0 && (this.currentIndex = this.value), this.updateIndex();
3
+ if (this.value >= 0) {
4
+ this.currentIndex = this.value;
5
+ }
6
+ this.updateIndex();
4
7
  },
5
8
  methods: {
6
9
  updateIndex() {
7
- if (!this.$children || !this.$children.length)
10
+ if (!this.$children || !this.$children.length) {
8
11
  return;
12
+ }
9
13
  this.number = this.$children.length;
10
14
  const children = this.$children;
11
- for (let i = 0; i < children.length; i++)
12
- children[i].currentIndex = i, children[i].currentSelected && (this.index = i);
15
+ for (let i = 0; i < children.length; i++) {
16
+ children[i].currentIndex = i;
17
+ if (children[i].currentSelected) {
18
+ this.index = i;
19
+ }
20
+ }
13
21
  }
14
22
  },
15
23
  props: {
@@ -17,7 +25,10 @@ const parentMixin = {
17
25
  },
18
26
  watch: {
19
27
  currentIndex(val, oldVal) {
20
- oldVal > -1 && this.$children[oldVal] && (this.$children[oldVal].currentSelected = !1), val > -1 && this.$children[val] && (this.$children[val].currentSelected = !0), this.$emit("input", val), this.$emit("on-index-change", val, oldVal);
28
+ oldVal > -1 && this.$children[oldVal] && (this.$children[oldVal].currentSelected = false);
29
+ val > -1 && this.$children[val] && (this.$children[val].currentSelected = true);
30
+ this.$emit("input", val);
31
+ this.$emit("on-index-change", val, oldVal);
21
32
  },
22
33
  index(val) {
23
34
  this.currentIndex = val;
@@ -33,11 +44,12 @@ const parentMixin = {
33
44
  number: this.$children.length
34
45
  };
35
46
  }
36
- }, childMixin = {
47
+ };
48
+ const childMixin = {
37
49
  props: {
38
50
  selected: {
39
51
  type: Boolean,
40
- default: !1
52
+ default: false
41
53
  }
42
54
  },
43
55
  mounted() {
@@ -55,14 +67,20 @@ const parentMixin = {
55
67
  this.$parent.$emit("on-before-index-change", this.currentIndex);
56
68
  return;
57
69
  }
58
- (typeof this.disabled == "undefined" || this.disabled === !1) && (this.currentSelected = !0, this.$parent.currentIndex = this.currentIndex, this.$nextTick(() => {
59
- this.$emit("on-item-click", this.currentIndex);
60
- }));
70
+ if (typeof this.disabled === "undefined" || this.disabled === false) {
71
+ this.currentSelected = true;
72
+ this.$parent.currentIndex = this.currentIndex;
73
+ this.$nextTick(() => {
74
+ this.$emit("on-item-click", this.currentIndex);
75
+ });
76
+ }
61
77
  }
62
78
  },
63
79
  watch: {
64
80
  currentSelected(val) {
65
- val && (this.$parent.index = this.currentIndex);
81
+ if (val) {
82
+ this.$parent.index = this.currentIndex;
83
+ }
66
84
  },
67
85
  selected(val) {
68
86
  this.currentSelected = val;
@@ -0,0 +1,478 @@
1
+ import { isBlank, getObjType } from "@web-utils/core";
2
+ const KEY_COMPONENT_NAME = "fy-";
3
+ const DIC_PROPS = {
4
+ rowKey: "id",
5
+ rowParentKey: "parentId",
6
+ nodeKey: "id",
7
+ label: "label",
8
+ value: "value",
9
+ desc: "desc",
10
+ groups: "groups",
11
+ title: "title",
12
+ leaf: "leaf",
13
+ children: "children",
14
+ hasChildren: "hasChildren",
15
+ labelText: "名称",
16
+ disabled: "disabled"
17
+ };
18
+ const DIC_HTTP_PROPS = {
19
+ name: "name",
20
+ url: "url",
21
+ fileName: "file",
22
+ res: ""
23
+ };
24
+ const DATE_LIST = [
25
+ "dates",
26
+ "date",
27
+ "datetime",
28
+ "datetimerange",
29
+ "daterange",
30
+ "time",
31
+ "timerange",
32
+ "week",
33
+ "month",
34
+ "monthrange",
35
+ "year"
36
+ ];
37
+ const INPUT_LIST = ["tree", "number", "icon", "color", "table", "map"];
38
+ const ARRAY_LIST = ["img", "array", "url"];
39
+ const MULTIPLE_LIST = ["cascader", "tree", "select"];
40
+ const RANGE_LIST = ["slider"];
41
+ const ARRAY_VALUE_LIST = ARRAY_LIST.concat(["upload", "dynamic", "map", "checkbox", "cascader", "dynamic", "timerange", "monthrange", "daterange", "datetimerange", "dates"]);
42
+ const SELECT_LIST = DATE_LIST.concat(["select", "checkbox", "radio", "cascader", "tree", "color", "icon", "table", "map"]);
43
+ const DIC_SHOW_SPLIT = " | ";
44
+ const DIC_SPLIT = ",";
45
+ const typeList = {
46
+ img: /\.(gif|jpg|jpeg|png|webp|svg|GIF|JPG|JPEG|PNG|WEBP|SVG)/,
47
+ video: /\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/,
48
+ audio: /\.(mp3|wav|MP3|WAV)/
49
+ };
50
+ const isMediaType = (url, type2) => {
51
+ if (isBlank(url))
52
+ return;
53
+ if (typeList.audio.test(url) || type2 === "audio") {
54
+ return "audio";
55
+ } else if (typeList.video.test(url) || type2 === "video") {
56
+ return "video";
57
+ } else if (typeList.img.test(url) || type2 === "img") {
58
+ return "img";
59
+ }
60
+ return false;
61
+ };
62
+ function getFixed(val = 0, len = 2) {
63
+ return Number(val.toFixed(len));
64
+ }
65
+ function getAsVal(obj2, bind2 = "") {
66
+ let result2 = deepClone(obj2);
67
+ if (isBlank(bind2))
68
+ return result2;
69
+ bind2.split(".").forEach((ele) => {
70
+ result2 = !isBlank(result2[ele]) ? result2[ele] : "";
71
+ });
72
+ return result2;
73
+ }
74
+ function setAsVal(obj, bind = "", value) {
75
+ let result;
76
+ const type = getObjType(value);
77
+ if (isBlank(value)) {
78
+ if (type === "array") {
79
+ result = `obj.${bind}=[]`;
80
+ } else if (type === "object") {
81
+ result = `obj.${bind}={}`;
82
+ } else if (["number", "boolean"].includes(type)) {
83
+ result = `obj.${bind}=undefined`;
84
+ } else {
85
+ result = `obj.${bind}=''`;
86
+ }
87
+ } else {
88
+ if (type === "string") {
89
+ result = `obj.${bind}='${value}'`;
90
+ } else {
91
+ result = `obj.${bind}=${value}`;
92
+ }
93
+ }
94
+ eval(result);
95
+ return obj;
96
+ }
97
+ function downFile(url, saveName) {
98
+ if (typeof url === "object" && url instanceof Blob) {
99
+ url = URL.createObjectURL(url);
100
+ }
101
+ const aLink = document.createElement("a");
102
+ aLink.href = url;
103
+ aLink.download = saveName || "";
104
+ let event;
105
+ if (window.MouseEvent) {
106
+ event = new MouseEvent("click");
107
+ } else {
108
+ event = document.createEvent("MouseEvents");
109
+ event.initMouseEvent(
110
+ "click",
111
+ true,
112
+ false,
113
+ window,
114
+ 0,
115
+ 0,
116
+ 0,
117
+ 0,
118
+ 0,
119
+ false,
120
+ false,
121
+ false,
122
+ false,
123
+ 0,
124
+ null
125
+ );
126
+ }
127
+ aLink.dispatchEvent(event);
128
+ }
129
+ function strCorNum(list) {
130
+ list.forEach((ele, index) => {
131
+ list[index] = Number(ele);
132
+ });
133
+ return list;
134
+ }
135
+ function extend() {
136
+ let target = arguments[0] || {};
137
+ let deep = false;
138
+ const arr = Array.prototype.slice.call(arguments);
139
+ let i = 1;
140
+ let options, src, key, copy;
141
+ let isArray = false;
142
+ if (typeof target === "boolean") {
143
+ deep = target;
144
+ i++;
145
+ target = arguments[1];
146
+ }
147
+ for (; i < arr.length; i++) {
148
+ if ((options = arr[i]) != null) {
149
+ for (key in options) {
150
+ copy = options[key];
151
+ src = target[key];
152
+ if (deep && (toString.call(copy) === "[object Object]" || (isArray = toString.call(copy) === "[object Array]"))) {
153
+ if (isArray) {
154
+ src = toString.call(src) === "[object Array]" ? src : [];
155
+ } else {
156
+ src = toString.call(src) === "[object Object]" ? src : {};
157
+ }
158
+ target[key] = extend(deep, src, copy);
159
+ } else if (copy !== void 0 && copy !== src) {
160
+ target[key] = copy;
161
+ }
162
+ }
163
+ }
164
+ }
165
+ return target;
166
+ }
167
+ function createObj(obj2, bind2) {
168
+ const list = bind2.split(".");
169
+ const first = list.splice(0, 1)[0];
170
+ const deep = {};
171
+ deep[first] = {};
172
+ if (list.length >= 2) {
173
+ const start = "{";
174
+ const end = "}";
175
+ let result2 = "";
176
+ list.forEach((ele) => {
177
+ result2 = `${result2}${start}"${ele}":`;
178
+ });
179
+ result2 = `${result2}""`;
180
+ for (let i = 0; i < list.length; i++) {
181
+ result2 = `${result2}${end}`;
182
+ }
183
+ result2 = JSON.parse(result2);
184
+ deep[first] = result2;
185
+ }
186
+ obj2 = extend(true, obj2, deep);
187
+ return obj2;
188
+ }
189
+ function dataURLtoFile(dataurl, filename) {
190
+ const arr = dataurl.split(",");
191
+ const mime = arr[0].match(/:(.*?);/)[1];
192
+ const bstr = atob(arr[1]);
193
+ let n = bstr.length;
194
+ const u8arr = new Uint8Array(n);
195
+ while (n--) {
196
+ u8arr[n] = bstr.charCodeAt(n);
197
+ }
198
+ return new File([u8arr], filename, {
199
+ type: mime
200
+ });
201
+ }
202
+ function findObject(list, value2, key = "prop") {
203
+ let result2 = -1;
204
+ const type2 = (() => {
205
+ let result3;
206
+ list.forEach((ele) => {
207
+ if (ele.column) {
208
+ result3 = "group";
209
+ } else if (ele.children) {
210
+ result3 = "tree";
211
+ }
212
+ });
213
+ return result3;
214
+ })();
215
+ if (type2 === "group") {
216
+ list.forEach((ele) => {
217
+ const val = findArray(ele.column, value2, key, true);
218
+ if (val !== -1)
219
+ result2 = val;
220
+ });
221
+ } else if (type2 === "tree") {
222
+ result2 = findLabelNode(list, value2, { value: key }, true);
223
+ } else {
224
+ result2 = findArray(list, value2, key, true);
225
+ }
226
+ return result2;
227
+ }
228
+ function randomId() {
229
+ const $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
230
+ const maxPos = $chars.length;
231
+ let id = "";
232
+ for (let i = 0; i < 16; i++) {
233
+ id += $chars.charAt(Math.floor(Math.random() * maxPos));
234
+ }
235
+ return id;
236
+ }
237
+ const deepClone = (data) => {
238
+ const type2 = getObjType(data);
239
+ let obj2;
240
+ if (type2 === "array")
241
+ obj2 = [];
242
+ else if (type2 === "object")
243
+ obj2 = {};
244
+ else
245
+ return data;
246
+ if (type2 === "array") {
247
+ for (var i = 0, len = data.length; i < len; i++) {
248
+ data[i] = (() => {
249
+ if (data[i] === 0) {
250
+ return data[i];
251
+ }
252
+ return data[i];
253
+ })();
254
+ if (data[i]) {
255
+ delete data[i].$parent;
256
+ }
257
+ obj2.push(deepClone(data[i]));
258
+ }
259
+ } else if (type2 === "object") {
260
+ for (const key in data) {
261
+ if (data) {
262
+ delete data.$parent;
263
+ }
264
+ obj2[key] = deepClone(data[key]);
265
+ }
266
+ }
267
+ return obj2;
268
+ };
269
+ const setPx = (val, defval = "") => {
270
+ if (!val) {
271
+ val = defval;
272
+ }
273
+ if (!val) {
274
+ return "";
275
+ }
276
+ val = `${val}`;
277
+ if (val.indexOf("%") === -1 && val.indexOf("px") === -1) {
278
+ val = `${val}px`;
279
+ }
280
+ return val;
281
+ };
282
+ const detailDataType = (value2, type2) => {
283
+ if (isBlank(value2))
284
+ return value2;
285
+ if (type2 === "number") {
286
+ return Number(value2);
287
+ } else if (type2 === "string") {
288
+ return `${value2}`;
289
+ } else {
290
+ return value2;
291
+ }
292
+ };
293
+ const detailDic = (list = [], props = {}, type2) => {
294
+ const valueKey = props.value || DIC_PROPS.value;
295
+ const childrenKey = props.children || DIC_PROPS.children;
296
+ list.forEach((ele) => {
297
+ ele[valueKey] = detailDataType(ele[valueKey], type2);
298
+ if (ele[childrenKey])
299
+ detailDic(ele[childrenKey], props, type2);
300
+ });
301
+ return list;
302
+ };
303
+ const findByValue = (dic, value2, props) => {
304
+ if (isBlank(dic))
305
+ return value2;
306
+ const isArray = value2 instanceof Array;
307
+ const list = isArray ? value2 : [value2];
308
+ props = props || DIC_PROPS;
309
+ const result2 = [];
310
+ for (let i = 0; i < list.length; i++) {
311
+ result2.push(findLabelNode(dic, list[i], props) || list[i]);
312
+ }
313
+ if (isArray) {
314
+ return result2.join(DIC_SHOW_SPLIT);
315
+ }
316
+ return result2.join();
317
+ };
318
+ const filterParams = (form, list = ["", "$"], deep = true) => {
319
+ const data = deep ? deepClone(form) : form;
320
+ for (const o in data) {
321
+ if (list.includes("")) {
322
+ if (isBlank(data[o]))
323
+ delete data[o];
324
+ }
325
+ if (list.includes("$")) {
326
+ if (o.indexOf("$") !== -1)
327
+ delete data[o];
328
+ }
329
+ }
330
+ return data;
331
+ };
332
+ const detailDicGroup = (dic = [], props = {}) => {
333
+ let list = deepClone(dic);
334
+ const groupsKey = props[DIC_PROPS.groups] || DIC_PROPS.groups;
335
+ dic.forEach((ele) => {
336
+ if (ele[groupsKey]) {
337
+ list = list.concat(ele[groupsKey]);
338
+ }
339
+ });
340
+ return list;
341
+ };
342
+ const findLabelNode = (dic, value2, props, obj2) => {
343
+ let result2;
344
+ if (!obj2)
345
+ dic = detailDicGroup(dic, props);
346
+ const rev = (dic1) => {
347
+ const labelKey = props.label || DIC_PROPS.label;
348
+ const valueKey = props.value || DIC_PROPS.value;
349
+ const childrenKey = props.children || DIC_PROPS.children;
350
+ for (let i = 0; i < dic1.length; i++) {
351
+ const ele = dic1[i];
352
+ const children = ele[childrenKey] || [];
353
+ if (ele[valueKey] === value2) {
354
+ result2 = obj2 ? ele : ele[labelKey];
355
+ } else {
356
+ rev(children);
357
+ }
358
+ }
359
+ };
360
+ rev(dic);
361
+ return result2;
362
+ };
363
+ const getDeepData = (res) => {
364
+ return (Array.isArray(res) ? res : res.data) || [];
365
+ };
366
+ const getObjValue = (data, params = "", type2) => {
367
+ const list = params.split(".");
368
+ let result2 = data;
369
+ if (list[0] === "" && type2 !== "object") {
370
+ return getDeepData(data);
371
+ } else if (list[0] !== "") {
372
+ list.forEach((ele) => {
373
+ result2 = result2[ele];
374
+ });
375
+ }
376
+ return result2;
377
+ };
378
+ const findArray = (dic, value2, valueKey, obj2) => {
379
+ valueKey = valueKey || DIC_PROPS.value;
380
+ for (let i = 0; i < dic.length; i++) {
381
+ if (dic[i][valueKey] === value2) {
382
+ return obj2 ? dic[i] : i;
383
+ }
384
+ }
385
+ return -1;
386
+ };
387
+ const getPasswordChar = (result2 = "", char) => {
388
+ const len = result2.toString().length;
389
+ result2 = "";
390
+ for (let i = 0; i < len; i++) {
391
+ result2 = result2 + char;
392
+ }
393
+ return result2;
394
+ };
395
+ const arraySort = (list = [], prop, callback) => {
396
+ return list.filter((ele) => !isBlank(ele[prop])).sort((a, b) => callback(a, b)).concat(list.filter((ele) => isBlank(ele[prop])));
397
+ };
398
+ const clearVal = (obj2, propList, list = []) => {
399
+ if (!obj2)
400
+ return {};
401
+ propList.forEach((ele) => {
402
+ if (list.includes(ele))
403
+ ;
404
+ else if (ele.includes("$")) {
405
+ delete obj2[ele];
406
+ } else if (!isBlank(obj2[ele])) {
407
+ const type2 = getObjType(obj2[ele]);
408
+ if (type2 === "array")
409
+ obj2[ele] = [];
410
+ else if (type2 === "object")
411
+ obj2[ele] = {};
412
+ else if (["number", "boolean"].includes(type2))
413
+ obj2[ele] = void 0;
414
+ else
415
+ obj2[ele] = "";
416
+ }
417
+ });
418
+ return obj2;
419
+ };
420
+ const optVal = (val, def) => {
421
+ if (typeof val === "boolean") {
422
+ return val;
423
+ }
424
+ return !isBlank(val) ? val : def;
425
+ };
426
+ function uploadFun(column = {}, safe) {
427
+ safe = safe || this;
428
+ const list = ["uploadPreview", "uploadBefore", "uploadAfter", "uploadDelete", "uploadError", "uploadExceed"];
429
+ const result2 = {};
430
+ if (column.type === "upload") {
431
+ list.forEach((ele) => {
432
+ if (!column[ele]) {
433
+ result2[ele] = safe[ele];
434
+ }
435
+ });
436
+ } else {
437
+ list.forEach((ele) => {
438
+ result2[ele] = safe[ele];
439
+ });
440
+ }
441
+ return result2;
442
+ }
443
+ export {
444
+ ARRAY_VALUE_LIST as A,
445
+ downFile as B,
446
+ DIC_PROPS as D,
447
+ INPUT_LIST as I,
448
+ KEY_COMPONENT_NAME as K,
449
+ MULTIPLE_LIST as M,
450
+ RANGE_LIST as R,
451
+ SELECT_LIST as S,
452
+ arraySort as a,
453
+ DIC_SHOW_SPLIT as b,
454
+ DIC_SPLIT as c,
455
+ deepClone as d,
456
+ strCorNum as e,
457
+ ARRAY_LIST as f,
458
+ getAsVal as g,
459
+ getPasswordChar as h,
460
+ isMediaType as i,
461
+ DATE_LIST as j,
462
+ findByValue as k,
463
+ detailDic as l,
464
+ getObjValue as m,
465
+ findObject as n,
466
+ optVal as o,
467
+ detailDataType as p,
468
+ createObj as q,
469
+ randomId as r,
470
+ setPx as s,
471
+ DIC_HTTP_PROPS as t,
472
+ uploadFun as u,
473
+ filterParams as v,
474
+ getFixed as w,
475
+ setAsVal as x,
476
+ clearVal as y,
477
+ dataURLtoFile as z
478
+ };