@web-utils/component 3.0.2 → 3.0.3

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 (166) hide show
  1. package/address-input/index.mjs +14 -14
  2. package/chat/index.mjs +39 -40
  3. package/chunk-file-uploader/index.mjs +35 -594
  4. package/chunk-file-uploader/style.css +1 -1
  5. package/chunks/FormTemp.d079292b.mjs +139 -0
  6. package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
  7. package/chunks/detail.d6f8e347.mjs +29 -0
  8. package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
  9. package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
  10. package/chunks/form-input-mixin.78a567bc.mjs +24 -0
  11. package/chunks/form-item-mixin.57cb2019.mjs +140 -0
  12. package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
  13. package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
  14. package/chunks/input-number-mixin.41a066be.mjs +60 -0
  15. package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
  16. package/count-up/index.mjs +17 -14
  17. package/data-box/index.mjs +18 -19
  18. package/data-display/index.mjs +17 -18
  19. package/data-icons/index.mjs +16 -17
  20. package/data-panel/index.mjs +20 -21
  21. package/data-pay/index.mjs +15 -16
  22. package/data-progress/index.mjs +19 -20
  23. package/data-rotate/index.mjs +35 -36
  24. package/data-table-picker/index.mjs +23 -25
  25. package/data-tabs/index.mjs +15 -16
  26. package/dialog-form/index.mjs +11 -12
  27. package/dynamic-table/index.mjs +34 -35
  28. package/easy-popup/index.mjs +56 -29
  29. package/editable-tree/index.mjs +485 -134
  30. package/element-dialog/index.mjs +127 -37
  31. package/empty-view/index.mjs +31 -13
  32. package/flex-column/index.mjs +1 -1
  33. package/flex-item/index.mjs +1 -1
  34. package/flex-row/index.mjs +1 -1
  35. package/flow/index.mjs +40 -105
  36. package/flow-designer/index.mjs +555 -615
  37. package/flow-node/index.mjs +47 -15
  38. package/flow-viewer/index.mjs +78 -167
  39. package/form-cascader/index.mjs +24 -24
  40. package/form-checkbox-group/index.mjs +35 -79
  41. package/form-date-picker/index.mjs +22 -22
  42. package/form-holder/index.mjs +1 -1
  43. package/form-input/index.mjs +86 -28
  44. package/form-input-email/index.mjs +18 -18
  45. package/form-input-id-card/index.mjs +27 -27
  46. package/form-input-number/index.mjs +59 -219
  47. package/form-input-phone-number/index.mjs +27 -27
  48. package/form-input-tag/index.mjs +38 -160
  49. package/form-input-time/index.mjs +16 -16
  50. package/form-item/index.mjs +146 -15
  51. package/form-item-group/index.mjs +164 -14
  52. package/form-radio-group/index.mjs +41 -41
  53. package/form-select/index.mjs +20 -20
  54. package/form-switch/index.mjs +19 -19
  55. package/form-textarea/index.mjs +29 -29
  56. package/form-view/index.mjs +42 -46
  57. package/fy-array/index.mjs +2 -2
  58. package/fy-cascader/index.mjs +15 -15
  59. package/fy-checkbox/index.mjs +1 -1
  60. package/fy-code/index.mjs +1 -1
  61. package/fy-curd/index.mjs +2824 -210
  62. package/fy-date/index.mjs +59 -17
  63. package/fy-draggable/index.mjs +1 -1
  64. package/fy-dynamic/index.mjs +208 -64
  65. package/fy-empty/index.mjs +29 -12
  66. package/fy-form/index.mjs +743 -178
  67. package/fy-form-design/index.mjs +1013 -1540
  68. package/fy-input/index.mjs +105 -17
  69. package/fy-input-color/index.mjs +67 -16
  70. package/fy-input-icon/index.mjs +119 -23
  71. package/fy-input-map/index.mjs +14 -15
  72. package/fy-input-number/index.mjs +1 -1
  73. package/fy-input-table/index.mjs +19 -21
  74. package/fy-input-tree/index.mjs +3 -3
  75. package/fy-radio/index.mjs +1 -1
  76. package/fy-rate/index.mjs +50 -16
  77. package/fy-select/index.mjs +126 -29
  78. package/fy-slider/index.mjs +2 -2
  79. package/fy-switch/index.mjs +1 -1
  80. package/fy-tabs/index.mjs +51 -15
  81. package/fy-time/index.mjs +1 -1
  82. package/fy-title/index.mjs +1 -1
  83. package/fy-tree/index.mjs +23 -25
  84. package/fy-u-editor/index.mjs +1 -1
  85. package/fy-upload/index.mjs +2 -2
  86. package/highlight-j-s/index.mjs +29 -19
  87. package/icon-temp/index.mjs +30 -12
  88. package/iframe-window/index.mjs +18 -19
  89. package/image-cropper/index.mjs +22 -23
  90. package/image-preview/index.mjs +1 -1
  91. package/input-number/index.mjs +173 -63
  92. package/license/index.mjs +1 -1
  93. package/loading-view/index.mjs +33 -15
  94. package/login/index.mjs +1 -1
  95. package/nav-bar/index.mjs +31 -15
  96. package/package.json +1 -1
  97. package/page/index.mjs +20 -12
  98. package/page-header/index.mjs +34 -13
  99. package/page-index-top/index.mjs +53 -100
  100. package/page-skeleton/index.mjs +35 -18
  101. package/page-skeleton-new/index.mjs +15 -16
  102. package/pageable-table/index.mjs +228 -86
  103. package/pageable-view/index.mjs +1 -1
  104. package/present-view/index.mjs +71 -75
  105. package/record-video/index.mjs +1 -1
  106. package/resize-observer/index.mjs +29 -21
  107. package/search/index.mjs +9 -9
  108. package/search-popover/index.mjs +1 -1
  109. package/sign/index.mjs +1 -1
  110. package/split-pane/index.mjs +45 -40
  111. package/swiper/index.mjs +13 -14
  112. package/table-view/index.mjs +97 -631
  113. package/text-ellipsis/index.mjs +1 -1
  114. package/tinymce-editor/index.mjs +63 -63
  115. package/toolbar/index.mjs +208 -15
  116. package/toolbar-button/index.mjs +56 -30
  117. package/verify/index.mjs +1 -1
  118. package/watermark/index.mjs +1 -1
  119. package/web-types.json +1 -1
  120. package/x-input-tag/index.mjs +118 -49
  121. package/chunks/CountUp.f1a19f35.mjs +0 -124
  122. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
  123. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
  124. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
  125. package/chunks/ElementDialog.d8f3105c.mjs +0 -211
  126. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
  127. package/chunks/EmptyView.e2430422.mjs +0 -51
  128. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
  129. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
  130. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
  131. package/chunks/FormItem.2920ac0c.mjs +0 -45
  132. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
  133. package/chunks/FormItemGroup.41daddb6.mjs +0 -64
  134. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
  135. package/chunks/FyCurd.8acd2983.mjs +0 -548
  136. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
  137. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
  138. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
  139. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
  140. package/chunks/FyForm.0294e494.mjs +0 -439
  141. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
  142. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
  143. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
  144. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
  145. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
  146. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
  147. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
  148. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
  149. package/chunks/IconTemp.42c48e1f.mjs +0 -32
  150. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
  151. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
  152. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
  153. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
  154. package/chunks/Page.81f4b8d9.mjs +0 -32
  155. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
  156. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
  157. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
  158. package/chunks/PageableTable.333cbdc1.mjs +0 -335
  159. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
  160. package/chunks/ResizeObserver.60f728f0.mjs +0 -54
  161. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
  162. package/chunks/TableColumn.8503272e.mjs +0 -106
  163. package/chunks/Toolbar.5c539dbb.mjs +0 -24
  164. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
  165. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
  166. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
