@web-utils/component 2.0.13 → 2.7.0

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 (315) hide show
  1. package/dist/chunks/config.46422d7f.js +73 -0
  2. package/dist/chunks/confirmable-mixin.3a79781b.js +75 -0
  3. package/dist/chunks/dataformat.fb35ee10.js +61 -0
  4. package/dist/chunks/detail.a3249549.js +28 -0
  5. package/dist/chunks/dic.5f7e3523.js +132 -0
  6. package/dist/chunks/event.50c365eb.js +235 -0
  7. package/dist/chunks/form-input-mixin.ff5b58f7.js +24 -0
  8. package/dist/chunks/form-item-mixin.79f6eaff.js +128 -0
  9. package/dist/chunks/{822300f3.js → form-pick-mixin.61ad06b2.js} +3 -3
  10. package/dist/chunks/init.352281f5.js +121 -0
  11. package/dist/chunks/{44b78389.js → input-number-mixin.41a066be.js} +8 -8
  12. package/dist/chunks/{e1939731.js → mixins.5a78e0db.js} +5 -6
  13. package/dist/chunks/packages.5d7a86c4.js +114 -0
  14. package/dist/chunks/permission.ce5d2121.js +16 -0
  15. package/dist/chunks/slot.1b8d2b1b.js +27 -0
  16. package/dist/chunks/tab-mixin.8c0142e0.js +81 -0
  17. package/dist/chunks/util.5053d54e.js +264 -0
  18. package/dist/chunks/utils.97652d86.js +26 -0
  19. package/dist/chunks/utils.fa73de78.js +185 -0
  20. package/dist/chunks/vueComponentNormalizer.71e2aa87.js +32 -0
  21. package/dist/components/address-input/index.js +43 -56
  22. package/dist/components/address-input/style.css +1 -15
  23. package/dist/components/affix/index.js +102 -0
  24. package/dist/components/affix/style.css +1 -0
  25. package/dist/components/array/index.js +156 -0
  26. package/dist/components/array/style.css +1 -0
  27. package/dist/components/article/index.js +93 -0
  28. package/dist/components/article/style.css +1 -0
  29. package/dist/components/aside-menu/index.js +30 -36
  30. package/dist/components/aside-menu/style.css +1 -9
  31. package/dist/components/avatar/index.js +106 -0
  32. package/dist/components/avatar/style.css +1 -0
  33. package/dist/components/awesome-button/index.js +32 -35
  34. package/dist/components/base.css +1 -66
  35. package/dist/components/capsule-tab/index.js +27 -33
  36. package/dist/components/capsule-tab/style.css +1 -32
  37. package/dist/components/card/index.js +130 -0
  38. package/dist/components/card/style.css +1 -0
  39. package/dist/components/carousel/index.js +70 -0
  40. package/dist/components/carousel/style.css +1 -0
  41. package/dist/components/chat/index.js +567 -0
  42. package/dist/components/chat/style.css +1 -0
  43. package/dist/components/chunk-file-uploader/index.js +54 -88
  44. package/dist/components/chunk-file-uploader/style.css +1 -4
  45. package/dist/components/chunk-file-uploader-button/index.js +25 -31
  46. package/dist/components/chunk-file-uploader-button/style.css +1 -17
  47. package/dist/components/chunk-file-uploader-drop/index.js +28 -42
  48. package/dist/components/chunk-file-uploader-drop/style.css +1 -12
  49. package/dist/components/chunk-file-uploader-file/index.js +134 -211
  50. package/dist/components/chunk-file-uploader-file/style.css +1 -125
  51. package/dist/components/chunk-file-uploader-files/index.js +28 -34
  52. package/dist/components/chunk-file-uploader-files/style.css +1 -9
  53. package/dist/components/chunk-file-uploader-list/index.js +29 -35
  54. package/dist/components/chunk-file-uploader-list/style.css +1 -9
  55. package/dist/components/chunk-file-uploader-un-support/index.js +30 -38
  56. package/dist/components/chunk-file-uploader-un-support/style.css +1 -6
  57. package/dist/components/code/index.js +66 -0
  58. package/dist/components/code-mirror-editor/index.js +156 -181
  59. package/dist/components/code-mirror-editor/style.css +1 -17
  60. package/dist/components/color-picker/index.js +49 -68
  61. package/dist/components/column/index.js +114 -0
  62. package/dist/components/column-default/index.js +105 -0
  63. package/dist/components/column-dynamic/index.js +93 -0
  64. package/dist/components/column-menu/index.js +286 -0
  65. package/dist/components/column-slot/index.js +265 -0
  66. package/dist/components/comment/index.js +94 -0
  67. package/dist/components/comment/style.css +1 -0
  68. package/dist/components/confirm-button/index.js +19 -21
  69. package/dist/components/confirmable/index.js +18 -19
  70. package/dist/components/context-menu/index.js +118 -130
  71. package/dist/components/context-menu/style.css +1 -88
  72. package/dist/components/count-up/index.js +120 -0
  73. package/dist/components/custom-scrollbar/index.js +50 -68
  74. package/dist/components/data-box/index.js +97 -0
  75. package/dist/components/data-box/style.css +1 -0
  76. package/dist/components/data-card/index.js +98 -0
  77. package/dist/components/data-card/style.css +1 -0
  78. package/dist/components/data-cardtext/index.js +82 -0
  79. package/dist/components/data-cardtext/style.css +1 -0
  80. package/dist/components/data-display/index.js +93 -0
  81. package/dist/components/data-display/style.css +1 -0
  82. package/dist/components/data-icons/index.js +104 -0
  83. package/dist/components/data-icons/style.css +1 -0
  84. package/dist/components/data-imgtext/index.js +106 -0
  85. package/dist/components/data-imgtext/style.css +1 -0
  86. package/dist/components/data-operatext/index.js +99 -0
  87. package/dist/components/data-operatext/style.css +1 -0
  88. package/dist/components/data-panel/index.js +93 -0
  89. package/dist/components/data-panel/style.css +1 -0
  90. package/dist/components/data-pay/index.js +149 -0
  91. package/dist/components/data-pay/style.css +1 -0
  92. package/dist/components/data-price/index.js +84 -0
  93. package/dist/components/data-price/style.css +1 -0
  94. package/dist/components/data-progress/index.js +97 -0
  95. package/dist/components/data-progress/style.css +1 -0
  96. package/dist/components/data-rotate/index.js +96 -0
  97. package/dist/components/data-rotate/style.css +1 -0
  98. package/dist/components/data-table-picker/index.js +62 -81
  99. package/dist/components/data-tabs/index.js +94 -0
  100. package/dist/components/data-tabs/style.css +1 -0
  101. package/dist/components/dialog-column/index.js +138 -0
  102. package/dist/components/dialog-excel/index.js +214 -0
  103. package/dist/components/dialog-filter/index.js +245 -0
  104. package/dist/components/dialog-form/index.js +275 -0
  105. package/dist/components/draggable/index.js +384 -0
  106. package/dist/components/draggable/style.css +1 -0
  107. package/dist/components/dynamic-table/index.js +89 -113
  108. package/dist/components/dynamic-table/style.css +1 -30
  109. package/dist/components/e-charts/index.js +126 -201
  110. package/dist/components/e-charts/style.css +1 -10
  111. package/dist/components/editable-progress/index.js +60 -93
  112. package/dist/components/editable-progress/style.css +1 -37
  113. package/dist/components/editable-tree/index.js +423 -638
  114. package/dist/components/editable-tree/style.css +1 -82
  115. package/dist/components/egd-collapse/index.js +33 -46
  116. package/dist/components/egd-collapse-item/index.js +60 -76
  117. package/dist/components/element-dialog/index.js +95 -147
  118. package/dist/components/element-dialog/style.css +1 -102
  119. package/dist/components/empty/index.js +59 -0
  120. package/dist/components/empty/style.css +1 -0
  121. package/dist/components/empty-view/index.js +28 -34
  122. package/dist/components/empty-view/style.css +1 -17
  123. package/dist/components/error-view/index.js +26 -32
  124. package/dist/components/error-view/style.css +1 -17
  125. package/dist/components/flex-column/index.js +25 -40
  126. package/dist/components/flex-item/index.js +29 -57
  127. package/dist/components/flex-row/index.js +25 -40
  128. package/dist/components/flex-scroller/index.js +26 -32
  129. package/dist/components/flex-scroller/style.css +1 -20
  130. package/dist/components/flow/index.js +278 -0
  131. package/dist/components/flow/style.css +1 -0
  132. package/dist/components/flow-node/index.js +102 -0
  133. package/dist/components/form-button/index.js +34 -38
  134. package/dist/components/form-cascader/index.js +71 -81
  135. package/dist/components/form-checkbox-group/index.js +88 -113
  136. package/dist/components/form-checkbox-group/style.css +1 -51
  137. package/dist/components/form-date-picker/index.js +70 -132
  138. package/dist/components/form-group/index.js +122 -0
  139. package/dist/components/form-group/style.css +1 -0
  140. package/dist/components/form-holder/index.js +53 -39
  141. package/dist/components/form-input/index.js +56 -62
  142. package/dist/components/form-input-email/index.js +48 -60
  143. package/dist/components/form-input-id-card/index.js +53 -59
  144. package/dist/components/form-input-number/index.js +61 -68
  145. package/dist/components/form-input-number/style.css +1 -12
  146. package/dist/components/form-input-phone-number/index.js +49 -55
  147. package/dist/components/form-input-time/index.js +53 -59
  148. package/dist/components/form-item/index.js +80 -123
  149. package/dist/components/form-item/style.css +1 -11
  150. package/dist/components/form-item-config-provider/index.js +25 -26
  151. package/dist/components/form-item-group/index.js +85 -111
  152. package/dist/components/form-item-group/style.css +1 -30
  153. package/dist/components/form-radio-group/index.js +85 -104
  154. package/dist/components/form-radio-group/style.css +1 -53
  155. package/dist/components/form-select/index.js +76 -91
  156. package/dist/components/form-switch/index.js +51 -57
  157. package/dist/components/form-temp/index.js +149 -0
  158. package/dist/components/form-textarea/index.js +51 -57
  159. package/dist/components/form-view/index.js +165 -232
  160. package/dist/components/form-view/style.css +1 -158
  161. package/dist/components/fy-cascader/index.js +132 -0
  162. package/dist/components/fy-checkbox/index.js +116 -0
  163. package/dist/components/fy-checkbox/style.css +1 -0
  164. package/dist/components/fy-curd/index.js +846 -0
  165. package/dist/components/fy-curd/style.css +1 -0
  166. package/dist/components/fy-date/index.js +84 -0
  167. package/dist/components/fy-date/style.css +1 -0
  168. package/dist/components/fy-dialog-form/index.js +278 -0
  169. package/dist/components/fy-dialog-form/style.css +1 -0
  170. package/dist/components/fy-dynamic/index.js +335 -0
  171. package/dist/components/fy-dynamic/style.css +1 -0
  172. package/dist/components/fy-form/index.js +754 -0
  173. package/dist/components/fy-form/style.css +1 -0
  174. package/dist/components/fy-form-menu/index.js +95 -0
  175. package/dist/components/fy-input/index.js +162 -0
  176. package/dist/components/fy-input-color/index.js +96 -0
  177. package/dist/components/fy-input-icon/index.js +161 -0
  178. package/dist/components/fy-input-icon/style.css +1 -0
  179. package/dist/components/fy-input-map/index.js +275 -0
  180. package/dist/components/fy-input-map/style.css +1 -0
  181. package/dist/components/fy-input-number/index.js +87 -0
  182. package/dist/components/fy-input-table/index.js +172 -0
  183. package/dist/components/fy-input-table/style.css +1 -0
  184. package/dist/components/fy-input-tree/index.js +265 -0
  185. package/dist/components/fy-input-tree/style.css +1 -0
  186. package/dist/components/fy-radio/index.js +68 -0
  187. package/dist/components/fy-radio/style.css +1 -0
  188. package/dist/components/fy-rate/index.js +105 -0
  189. package/dist/components/fy-rate/style.css +1 -0
  190. package/dist/components/fy-select/index.js +223 -0
  191. package/dist/components/fy-select/style.css +1 -0
  192. package/dist/components/fy-slider/index.js +79 -0
  193. package/dist/components/fy-switch/index.js +73 -0
  194. package/dist/components/fy-time/index.js +95 -0
  195. package/dist/components/fy-title/index.js +40 -0
  196. package/dist/components/fy-title/style.css +1 -0
  197. package/dist/components/fy-upload/index.js +704 -0
  198. package/dist/components/fy-upload/style.css +1 -0
  199. package/dist/components/guide-steps/index.js +44 -58
  200. package/dist/components/guide-steps/style.css +1 -34
  201. package/dist/components/header-menu/index.js +238 -0
  202. package/dist/components/header-search/index.js +246 -0
  203. package/dist/components/icon-card/index.js +29 -35
  204. package/dist/components/icon-card/style.css +1 -56
  205. package/dist/components/icon-temp/index.js +50 -0
  206. package/dist/components/icon-temp/style.css +1 -0
  207. package/dist/components/iframe-window/index.js +29 -35
  208. package/dist/components/iframe-window/style.css +1 -20
  209. package/dist/components/image-viewer/index.js +48 -66
  210. package/dist/components/image-viewer/style.css +1 -21
  211. package/dist/components/input-number/index.js +127 -193
  212. package/dist/components/input-number/style.css +1 -15
  213. package/dist/components/input-number-range/index.js +45 -57
  214. package/dist/components/input-number-range/style.css +1 -12
  215. package/dist/components/j-s-x-component/index.js +4 -4
  216. package/dist/components/keep-view-alive/index.js +77 -120
  217. package/dist/components/keyboard/index.js +389 -0
  218. package/dist/components/keyboard/style.css +1 -0
  219. package/dist/components/license/index.js +134 -0
  220. package/dist/components/loading-view/index.js +26 -32
  221. package/dist/components/loading-view/style.css +1 -17
  222. package/dist/components/login/index.js +244 -0
  223. package/dist/components/login/style.css +1 -0
  224. package/dist/components/name-avatar/index.js +66 -0
  225. package/dist/components/name-avatar/style.css +1 -0
  226. package/dist/components/nav-bar/index.js +27 -37
  227. package/dist/components/nav-bar/style.css +1 -17
  228. package/dist/components/not-implement/index.js +23 -31
  229. package/dist/components/not-implement/style.css +1 -15
  230. package/dist/components/notice/index.js +143 -0
  231. package/dist/components/notice/style.css +1 -0
  232. package/dist/components/page/index.js +22 -28
  233. package/dist/components/page/style.css +1 -12
  234. package/dist/components/page-header/index.js +30 -36
  235. package/dist/components/page-header/style.css +1 -14
  236. package/dist/components/page-index/index.js +62 -83
  237. package/dist/components/page-index/style.css +1 -23
  238. package/dist/components/page-index-top/index.js +53 -68
  239. package/dist/components/page-skeleton/index.js +31 -37
  240. package/dist/components/page-skeleton/style.css +1 -23
  241. package/dist/components/page-skeleton-new/index.js +42 -48
  242. package/dist/components/page-skeleton-new/style.css +1 -42
  243. package/dist/components/pageable-table/index.js +190 -253
  244. package/dist/components/pageable-table/style.css +1 -72
  245. package/dist/components/pageable-view/index.js +134 -199
  246. package/dist/components/pageable-view/style.css +1 -69
  247. package/dist/components/photo-swipe/index.js +116 -151
  248. package/dist/components/photo-swipe/style.css +1 -20
  249. package/dist/components/progress/index.js +60 -0
  250. package/dist/components/queue/index.js +76 -0
  251. package/dist/components/record-video/index.js +173 -0
  252. package/dist/components/record-video/style.css +1 -0
  253. package/dist/components/resize-observer/index.js +34 -68
  254. package/dist/components/resize-observer/style.css +1 -31
  255. package/dist/components/search/index.js +142 -0
  256. package/dist/components/search/style.css +1 -0
  257. package/dist/components/search-popover/index.js +153 -211
  258. package/dist/components/search-popover/style.css +1 -93
  259. package/dist/components/sign/index.js +128 -0
  260. package/dist/components/sign/style.css +1 -0
  261. package/dist/components/sign-panel/index.js +105 -142
  262. package/dist/components/sign-panel/style.css +1 -97
  263. package/dist/components/skeleton/index.js +82 -0
  264. package/dist/components/skeleton/style.css +1 -0
  265. package/dist/components/split-pane/index.js +107 -162
  266. package/dist/components/split-pane/style.css +1 -100
  267. package/dist/components/stateful/index.js +31 -34
  268. package/dist/components/stateful/style.css +1 -33
  269. package/dist/components/static-pageable-table/index.js +37 -44
  270. package/dist/components/static-pageable-table/style.css +1 -9
  271. package/dist/components/swiper/index.js +85 -150
  272. package/dist/components/swiper/style.css +1 -43
  273. package/dist/components/tab/index.js +56 -72
  274. package/dist/components/tab/style.css +1 -122
  275. package/dist/components/tab-item/index.js +30 -35
  276. package/dist/components/table-column/index.js +30 -32
  277. package/dist/components/table-page/index.js +129 -0
  278. package/dist/components/table-view/index.js +156 -227
  279. package/dist/components/table-view/style.css +1 -95
  280. package/dist/components/tabs/index.js +90 -0
  281. package/dist/components/tabs/style.css +0 -0
  282. package/dist/components/tag-render/index.js +44 -58
  283. package/dist/components/tag-render/style.css +1 -33
  284. package/dist/components/text-ellipsis/index.js +107 -0
  285. package/dist/components/text-ellipsis/style.css +1 -0
  286. package/dist/components/tinymce-editor/index.js +79 -95
  287. package/dist/components/tinymce-editor/style.css +1 -43
  288. package/dist/components/tinymce-wrapper/index.js +92 -121
  289. package/dist/components/tinymce-wrapper/style.css +1 -36
  290. package/dist/components/toolbar/index.js +63 -84
  291. package/dist/components/toolbar/style.css +1 -39
  292. package/dist/components/toolbar-button/index.js +41 -48
  293. package/dist/components/toolbar-button/style.css +1 -21
  294. package/dist/components/tree/index.js +427 -0
  295. package/dist/components/tree/style.css +1 -0
  296. package/dist/components/trigger/index.js +29 -36
  297. package/dist/components/verify/index.js +80 -0
  298. package/dist/components/verify/style.css +1 -0
  299. package/dist/components/vue-tags-input/index.js +305 -311
  300. package/dist/components/vue-tags-input/style.css +1 -682
  301. package/dist/components/watermark/index.js +43 -37
  302. package/dist/components/watermark/style.css +1 -11
  303. package/dist/index.css +4157 -1686
  304. package/dist/index.es.js +23131 -11014
  305. package/package.json +20 -4
  306. package/web-types.json +12777 -2788
  307. package/dist/chunks/3d28cc08.js +0 -57
  308. package/dist/chunks/5d33812d.js +0 -147
  309. package/dist/chunks/9d848bf6.js +0 -99
  310. package/dist/chunks/a0bb327b.js +0 -96
  311. package/dist/chunks/a8891d2c.js +0 -30
  312. package/dist/chunks/c69d5628.js +0 -248
  313. package/dist/chunks/de9fe802.js +0 -24
  314. package/dist/components/x-dialog/index.js +0 -199
  315. package/dist/components/x-dialog/style.css +0 -15