@@ -1,25 +1,115 @@
1
- var l = (e, t, i) => new Promise((p, n) => {
2
- var h = (o) => {
1
+ var s = (e, l, t) => new Promise((i, r) => {
2
+ var u = (o) => {
3
3
  try {
4
- s(i.next(o));
5
- } catch (a) {
6
- n(a);
4
+ a(t.next(o));
5
+ } catch (n) {
6
+ r(n);
7
7
  }
8
- }, f = (o) => {
8
+ }, h = (o) => {
9
9
  try {
10
- s(i.throw(o));
11
- } catch (a) {
12
- n(a);
10
+ a(t.throw(o));
11
+ } catch (n) {
12
+ r(n);
13
13
  }
14
- }, s = (o) => o.done ? p(o.value) : Promise.resolve(o.value).then(h, f);
15
- s((i = i.apply(e, t)).next());
14
+ }, a = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(u, h);
15
+ a((t = t.apply(e, l)).next());
16
16
  });
17
- import r from "element-ui/lib/dialog";
18
- import { dialogDrag as u } from "@web-utils/vue/directives/dialog-drag";
19
- import { getComputedHeight as c, isDef as m } from "@web-utils/core";
20
- import { s as y, r as g } from "../chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs";
21
- import { n as $ } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
22
- const S = {
17
+ import d from "element-ui/lib/dialog";
18
+ import { dialogDrag as f } from "@web-utils/vue/directives/dialog-drag";
19
+ import { getComputedHeight as m, isDef as g } from "@web-utils/core";
20
+ import p from "element-ui/lib/button";
21
+ import { n as _ } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
22
+ var y = function() {
23
+ var e = this, l = e.$createElement, t = e._self._c || l;
24
+ return t("Transition", {
25
+ attrs: {
26
+ name: "dialog-fade"
27
+ },
28
+ on: {
29
+ "after-enter": e.afterEnter,
30
+ "after-leave": e.afterLeave
31
+ }
32
+ }, [t("div", {
33
+ directives: [{
34
+ name: "show",
35
+ rawName: "v-show",
36
+ value: e.visible,
37
+ expression: "visible"
38
+ }, {
39
+ name: "dialog-drag",
40
+ rawName: "v-dialog-drag:[fullScreen]",
41
+ value: {
42
+ onMove: e.updatePopper
43
+ },
44
+ expression: "{ onMove: updatePopper }",
45
+ arg: e.fullScreen
46
+ }],
47
+ staticClass: "el-dialog__wrapper",
48
+ on: {
49
+ click: function(i) {
50
+ return i.target !== i.currentTarget ? null : e.handleWrapperClick.apply(null, arguments);
51
+ }
52
+ }
53
+ }, [t("div", {
54
+ ref: "dialog",
55
+ class: ["el-dialog", "element-dialog", "el-dialog-resizeable", "normalize", {
56
+ "is-fullscreen": e.fullScreen,
57
+ "el-dialog__body-padding": e.bodyPadding,
58
+ "el-dialog--center": e.center,
59
+ "el-dialog--flex-row": e.flexRow,
60
+ "el-dialog--flex-column": e.flexColumn
61
+ }, e.customClass],
62
+ style: Object.assign({}, e.style, {
63
+ top: e.marginTop
64
+ }),
65
+ attrs: {
66
+ role: "dialog",
67
+ "aria-modal": "true",
68
+ "aria-label": e.title || "dialog"
69
+ }
70
+ }, [t("div", {
71
+ staticClass: "el-dialog__header"
72
+ }, [e._t("title", function() {
73
+ return [t("span", {
74
+ staticClass: "el-dialog__title"
75
+ }, [e._v(e._s(e.title))])];
76
+ }), t("div", {
77
+ staticClass: "header-button-wrapper"
78
+ }, [e._t("header-button"), e.showFullScreen ? t(p, {
79
+ staticClass: "header-button",
80
+ attrs: {
81
+ type: "text",
82
+ icon: e.fullScreen ? "el-icon-copy-document" : "el-icon-full-screen",
83
+ size: "medium",
84
+ title: e.fullScreen ? "还原" : "最大化"
85
+ },
86
+ on: {
87
+ click: e.toggleFullScreen
88
+ }
89
+ }) : e._e(), e.showClose ? t(p, {
90
+ staticClass: "header-button header-dialog-close",
91
+ attrs: {
92
+ "aria-label": "Close",
93
+ type: "text",
94
+ title: "关闭",
95
+ icon: "el-icon-close",
96
+ size: "medium"
97
+ },
98
+ on: {
99
+ click: e.handleClose
100
+ }
101
+ }) : e._e()], 2)], 2), e.rendered ? t("div", {
102
+ staticClass: "el-dialog__body",
103
+ style: {
104
+ height: e.fullScreen ? "100%" : e.height
105
+ }
106
+ }, [e.destroyOnClose ? [e.visible ? e._t("default") : e._e()] : e._t("default")], 2) : e._e(), e.shouldShowFooter() ? t("div", {
107
+ staticClass: "el-dialog__footer"
108
+ }, [e._t("footer", null, {
109
+ handleClose: e.handleClose
110
+ })], 2) : e._e()])])]);
111
+ }, v = [];
112
+ const C = {
23
113
  props: {
24
114
  visible: {
25
115
  type: Boolean,
@@ -54,12 +144,12 @@ const S = {
54
144
  default: "76vh"
55
145
  }
56
146
  }
57
- }, B = {
147
+ }, S = {
58
148
  name: "ElementDialog",
59
149
  directives: {
60
- dialogDrag: u
150
+ dialogDrag: f
61
151
  },
62
- mixins: [...r.mixins || r.default.mixins, S],
152
+ mixins: [...d.mixins || d.default.mixins, C],
63
153
  props: {
64
154
  title: {
65
155
  type: String,
@@ -127,7 +217,7 @@ const S = {
127
217
  },
128
218
  watch: {
129
219
  visible(e) {
130
- return l(this, null, function* () {
220
+ return s(this, null, function* () {
131
221
  e ? (this.closed = !1, this.$emit("open"), this.$el.addEventListener("scroll", this.updatePopper), yield this.$nextTick(), this.$refs.dialog.scrollTop = 0, yield this.computeTop(), this.appendToBody && document.body.appendChild(this.$el)) : (this.$el.removeEventListener("scroll", this.updatePopper), this.closed || this.$emit("close"));
132
222
  });
133
223
  },
@@ -143,7 +233,7 @@ const S = {
143
233
  );
144
234
  },
145
235
  mounted() {
146
- return l(this, null, function* () {
236
+ return s(this, null, function* () {
147
237
  this.visible && (this.rendered = !0, this.open(), yield this.computeTop(), this.appendToBody && document.body.appendChild(this.$el));
148
238
  });
149
239
  },
@@ -152,8 +242,8 @@ const S = {
152
242
  },
153
243
  methods: {
154
244
  computeTop() {
155
- return l(this, null, function* () {
156
- yield this.$nextTick(), this.verticalCenter ? this.marginTop = `${(document.body.offsetHeight - c(this.$refs.dialog)) / 2 + (m(this.offsetTop) ? this.offsetTop : 0)}px` : this.marginTop = this.top;
245
+ return s(this, null, function* () {
246
+ yield this.$nextTick(), this.verticalCenter ? this.marginTop = `${(document.body.offsetHeight - m(this.$refs.dialog)) / 2 + (g(this.offsetTop) ? this.offsetTop : 0)}px` : this.marginTop = this.top;
157
247
  });
158
248
  },
159
249
  toggleFullScreen() {
@@ -166,8 +256,8 @@ const S = {
166
256
  this.fullScreen = !1;
167
257
  },
168
258
  shouldShowFooter() {
169
- var e, t;
170
- return !!((t = (e = this.$scopedSlots).footer) != null && t.call(e));
259
+ var e, l;
260
+ return !!((l = (e = this.$scopedSlots).footer) != null && l.call(e));
171
261
  },
172
262
  handleWrapperClick() {
173
263
  this.closeOnClickModal && this.handleClose();
@@ -188,24 +278,24 @@ const S = {
188
278
  this.exitFullScreen(), this.$emit("closed");
189
279
  }
190
280
  }
191
- }, d = {};
192
- var C = /* @__PURE__ */ $(
193
- B,
194
- g,
281
+ }, c = {};
282
+ var b = /* @__PURE__ */ _(
283
+ S,
195
284
  y,
196
- !1,
197
285
  v,
286
+ !1,
287
+ w,
198
288
  null,
199
289
  null,
200
290
  null
201
291
  );
202
- function v(e) {
203
- for (let t in d)
204
- this[t] = d[t];
292
+ function w(e) {
293
+ for (let l in c)
294
+ this[l] = c[l];
205
295
  }
206
- const F = /* @__PURE__ */ function() {
207
- return C.exports;
296
+ const k = /* @__PURE__ */ function() {
297
+ return b.exports;
208
298
  }();
209
299
  export {
210
- F as default
300
+ k as default
211
301
  };
@@ -1,5 +1,23 @@
1
- import { s as n, r as o } from "../chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs";
2
- import { n as i } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
1
+ import { n as o } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
+ var s = function() {
3
+ var t = this, e = t.$createElement, n = t._self._c || e;
4
+ return n("div", {
5
+ staticClass: "empty-view",
6
+ style: {
7
+ fontSize: t.fontSize,
8
+ height: t.height
9
+ }
10
+ }, [t._t("default", function() {
11
+ return [n("div", {
12
+ staticClass: "flex-column horizon-center"
13
+ }, [t.showIcon ? n("i", {
14
+ class: t.icon,
15
+ style: {
16
+ fontSize: t.iconSize
17
+ }
18
+ }) : t._e(), n("p", [t._v(t._s(t.emptyTips))])])];
19
+ })], 2);
20
+ }, l = [];
3
21
  const r = {
4
22
  name: "EmptyView",
5
23
  props: {
@@ -28,24 +46,24 @@ const r = {
28
46
  default: "100%"
29
47
  }
30
48
  }
31
- }, e = {};
32
- var p = /* @__PURE__ */ i(
49
+ }, i = {};
50
+ var a = /* @__PURE__ */ o(
33
51
  r,
34
- o,
35
- n,
36
- !1,
37
52
  s,
53
+ l,
54
+ !1,
55
+ c,
38
56
  null,
39
57
  null,
40
58
  null
41
59
  );
42
- function s(a) {
43
- for (let t in e)
44
- this[t] = e[t];
60
+ function c(t) {
61
+ for (let e in i)
62
+ this[e] = i[e];
45
63
  }
46
- const u = /* @__PURE__ */ function() {
47
- return p.exports;
64
+ const p = /* @__PURE__ */ function() {
65
+ return a.exports;
48
66
  }();
49
67
  export {
50
- u as default
68
+ p as default
51
69
  };
@@ -10,7 +10,7 @@ var s = (t, e, n) => e in t ? u(t, e, { enumerable: !0, configurable: !0, writab
10
10
  v.call(e, n) && s(t, n, e[n]);
11
11
  return t;
12
12
  }, c = (t, e) => f(t, _(e));
13
- import { g as h } from "../chunks/index.d91bd77a.mjs";
13
+ import { g as h } from "../chunks/index.57f871af.mjs";
14
14
  import { n as m } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
15
15
  const d = {
16
16
  name: "FlexColumn",
@@ -10,7 +10,7 @@ var r = (t, e, l) => e in t ? u(t, e, { enumerable: !0, configurable: !0, writab
10
10
  x.call(e, l) && r(t, l, e[l]);
11
11
  return t;
12
12
  }, f = (t, e) => c(t, v(e));
13
- import { g as m } from "../chunks/index.d91bd77a.mjs";
13
+ import { g as m } from "../chunks/index.57f871af.mjs";
14
14
  import { n as d } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
15
15
  const h = {
16
16
  name: "FlexItem",
@@ -10,7 +10,7 @@ var s = (t, e, n) => e in t ? u(t, e, { enumerable: !0, configurable: !0, writab
10
10
  h.call(e, n) && s(t, n, e[n]);
11
11
  return t;
12
12
  }, c = (t, e) => f(t, _(e));
13
- import { g as C } from "../chunks/index.d91bd77a.mjs";
13
+ import { g as C } from "../chunks/index.57f871af.mjs";
14
14
  import { n as d } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
15
15
  const x = {
16
16
  name: "FlexRow",
package/flow/index.mjs CHANGED
@@ -1,71 +1,6 @@
1
- import { s as i, t as d } from "../chunks/util.7844e2c2.mjs";
2
- import { s as h, r as p } from "../chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs";
3
- import { n as c } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
4
- const f = {
5
- name: "FlowNode",
6
- props: {
7
- active: [String, Number],
8
- index: [String, Number],
9
- node: Object
10
- },
11
- data() {
12
- return {
13
- // 控制节点操作显示
14
- mouseEnter: !1
15
- };
16
- },
17
- computed: {
18
- // 节点容器样式
19
- flowNodeContainer: {
20
- get() {
21
- return {
22
- position: "absolute",
23
- width: "200px",
24
- top: i(this.node.top),
25
- left: i(this.node.left),
26
- boxShadow: this.mouseEnter ? "#66a6e0 0px 0px 12px 0px" : "",
27
- backgroundColor: "transparent"
28
- };
29
- }
30
- }
31
- },
32
- methods: {
33
- // 鼠标进入
34
- showDelete() {
35
- this.mouseEnter = !0;
36
- },
37
- // 鼠标离开
38
- hideDelete() {
39
- this.mouseEnter = !1;
40
- },
41
- // 鼠标移动后抬起
42
- changeNodeSite() {
43
- this.node.left === this.$refs.node.style.left && this.node.top === this.$refs.node.style.top || this.$emit("changeNodeSite", {
44
- index: this.index,
45
- left: Number(this.$refs.node.style.left.replace("px", "")),
46
- top: Number(this.$refs.node.style.top.replace("px", ""))
47
- });
48
- }
49
- }
50
- }, r = {};
51
- var m = /* @__PURE__ */ c(
52
- f,
53
- p,
54
- h,
55
- !1,
56
- g,
57
- null,
58
- null,
59
- null
60
- );
61
- function g(t) {
62
- for (let e in r)
63
- this[e] = r[e];
64
- }
65
- const b = /* @__PURE__ */ function() {
66
- return m.exports;
67
- }();
68
- var _ = function() {
1
+ import { s as l, r as c } from "../chunks/util.ae730cde.mjs";
2
+ import { n as u } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
+ var h = function() {
69
4
  var t = this, e = t.$createElement, n = t._self._c || e;
70
5
  return n("div", {
71
6
  staticClass: "avue-flow",
@@ -77,38 +12,38 @@ var _ = function() {
77
12
  }
78
13
  }, [n("div", {
79
14
  staticClass: "avue-grid"
80
- }), t._l(t.option.nodeList, function(o, s) {
81
- return [o.display ? t._e() : n(b, {
82
- key: s,
15
+ }), t._l(t.option.nodeList, function(i, o) {
16
+ return [i.display ? t._e() : n("FlowNode", {
17
+ key: o,
83
18
  attrs: {
84
- id: o.id,
85
- node: o,
86
- index: s,
19
+ id: i.id,
20
+ node: i,
21
+ index: o,
87
22
  active: t.active
88
23
  },
89
24
  on: {
90
25
  changeNodeSite: t.changeNodeSite
91
26
  },
92
27
  nativeOn: {
93
- click: function(l) {
94
- return t.handleClick(o);
28
+ click: function(s) {
29
+ return t.handleClick(i);
95
30
  }
96
31
  },
97
32
  scopedSlots: t._u([{
98
33
  key: "header",
99
- fn: function(l) {
100
- var u = l.node;
34
+ fn: function(s) {
35
+ var a = s.node;
101
36
  return [t._t("header", null, {
102
- node: u
37
+ node: a
103
38
  })];
104
39
  }
105
40
  }], null, !0)
106
41
  }, [t._t("default", null, {
107
- node: o
42
+ node: i
108
43
  })], 2)];
109
44
  })], 2)]);
110
- }, j = [];
111
- const L = {
45
+ }, d = [];
46
+ const f = {
112
47
  name: "Flow",
113
48
  props: {
114
49
  value: {
@@ -201,13 +136,13 @@ const L = {
201
136
  styleName() {
202
137
  return {
203
138
  position: "relative",
204
- width: i(this.width),
205
- height: i(this.height)
139
+ width: l(this.width),
140
+ height: l(this.height)
206
141
  };
207
142
  }
208
143
  },
209
144
  created() {
210
- this.id = d(), this.jsplumbSetting.Container = this.id;
145
+ this.id = c(), this.jsplumbSetting.Container = this.id;
211
146
  },
212
147
  mounted() {
213
148
  this.init();
@@ -224,8 +159,8 @@ const L = {
224
159
  // 是否具有该线
225
160
  hasLine(t, e) {
226
161
  for (let n = 0; n < this.data.lineList.length; n++) {
227
- const o = this.data.lineList[n];
228
- if (o.from === t && o.to === e)
162
+ const i = this.data.lineList[n];
163
+ if (i.from === t && i.to === e)
229
164
  return !0;
230
165
  }
231
166
  return !1;
@@ -246,8 +181,8 @@ const L = {
246
181
  },
247
182
  // 改变节点的位置
248
183
  changeNodeSite({ index: t, left: e, top: n }) {
249
- for (let o = 0; o < this.option.nodeList.length; o++)
250
- o === t && (this.$set(this.option.nodeList[o], "left", e), this.$set(this.option.nodeList[o], "top", n));
184
+ for (let i = 0; i < this.option.nodeList.length; i++)
185
+ i === t && (this.$set(this.option.nodeList[i], "left", e), this.$set(this.option.nodeList[i], "top", n));
251
186
  },
252
187
  // 删除节点
253
188
  deleteNode(t) {
@@ -312,10 +247,10 @@ const L = {
312
247
  });
313
248
  }), t.jsPlumb.bind("connection", function(e) {
314
249
  console.log("connection", e);
315
- const n = e.source.id, o = e.target.id;
250
+ const n = e.source.id, i = e.target.id;
316
251
  t.loadEasyFlowFinish && t.option.lineList.push({
317
252
  from: n,
318
- to: o
253
+ to: i
319
254
  });
320
255
  }), t.jsPlumb.bind("connectionDetached", function(e) {
321
256
  console.log("connectionDetached", e), t.deleteLine(e.sourceId, e.targetId);
@@ -325,32 +260,32 @@ const L = {
325
260
  console.log("contextmenu", e);
326
261
  }), t.jsPlumb.bind("beforeDrop", function(e) {
327
262
  console.log("beforeDrop", e);
328
- const n = e.sourceId, o = e.targetId;
329
- return n === o ? (t.$message.error("不能连接自己"), !1) : t.hasLine(n, o) ? (t.$message.error("不能重复连线"), !1) : t.hashOppositeLine(n, o) ? (t.$message.error("不能回环哦"), !1) : !0;
263
+ const n = e.sourceId, i = e.targetId;
264
+ return n === i ? (t.$message.error("不能连接自己"), !1) : t.hasLine(n, i) ? (t.$message.error("不能重复连线"), !1) : t.hashOppositeLine(n, i) ? (t.$message.error("不能回环哦"), !1) : !0;
330
265
  }), t.jsPlumb.bind("beforeDetach", function(e) {
331
266
  console.log("beforeDetach", e);
332
267
  });
333
268
  });
334
269
  }
335
270
  }
336
- }, a = {};
337
- var y = /* @__PURE__ */ c(
338
- L,
339
- _,
340
- j,
271
+ }, r = {};
272
+ var m = /* @__PURE__ */ u(
273
+ f,
274
+ h,
275
+ d,
341
276
  !1,
342
- x,
277
+ p,
343
278
  null,
344
279
  null,
345
280
  null
346
281
  );
347
- function x(t) {
348
- for (let e in a)
349
- this[e] = a[e];
282
+ function p(t) {
283
+ for (let e in r)
284
+ this[e] = r[e];
350
285
  }
351
- const S = /* @__PURE__ */ function() {
352
- return y.exports;
286
+ const j = /* @__PURE__ */ function() {
287
+ return m.exports;
353
288
  }();
354
289
  export {
355
- S as default
290
+ j as default
356
291
  };