@@ -0,0 +1,278 @@
1
+ import { s as l, r as u } from "../../chunks/util.5053d54e.js";
2
+ import { n as c } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
+ var h = function() {
4
+ var t = this, e = t.$createElement, n = t._self._c || e;
5
+ return n("div", {
6
+ staticClass: "avue-flow",
7
+ style: t.styleName
8
+ }, [n("div", {
9
+ style: t.styleName,
10
+ attrs: {
11
+ id: t.id
12
+ }
13
+ }, [n("div", {
14
+ staticClass: "avue-grid"
15
+ }), t._l(t.option.nodeList, function(i, o) {
16
+ return i.display ? t._e() : n("FlowNode", {
17
+ key: o,
18
+ attrs: {
19
+ id: i.id,
20
+ node: i,
21
+ index: o,
22
+ active: t.active
23
+ },
24
+ on: {
25
+ changeNodeSite: t.changeNodeSite
26
+ },
27
+ nativeOn: {
28
+ click: function(s) {
29
+ return t.handleClick(i);
30
+ }
31
+ },
32
+ scopedSlots: t._u([{
33
+ key: "header",
34
+ fn: function(s) {
35
+ var a = s.node;
36
+ return [t._t("header", null, {
37
+ node: a
38
+ })];
39
+ }
40
+ }], null, !0)
41
+ }, [t._t("default", null, {
42
+ node: i
43
+ })], 2);
44
+ })], 2)]);
45
+ }, d = [];
46
+ const m = {
47
+ name: "Flow",
48
+ props: {
49
+ value: {
50
+ type: String
51
+ },
52
+ option: {
53
+ type: Object
54
+ },
55
+ width: {
56
+ type: [Number, String],
57
+ default: "100%"
58
+ },
59
+ height: {
60
+ type: [Number, String],
61
+ default: "100%"
62
+ }
63
+ },
64
+ data() {
65
+ return {
66
+ jsPlumb: {},
67
+ id: "",
68
+ // 默认设置参数
69
+ jsplumbSetting: {
70
+ // 动态锚点、位置自适应
71
+ Anchors: ["Top", "TopCenter", "TopRight", "TopLeft", "Right", "RightMiddle", "Bottom", "BottomCenter", "BottomRight", "BottomLeft", "Left", "LeftMiddle"],
72
+ Container: "",
73
+ // 连线的样式 StateMachine、Flowchart
74
+ Connector: "Flowchart",
75
+ // 鼠标不能拖动删除线
76
+ ConnectionsDetachable: !1,
77
+ // 删除线的时候节点不删除
78
+ DeleteEndpointsOnDetach: !1,
79
+ // 连线的端点
80
+ // Endpoint: ["Dot", {radius: 5}],
81
+ Endpoint: ["Rectangle", { height: 10, width: 10 }],
82
+ // 线端点的样式
83
+ EndpointStyle: { fill: "rgba(255,255,255,0)", outlineWidth: 1 },
84
+ LogEnabled: !0,
85
+ // 是否打开jsPlumb的内部日志记录
86
+ // 绘制线
87
+ PaintStyle: { stroke: "black", strokeWidth: 3 },
88
+ // 绘制箭头
89
+ Overlays: [["Arrow", { width: 12, length: 12, location: 1 }]],
90
+ RenderMode: "svg"
91
+ },
92
+ // jsplumb连接参数
93
+ jsplumbConnectOptions: {
94
+ isSource: !0,
95
+ isTarget: !0,
96
+ // 动态锚点、提供了4个方向 Continuous、AutoDefault
97
+ anchor: "Continuous"
98
+ },
99
+ jsplumbSourceOptions: {
100
+ filter: ".avue-flow__node-drag",
101
+ /* "span"表示标签,".className"表示类,"#id"表示元素id*/
102
+ filterExclude: !1,
103
+ anchor: "Continuous",
104
+ allowLoopback: !1
105
+ },
106
+ jsplumbTargetOptions: {
107
+ filter: ".avue-flow__node-drag",
108
+ /*"span"表示标签,".className"表示类,"#id"表示元素id */
109
+ filterExclude: !1,
110
+ anchor: "Continuous",
111
+ allowLoopback: !1
112
+ },
113
+ loadEasyFlowFinish: !1
114
+ };
115
+ },
116
+ computed: {
117
+ active: {
118
+ get() {
119
+ return this.value;
120
+ },
121
+ set(t) {
122
+ this.$emit("input", t), this.$emit("change", t);
123
+ }
124
+ },
125
+ styleName() {
126
+ return {
127
+ position: "relative",
128
+ width: l(this.width),
129
+ height: l(this.height)
130
+ };
131
+ }
132
+ },
133
+ created() {
134
+ this.id = u(), this.jsplumbSetting.Container = this.id;
135
+ },
136
+ mounted() {
137
+ this.init();
138
+ },
139
+ methods: {
140
+ init() {
141
+ this.jsPlumb = jsPlumb.getInstance(), this.$nextTick(() => {
142
+ this.jsPlumbInit();
143
+ });
144
+ },
145
+ handleClick(t) {
146
+ this.$emit("click", t);
147
+ },
148
+ // 是否具有该线
149
+ hasLine(t, e) {
150
+ for (var n = 0; n < this.data.lineList.length; n++) {
151
+ var i = this.data.lineList[n];
152
+ if (i.from === t && i.to === e)
153
+ return !0;
154
+ }
155
+ return !1;
156
+ },
157
+ // 是否含有相反的线
158
+ hashOppositeLine(t, e) {
159
+ return this.hasLine(e, t);
160
+ },
161
+ // 删除线
162
+ deleteLine(t, e) {
163
+ this.option.lineList = this.option.lineList.filter(function(n) {
164
+ return n.from !== t && n.to !== e;
165
+ });
166
+ },
167
+ // 改变连线
168
+ changeLine(t, e) {
169
+ this.deleteLine(t, e);
170
+ },
171
+ // 改变节点的位置
172
+ changeNodeSite({ index: t, left: e, top: n }) {
173
+ for (var i = 0; i < this.option.nodeList.length; i++)
174
+ this.option.nodeList[i], i === t && (this.$set(this.option.nodeList[i], "left", e), this.$set(this.option.nodeList[i], "top", n));
175
+ },
176
+ //删除节点
177
+ deleteNode(t) {
178
+ return this.$confirm("确定要删除节点" + t + "?", "提示", {
179
+ confirmButtonText: "确定",
180
+ cancelButtonText: "取消",
181
+ type: "warning",
182
+ closeOnClickModal: !1
183
+ }).then(() => {
184
+ this.option.nodeList.forEach((e) => {
185
+ e.id === t && (e.display = !0);
186
+ }), this.$nextTick(function() {
187
+ this.jsPlumb.removeAllEndpoints(t);
188
+ });
189
+ }).catch(() => {
190
+ }), !0;
191
+ },
192
+ // 添加新的节点
193
+ addNode(t) {
194
+ const e = this.option.nodeList.length;
195
+ let n = "node" + e;
196
+ this.option.nodeList.push({
197
+ id: "node" + e,
198
+ name: t,
199
+ left: 0,
200
+ top: 0
201
+ }), this.$nextTick(function() {
202
+ this.jsPlumb.makeSource(n, this.jsplumbSourceOptions), this.jsPlumb.makeTarget(n, this.jsplumbTargetOptions), this.jsPlumb.draggable(n, {
203
+ containment: "parent"
204
+ });
205
+ });
206
+ },
207
+ loadEasyFlow() {
208
+ for (var t = 0; t < this.option.nodeList.length; t++) {
209
+ let e = this.option.nodeList[t];
210
+ this.jsPlumb.makeSource(e.id, this.jsplumbSourceOptions), this.jsPlumb.makeTarget(e.id, this.jsplumbTargetOptions), this.jsPlumb.draggable(e.id);
211
+ }
212
+ for (var t = 0; t < this.option.lineList.length; t++) {
213
+ let n = this.option.lineList[t];
214
+ this.jsPlumb.connect({
215
+ source: n.from,
216
+ target: n.to
217
+ }, this.jsplumbConnectOptions);
218
+ }
219
+ this.$nextTick(function() {
220
+ this.loadEasyFlowFinish = !0;
221
+ });
222
+ },
223
+ jsPlumbInit() {
224
+ const t = this;
225
+ this.jsPlumb.ready(function() {
226
+ t.jsPlumb.importDefaults(t.jsplumbSetting), t.jsPlumb.setSuspendDrawing(!1, !0), t.loadEasyFlow(), t.jsPlumb.bind("click", function(e, n) {
227
+ console.log("click", e), t.$confirm("确定删除所点击的线吗?", "提示", {
228
+ confirmButtonText: "确定",
229
+ cancelButtonText: "取消",
230
+ type: "warning"
231
+ }).then(() => {
232
+ t.jsPlumb.deleteConnection(e);
233
+ }).catch(() => {
234
+ });
235
+ }), t.jsPlumb.bind("connection", function(e) {
236
+ console.log("connection", e);
237
+ let n = e.source.id, i = e.target.id;
238
+ t.loadEasyFlowFinish && t.option.lineList.push({
239
+ from: n,
240
+ to: i
241
+ });
242
+ }), t.jsPlumb.bind("connectionDetached", function(e) {
243
+ console.log("connectionDetached", e), t.deleteLine(e.sourceId, e.targetId);
244
+ }), t.jsPlumb.bind("connectionMoved", function(e) {
245
+ console.log("connectionMoved", e), t.changeLine(e.originalSourceId, e.originalTargetId);
246
+ }), t.jsPlumb.bind("contextmenu", function(e) {
247
+ console.log("contextmenu", e);
248
+ }), t.jsPlumb.bind("beforeDrop", function(e) {
249
+ console.log("beforeDrop", e);
250
+ let n = e.sourceId, i = e.targetId;
251
+ return n === i ? (t.$message.error("不能连接自己"), !1) : t.hasLine(n, i) ? (t.$message.error("不能重复连线"), !1) : t.hashOppositeLine(n, i) ? (t.$message.error("不能回环哦"), !1) : !0;
252
+ }), t.jsPlumb.bind("beforeDetach", function(e) {
253
+ console.log("beforeDetach", e);
254
+ });
255
+ });
256
+ }
257
+ }
258
+ }, r = {};
259
+ var f = /* @__PURE__ */ c(
260
+ m,
261
+ h,
262
+ d,
263
+ !1,
264
+ p,
265
+ null,
266
+ null,
267
+ null
268
+ );
269
+ function p(t) {
270
+ for (let e in r)
271
+ this[e] = r[e];
272
+ }
273
+ const j = /* @__PURE__ */ function() {
274
+ return f.exports;
275
+ }();
276
+ export {
277
+ j as default
278
+ };
@@ -0,0 +1 @@
1
+ .avue-flow{position:relative}.avue-flow .avue-draggable{padding:0}.avue-flow__node{position:relative;display:flex;flex-direction:column;width:200px;height:80px;border-radius:5px;box-shadow:"#66a6e0 0px 0px 12px 0px";border:1px solid #eee;box-sizing:border-box;overflow:hidden}.avue-flow__node--active{border-width:2px;border-color:#f56c6c}.avue-flow__node-drag{margin:0 5px;display:inline-block}.avue-flow__node-header{flex:1;background-color:#66a6e0}.avue-flow__node-body{display:flex;align-items:center;justify-content:center;flex:1.5;text-align:center;background:#fff}
@@ -0,0 +1,102 @@
1
+ import { s as n } from "../../chunks/util.5053d54e.js";
2
+ import { n as r } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
+ var l = function() {
4
+ var e = this, o = e.$createElement, t = e._self._c || o;
5
+ return t("div", {
6
+ ref: "node",
7
+ style: e.flowNodeContainer,
8
+ attrs: {
9
+ left: e.node.left,
10
+ top: e.node.top,
11
+ disabled: "",
12
+ mask: !1
13
+ },
14
+ on: {
15
+ mouseenter: e.showDelete,
16
+ mouseleave: e.hideDelete,
17
+ mouseup: e.changeNodeSite
18
+ }
19
+ }, [t("div", {
20
+ class: ["avue-flow__node", {
21
+ active: e.active === e.node.id
22
+ }]
23
+ }, [t("div", {
24
+ staticClass: "avue-flow__node-header"
25
+ }, [t("i", {
26
+ staticClass: "el-icon-rank",
27
+ class: e.b("node-drag")
28
+ }), e._t("header", null, {
29
+ node: e.node
30
+ })], 2), t("div", {
31
+ staticClass: "avue-flow__node-body"
32
+ }, [e._t("default", null, {
33
+ node: e.node
34
+ })], 2)])]);
35
+ }, a = [];
36
+ const i = {
37
+ name: "FlowNode",
38
+ props: {
39
+ active: [String, Number],
40
+ index: [String, Number],
41
+ node: Object
42
+ },
43
+ data() {
44
+ return {
45
+ // 控制节点操作显示
46
+ mouseEnter: !1
47
+ };
48
+ },
49
+ computed: {
50
+ // 节点容器样式
51
+ flowNodeContainer: {
52
+ get() {
53
+ return {
54
+ position: "absolute",
55
+ width: "200px",
56
+ top: n(this.node.top),
57
+ left: n(this.node.left),
58
+ boxShadow: this.mouseEnter ? "#66a6e0 0px 0px 12px 0px" : "",
59
+ backgroundColor: "transparent"
60
+ };
61
+ }
62
+ }
63
+ },
64
+ methods: {
65
+ // 鼠标进入
66
+ showDelete() {
67
+ this.mouseEnter = !0;
68
+ },
69
+ // 鼠标离开
70
+ hideDelete() {
71
+ this.mouseEnter = !1;
72
+ },
73
+ // 鼠标移动后抬起
74
+ changeNodeSite() {
75
+ this.node.left == this.$refs.node.style.left && this.node.top == this.$refs.node.style.top || this.$emit("changeNodeSite", {
76
+ index: this.index,
77
+ left: Number(this.$refs.node.style.left.replace("px", "")),
78
+ top: Number(this.$refs.node.style.top.replace("px", ""))
79
+ });
80
+ }
81
+ }
82
+ }, s = {};
83
+ var d = /* @__PURE__ */ r(
84
+ i,
85
+ l,
86
+ a,
87
+ !1,
88
+ u,
89
+ null,
90
+ null,
91
+ null
92
+ );
93
+ function u(e) {
94
+ for (let o in s)
95
+ this[o] = s[o];
96
+ }
97
+ const p = /* @__PURE__ */ function() {
98
+ return d.exports;
99
+ }();
100
+ export {
101
+ p as default
102
+ };
@@ -1,30 +1,28 @@
1
- import { c as confirmableMixin } from "../../chunks/a0bb327b.js";
2
- import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
3
- const __vue2_script$1 = {
1
+ import { c as r } from "../../chunks/confirmable-mixin.3a79781b.js";
2
+ import { n as o } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
+ const i = {
4
4
  name: "Confirmable",
5
- mixins: [confirmableMixin]
5
+ mixins: [r]
6
6
  };
7
- let __vue2_render$1, __vue2_staticRenderFns$1;
8
- const __cssModules$1 = {};
9
- var __component__$1 = /* @__PURE__ */ normalizeComponent(
10
- __vue2_script$1,
11
- __vue2_render$1,
12
- __vue2_staticRenderFns$1,
13
- false,
14
- __vue2_injectStyles$1,
7
+ let s, _;
8
+ const t = {};
9
+ var a = /* @__PURE__ */ o(
10
+ i,
11
+ s,
12
+ _,
13
+ !1,
14
+ u,
15
15
  null,
16
16
  null,
17
17
  null
18
18
  );
19
- function __vue2_injectStyles$1(context) {
20
- for (let o in __cssModules$1) {
21
- this[o] = __cssModules$1[o];
22
- }
19
+ function u(l) {
20
+ for (let n in t)
21
+ this[n] = t[n];
23
22
  }
24
- const Confirmable = /* @__PURE__ */ function() {
25
- return __component__$1.exports;
26
- }();
27
- const props = {
23
+ const c = /* @__PURE__ */ function() {
24
+ return a.exports;
25
+ }(), p = {
28
26
  props: {
29
27
  type: {
30
28
  type: String,
@@ -54,31 +52,29 @@ const props = {
54
52
  default: "AwesomeButton"
55
53
  }
56
54
  }
57
- };
58
- const __vue2_script = {
55
+ }, f = {
59
56
  name: "FormButton",
60
- mixins: [Confirmable, props]
57
+ mixins: [c, p]
61
58
  };
62
- let __vue2_render, __vue2_staticRenderFns;
63
- const __cssModules = {};
64
- var __component__ = /* @__PURE__ */ normalizeComponent(
65
- __vue2_script,
66
- __vue2_render,
67
- __vue2_staticRenderFns,
68
- false,
69
- __vue2_injectStyles,
59
+ let m, d;
60
+ const e = {};
61
+ var v = /* @__PURE__ */ o(
62
+ f,
63
+ m,
64
+ d,
65
+ !1,
66
+ g,
70
67
  null,
71
68
  null,
72
69
  null
73
70
  );
74
- function __vue2_injectStyles(context) {
75
- for (let o in __cssModules) {
76
- this[o] = __cssModules[o];
77
- }
71
+ function g(l) {
72
+ for (let n in e)
73
+ this[n] = e[n];
78
74
  }
79
- const FormButton = /* @__PURE__ */ function() {
80
- return __component__.exports;
75
+ const B = /* @__PURE__ */ function() {
76
+ return v.exports;
81
77
  }();
82
78
  export {
83
- FormButton as default
79
+ B as default
84
80
  };
@@ -1,72 +1,68 @@
1
- import { f as formInputMixin } from "../../chunks/de9fe802.js";
2
- import { f as formPickMixin } from "../../chunks/822300f3.js";
3
- import { Cascader } from "element-ui";
4
- import { i as filterProperties, n as normalizeProps } from "../../chunks/c69d5628.js";
5
- import { findTreeChildren, cloneDeep, setParent } from "@web-utils/core";
6
- import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
7
- var render = function() {
8
- var _vm = this;
9
- var _h = _vm.$createElement;
10
- var _c = _vm._self._c || _h;
11
- return _c("FormItem", _vm._b({
1
+ import { f as s } from "../../chunks/form-input-mixin.ff5b58f7.js";
2
+ import { f as a } from "../../chunks/form-pick-mixin.61ad06b2.js";
3
+ import { Cascader as i } from "element-ui";
4
+ import { i as u, n as p } from "../../chunks/utils.fa73de78.js";
5
+ import { findTreeChildren as c, cloneDeep as d, setParent as m } from "@web-utils/core";
6
+ import { n as f } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
7
+ var h = function() {
8
+ var e = this, t = e.$createElement, r = e._self._c || t;
9
+ return r("FormItem", e._b({
12
10
  attrs: {
13
- "rules": _vm.computeRules,
14
- "disabled": _vm.inputDisabled
11
+ rules: e.computeRules,
12
+ disabled: e.inputDisabled
15
13
  },
16
- scopedSlots: _vm._u([{
14
+ scopedSlots: e._u([{
17
15
  key: "default",
18
16
  fn: function() {
19
- return [_vm._t("default", function() {
20
- return [_c("ElCascader", _vm._g(_vm._b({
17
+ return [e._t("default", function() {
18
+ return [r("ElCascader", e._g(e._b({
21
19
  class: {
22
- "is-readonly": _vm.readonly
20
+ "is-readonly": e.readonly
23
21
  },
24
22
  staticStyle: {
25
- "width": "100%"
23
+ width: "100%"
26
24
  },
27
25
  attrs: {
28
- "value": _vm.inputVal,
29
- "show-all-levels": _vm.showAllLevels,
30
- "separator": _vm.separator,
31
- "readonly": _vm.readonly,
32
- "options": _vm.innerOptions,
33
- "props": {
34
- checkStrictly: _vm.checkStrictly,
35
- label: _vm.labelKey,
36
- value: _vm.valueKey
26
+ value: e.inputVal,
27
+ "show-all-levels": e.showAllLevels,
28
+ separator: e.separator,
29
+ readonly: e.readonly,
30
+ options: e.innerOptions,
31
+ props: {
32
+ checkStrictly: e.checkStrictly,
33
+ label: e.labelKey,
34
+ value: e.valueKey
37
35
  },
38
- "disabled": _vm.inputDisabled,
39
- "placeholder": _vm.computePlaceholder
36
+ disabled: e.inputDisabled,
37
+ placeholder: e.computePlaceholder
40
38
  },
41
39
  on: {
42
- "input": _vm.emitInput
40
+ input: e.emitInput
43
41
  }
44
- }, "ElCascader", _vm.inputProps, false), _vm.listeners))];
42
+ }, "ElCascader", e.inputProps, !1), e.listeners))];
45
43
  })];
46
44
  },
47
- proxy: true
45
+ proxy: !0
48
46
  }, {
49
47
  key: "error",
50
- fn: function(_ref) {
51
- var error = _ref.error;
52
- return [_vm._t("error", null, {
53
- "error": error
48
+ fn: function(l) {
49
+ var o = l.error;
50
+ return [e._t("error", null, {
51
+ error: o
54
52
  })];
55
53
  }
56
54
  }, {
57
55
  key: "label",
58
56
  fn: function() {
59
- return [_vm._t("label")];
57
+ return [e._t("label")];
60
58
  },
61
- proxy: true
62
- }], null, true)
63
- }, "FormItem", _vm.formItemProps, false));
64
- };
65
- var staticRenderFns = [];
66
- const autoBindKeys = Object.keys(Cascader.props).filter((key) => !["value", "placeholder", "disabled", "options", "showAllLevels", "show-all-levels", "separator"].includes(key));
67
- const __vue2_script = {
59
+ proxy: !0
60
+ }], null, !0)
61
+ }, "FormItem", e.formItemProps, !1));
62
+ }, y = [];
63
+ const v = Object.keys(i.props).filter((e) => !["value", "placeholder", "disabled", "options", "showAllLevels", "show-all-levels", "separator"].includes(e)), _ = {
68
64
  name: "FormCascader",
69
- mixins: [formInputMixin, formPickMixin],
65
+ mixins: [s, a],
70
66
  props: {
71
67
  value: {
72
68
  type: [String, Number]
@@ -82,11 +78,11 @@ const __vue2_script = {
82
78
  },
83
79
  last: {
84
80
  type: Boolean,
85
- default: true
81
+ default: !0
86
82
  },
87
83
  checkStrictly: {
88
84
  type: Boolean,
89
- default: true
85
+ default: !0
90
86
  },
91
87
  labelKey: {
92
88
  type: String,
@@ -104,58 +100,52 @@ const __vue2_script = {
104
100
  },
105
101
  computed: {
106
102
  inputProps() {
107
- return filterProperties({ ...normalizeProps(this.$attrs), ...this.$props }, autoBindKeys);
103
+ return u({ ...p(this.$attrs), ...this.$props }, v);
108
104
  },
109
105
  inputVal() {
110
- let [parent] = findTreeChildren(this.innerOptions, (node) => node[this.valueKey] === this.value);
111
- const val = [];
112
- while (parent) {
113
- val.push(parent[this.valueKey]);
114
- parent = parent.parent;
115
- }
116
- return val.reverse();
106
+ let [e] = c(this.innerOptions, (r) => r[this.valueKey] === this.value);
107
+ const t = [];
108
+ for (; e; )
109
+ t.push(e[this.valueKey]), e = e.parent;
110
+ return t.reverse();
117
111
  }
118
112
  },
119
113
  watch: {
120
114
  options: {
121
- immediate: true,
122
- handler(newVal) {
123
- if (newVal) {
124
- const options = cloneDeep(newVal);
125
- setParent(options);
126
- this.innerOptions = options;
127
- } else {
115
+ immediate: !0,
116
+ handler(e) {
117
+ if (e) {
118
+ const t = d(e);
119
+ m(t), this.innerOptions = t;
120
+ } else
128
121
  this.innerOptions = [];
129
- }
130
122
  }
131
123
  }
132
124
  },
133
125
  methods: {
134
- emitInput(val) {
135
- const v = this.last ? val[val.length - 1] : val;
136
- this.$emit("input", v);
126
+ emitInput(e) {
127
+ const t = this.last ? e[e.length - 1] : e;
128
+ this.$emit("input", t);
137
129
  }
138
130
  }
139
- };
140
- const __cssModules = {};
141
- var __component__ = /* @__PURE__ */ normalizeComponent(
142
- __vue2_script,
143
- render,
144
- staticRenderFns,
145
- false,
146
- __vue2_injectStyles,
131
+ }, n = {};
132
+ var b = /* @__PURE__ */ f(
133
+ _,
134
+ h,
135
+ y,
136
+ !1,
137
+ S,
147
138
  null,
148
139
  null,
149
140
  null
150
141
  );
151
- function __vue2_injectStyles(context) {
152
- for (let o in __cssModules) {
153
- this[o] = __cssModules[o];
154
- }
142
+ function S(e) {
143
+ for (let t in n)
144
+ this[t] = n[t];
155
145
  }
156
- const FormCascader = /* @__PURE__ */ function() {
157
- return __component__.exports;
146
+ const g = /* @__PURE__ */ function() {
147
+ return b.exports;
158
148
  }();
159
149
  export {
160
- FormCascader as default
150
+ g as default
161
151
  };