@web-utils/component 3.0.6 → 3.1.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.
- package/address-input/index.mjs +20 -57
- package/affix/index.mjs +26 -47
- package/aside-menu/index.mjs +18 -43
- package/avatar/index.mjs +27 -49
- package/awesome-button/index.mjs +35 -43
- package/capsule-tab/index.mjs +16 -34
- package/card/index.mjs +21 -76
- package/carousel/index.mjs +14 -49
- package/chat/index.mjs +104 -414
- package/chunk-file-uploader/index.mjs +21 -38
- package/chunks/FormTemp.aa57efb4.mjs +125 -0
- package/code-mirror-editor/index.mjs +69 -79
- package/color-picker/index.mjs +29 -60
- package/comment/index.mjs +17 -48
- package/confirm-button/index.mjs +11 -19
- package/confirmable/index.mjs +12 -20
- package/context-menu/index.mjs +42 -144
- package/count-up/index.mjs +18 -25
- package/custom-scrollbar/index.mjs +13 -22
- package/data-box/index.mjs +15 -66
- package/data-card/index.mjs +16 -65
- package/data-cardtext/index.mjs +16 -52
- package/data-display/index.mjs +18 -62
- package/data-icons/index.mjs +16 -68
- package/data-imgtext/index.mjs +18 -79
- package/data-operatext/index.mjs +18 -75
- package/data-panel/index.mjs +16 -63
- package/data-pay/index.mjs +20 -122
- package/data-price/index.mjs +18 -60
- package/data-progress/index.mjs +16 -67
- package/data-rotate/index.mjs +16 -66
- package/data-table-picker/index.mjs +25 -88
- package/data-tabs/index.mjs +16 -64
- package/dialog-form/index.mjs +48 -94
- package/dynamic-table/index.mjs +43 -127
- package/e-charts/index.mjs +21 -34
- package/easy-popup/index.mjs +35 -61
- package/editable-progress/index.mjs +22 -77
- package/editable-tree/index.mjs +235 -546
- package/egd-collapse/index.mjs +13 -26
- package/egd-collapse-item/index.mjs +27 -87
- package/element-dialog/index.mjs +69 -133
- package/empty-view/index.mjs +13 -33
- package/error-view/index.mjs +14 -34
- package/flex-column/index.mjs +15 -23
- package/flex-item/index.mjs +18 -26
- package/flex-row/index.mjs +23 -31
- package/flex-scroller/index.mjs +16 -27
- package/flow/index.mjs +70 -110
- package/flow-designer/index.mjs +1215 -4804
- package/flow-node/index.mjs +15 -51
- package/flow-viewer/index.mjs +64 -89
- package/form-block/index.mjs +43 -62
- package/form-button/index.mjs +10 -18
- package/form-cascader/index.mjs +49 -100
- package/form-checkbox-group/index.mjs +43 -110
- package/form-date-picker/index.mjs +51 -97
- package/form-holder/index.mjs +25 -42
- package/form-input/index.mjs +40 -90
- package/form-input-email/index.mjs +35 -79
- package/form-input-id-card/index.mjs +40 -87
- package/form-input-number/index.mjs +42 -102
- package/form-input-phone-number/index.mjs +34 -75
- package/form-input-tag/index.mjs +31 -73
- package/form-input-time/index.mjs +42 -87
- package/form-item/index.mjs +70 -89
- package/form-item-config-provider/index.mjs +12 -20
- package/form-item-group/index.mjs +46 -65
- package/form-radio-group/index.mjs +50 -108
- package/form-select/index.mjs +44 -95
- package/form-switch/index.mjs +38 -85
- package/form-textarea/index.mjs +31 -75
- package/form-view/index.mjs +112 -260
- package/fy-array/index.mjs +35 -121
- package/fy-article/index.mjs +12 -43
- package/fy-cascader/index.mjs +26 -67
- package/fy-checkbox/index.mjs +27 -77
- package/fy-code/index.mjs +19 -33
- package/fy-curd/index.mjs +810 -2017
- package/fy-date/index.mjs +18 -59
- package/fy-draggable/index.mjs +81 -140
- package/fy-dynamic/index.mjs +85 -204
- package/fy-empty/index.mjs +14 -35
- package/fy-form/index.mjs +254 -571
- package/fy-form-design/index.mjs +1489 -6084
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +34 -104
- package/fy-input-color/index.mjs +22 -67
- package/fy-input-icon/index.mjs +37 -122
- package/fy-input-map/index.mjs +57 -149
- package/fy-input-number/index.mjs +18 -53
- package/fy-input-table/index.mjs +36 -102
- package/fy-input-tree/index.mjs +51 -138
- package/fy-progress/index.mjs +12 -31
- package/fy-radio/index.mjs +20 -51
- package/fy-rate/index.mjs +18 -51
- package/fy-select/index.mjs +49 -134
- package/fy-slider/index.mjs +19 -52
- package/fy-switch/index.mjs +18 -48
- package/fy-tabs/index.mjs +19 -51
- package/fy-time/index.mjs +22 -62
- package/fy-title/index.mjs +14 -25
- package/fy-tree/index.mjs +74 -216
- package/fy-u-editor/index.mjs +50 -64
- package/fy-upload/index.mjs +167 -338
- package/guide-steps/index.mjs +33 -53
- package/highlight-j-s/index.mjs +13 -27
- package/icon-card/index.mjs +12 -36
- package/icon-temp/index.mjs +12 -34
- package/iframe-window/index.mjs +13 -40
- package/image-cropper/index.mjs +46 -171
- package/image-preview/index.mjs +54 -168
- package/image-viewer/index.mjs +24 -50
- package/index.css +1 -0
- package/index.mjs +3973 -501
- package/input-number/index.mjs +84 -173
- package/input-number-range/index.mjs +20 -70
- package/j-s-x-component/index.mjs +3 -3
- package/keep-view-alive/index.mjs +47 -55
- package/keyboard/index.mjs +100 -113
- package/license/index.mjs +34 -51
- package/loading-view/index.mjs +14 -34
- package/login/index.mjs +33 -161
- package/monaco-editor/index.mjs +13 -21
- package/name-avatar/index.mjs +13 -32
- package/nav-bar/index.mjs +12 -31
- package/not-implement/index.mjs +14 -25
- package/notice/index.mjs +32 -80
- package/package.json +1 -1
- package/page/index.mjs +11 -23
- package/page-header/index.mjs +16 -37
- package/page-index/index.mjs +42 -93
- package/page-index-top/index.mjs +42 -84
- package/page-skeleton/index.mjs +24 -39
- package/page-skeleton-new/index.mjs +21 -68
- package/pageable-table/index.mjs +105 -227
- package/pageable-view/index.mjs +30 -83
- package/photo-swipe/index.mjs +62 -87
- package/present-view/index.mjs +114 -267
- package/queue/index.mjs +14 -29
- package/record-video/index.mjs +29 -66
- package/resize-observer/index.mjs +18 -30
- package/search/index.mjs +47 -81
- package/search-popover/index.mjs +57 -329
- package/sign/index.mjs +43 -60
- package/sign-panel/index.mjs +40 -151
- package/skeleton/index.mjs +18 -44
- package/split-pane/index.mjs +45 -129
- package/stateful/index.mjs +18 -26
- package/static-pageable-table/index.mjs +18 -44
- package/swiper/index.mjs +53 -94
- package/tab/index.mjs +13 -39
- package/tab-item/index.mjs +23 -37
- package/table-column/index.mjs +27 -35
- package/table-view/index.mjs +89 -209
- package/tag-render/index.mjs +34 -69
- package/text-ellipsis/index.mjs +22 -47
- package/tinymce-editor/index.mjs +174 -285
- package/toolbar/index.mjs +21 -42
- package/toolbar-button/index.mjs +25 -54
- package/verify/index.mjs +16 -29
- package/vue-cron/index.mjs +272 -1089
- package/vue-qr-code/index.mjs +19 -27
- package/vue-quill-editor/index.mjs +15 -27
- package/vue-tags-input/index.mjs +104 -224
- package/vue-tree-select/index.mjs +595 -742
- package/vue-video-player/index.mjs +42 -57
- package/watermark/index.mjs +27 -35
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +50 -112
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/flex-item/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var i = Object.defineProperty, u = Object.defineProperties;
|
|
2
|
+
var c = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var s = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var r = (t, e, l) => e in t ?
|
|
4
|
+
var v = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var r = (t, e, l) => e in t ? i(t, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[e] = l, o = (t, e) => {
|
|
6
6
|
for (var l in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
v.call(e, l) && r(t, l, e[l]);
|
|
8
8
|
if (s)
|
|
9
9
|
for (var l of s(e))
|
|
10
10
|
x.call(e, l) && r(t, l, e[l]);
|
|
11
11
|
return t;
|
|
12
|
-
}, f = (t, e) =>
|
|
12
|
+
}, f = (t, e) => u(t, c(e));
|
|
13
13
|
import { g as m } from "../chunks/index.57f871af.mjs";
|
|
14
|
-
import { n as
|
|
15
|
-
const
|
|
14
|
+
import { n as C } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
15
|
+
const d = {
|
|
16
16
|
name: "FlexItem",
|
|
17
17
|
functional: !0,
|
|
18
18
|
props: {
|
|
@@ -50,8 +50,8 @@ const h = {
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
render(t, { children: e, data: l, props: n }) {
|
|
53
|
-
const
|
|
54
|
-
return n.absolute && !n.relative &&
|
|
53
|
+
const a = m(l.class, n.relative ? "flex-item-relative" : "flex-item");
|
|
54
|
+
return n.absolute && !n.relative && a.push("flex-item-relative"), n.center || n.horizonCenter && n.verticalCenter ? (a.push("horizon-center"), a.push("vertical-center")) : (n.horizonCenter && a.push("horizon-center"), n.verticalCenter && a.push("vertical-center")), n.textCenter && a.push("text-center"), n.flexColumn && a.push("flex-column"), n.flexRow && a.push("flex-row"), n.absolute ? t("div", f(o({}, l), { class: a }), [
|
|
55
55
|
t(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
@@ -60,28 +60,20 @@ const h = {
|
|
|
60
60
|
},
|
|
61
61
|
e
|
|
62
62
|
)
|
|
63
|
-
]) : t("div", f(
|
|
63
|
+
]) : t("div", f(o({}, l), { class: a }), e);
|
|
64
64
|
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var B = /* @__PURE__ */ d(
|
|
65
|
+
}, h = null, _ = null;
|
|
66
|
+
var y = /* @__PURE__ */ C(
|
|
67
|
+
d,
|
|
69
68
|
h,
|
|
70
|
-
|
|
71
|
-
y,
|
|
69
|
+
_,
|
|
72
70
|
!1,
|
|
73
|
-
|
|
71
|
+
null,
|
|
74
72
|
null,
|
|
75
73
|
null,
|
|
76
74
|
null
|
|
77
75
|
);
|
|
78
|
-
|
|
79
|
-
for (let e in i)
|
|
80
|
-
this[e] = i[e];
|
|
81
|
-
}
|
|
82
|
-
const F = /* @__PURE__ */ function() {
|
|
83
|
-
return B.exports;
|
|
84
|
-
}();
|
|
76
|
+
const b = y.exports;
|
|
85
77
|
export {
|
|
86
|
-
|
|
78
|
+
b as default
|
|
87
79
|
};
|
package/flex-row/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var i = Object.defineProperty, f = Object.defineProperties;
|
|
2
|
+
var u = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var o = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
4
|
+
var C = Object.prototype.hasOwnProperty, h = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var a = (n, e, t) => e in n ? i(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, s = (n, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
C.call(e, t) && a(n, t, e[t]);
|
|
8
8
|
if (o)
|
|
9
|
-
for (var
|
|
10
|
-
h.call(e,
|
|
11
|
-
return
|
|
12
|
-
}, c = (
|
|
13
|
-
import { g as
|
|
14
|
-
import { n as
|
|
15
|
-
const
|
|
9
|
+
for (var t of o(e))
|
|
10
|
+
h.call(e, t) && a(n, t, e[t]);
|
|
11
|
+
return n;
|
|
12
|
+
}, c = (n, e) => f(n, u(e));
|
|
13
|
+
import { g as _ } from "../chunks/index.57f871af.mjs";
|
|
14
|
+
import { n as m } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
15
|
+
const d = {
|
|
16
16
|
name: "FlexRow",
|
|
17
17
|
functional: !0,
|
|
18
18
|
props: {
|
|
@@ -33,30 +33,22 @@ const x = {
|
|
|
33
33
|
default: !1
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
render(
|
|
37
|
-
const
|
|
38
|
-
return
|
|
36
|
+
render(n, { data: e, children: t, props: l }) {
|
|
37
|
+
const r = _(e.class, "flex-row");
|
|
38
|
+
return l.center || l.horizonCenter && l.verticalCenter ? (r.push("horizon-center"), r.push("vertical-center")) : (l.horizonCenter && r.push("horizon-center"), l.verticalCenter && r.push("vertical-center")), l.textCenter && r.push("text-center"), n("div", c(s({}, e), { class: r }), t);
|
|
39
39
|
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
}, v = null, x = null;
|
|
41
|
+
var p = /* @__PURE__ */ m(
|
|
42
|
+
d,
|
|
43
|
+
v,
|
|
44
44
|
x,
|
|
45
|
-
m,
|
|
46
|
-
p,
|
|
47
45
|
!1,
|
|
48
|
-
|
|
46
|
+
null,
|
|
49
47
|
null,
|
|
50
48
|
null,
|
|
51
49
|
null
|
|
52
50
|
);
|
|
53
|
-
|
|
54
|
-
for (let e in i)
|
|
55
|
-
this[e] = i[e];
|
|
56
|
-
}
|
|
57
|
-
const R = /* @__PURE__ */ function() {
|
|
58
|
-
return z.exports;
|
|
59
|
-
}();
|
|
51
|
+
const B = p.exports;
|
|
60
52
|
export {
|
|
61
|
-
|
|
53
|
+
B as default
|
|
62
54
|
};
|
package/flex-scroller/index.mjs
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import { n
|
|
2
|
-
|
|
3
|
-
var e = this, l = e.$createElement, n = e._self._c || l;
|
|
4
|
-
return n("div", {
|
|
5
|
-
staticClass: "flex-scroller-wrapper"
|
|
6
|
-
}, [n("div", {
|
|
7
|
-
class: ["flex-scroller", {
|
|
8
|
-
"flex-column": e.flexColumn,
|
|
9
|
-
"flex-row": e.flexRow,
|
|
10
|
-
"content-scroll": e.contentScroll
|
|
11
|
-
}, e.contentClass]
|
|
12
|
-
}, [e._t("default")], 2)]);
|
|
13
|
-
}, c = [];
|
|
14
|
-
const s = {
|
|
1
|
+
import { n } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
2
|
+
const o = {
|
|
15
3
|
name: "FlexScroller",
|
|
16
4
|
props: {
|
|
17
5
|
flexColumn: Boolean,
|
|
@@ -24,24 +12,25 @@ const s = {
|
|
|
24
12
|
default: !0
|
|
25
13
|
}
|
|
26
14
|
}
|
|
27
|
-
}
|
|
28
|
-
var
|
|
29
|
-
|
|
15
|
+
};
|
|
16
|
+
var r = function() {
|
|
17
|
+
var l = this, e = l._self._c;
|
|
18
|
+
return e("div", { staticClass: "flex-scroller-wrapper" }, [e("div", { class: [
|
|
19
|
+
"flex-scroller",
|
|
20
|
+
{ "flex-column": l.flexColumn, "flex-row": l.flexRow, "content-scroll": l.contentScroll },
|
|
21
|
+
l.contentClass
|
|
22
|
+
] }, [l._t("default")], 2)]);
|
|
23
|
+
}, t = [], s = /* @__PURE__ */ n(
|
|
24
|
+
o,
|
|
30
25
|
r,
|
|
31
|
-
|
|
26
|
+
t,
|
|
32
27
|
!1,
|
|
33
|
-
|
|
28
|
+
null,
|
|
34
29
|
null,
|
|
35
30
|
null,
|
|
36
31
|
null
|
|
37
32
|
);
|
|
38
|
-
|
|
39
|
-
for (let l in t)
|
|
40
|
-
this[l] = t[l];
|
|
41
|
-
}
|
|
42
|
-
const f = /* @__PURE__ */ function() {
|
|
43
|
-
return a.exports;
|
|
44
|
-
}();
|
|
33
|
+
const _ = s.exports;
|
|
45
34
|
export {
|
|
46
|
-
|
|
35
|
+
_ as default
|
|
47
36
|
};
|
package/flow/index.mjs
CHANGED
|
@@ -1,49 +1,6 @@
|
|
|
1
|
-
import { s as l, r
|
|
2
|
-
import { n as
|
|
3
|
-
|
|
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 f = {
|
|
1
|
+
import { s as l, r } from "../chunks/util.ae730cde.mjs";
|
|
2
|
+
import { n as a } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
3
|
+
const c = {
|
|
47
4
|
name: "Flow",
|
|
48
5
|
props: {
|
|
49
6
|
value: {
|
|
@@ -129,8 +86,8 @@ const f = {
|
|
|
129
86
|
get() {
|
|
130
87
|
return this.value;
|
|
131
88
|
},
|
|
132
|
-
set(
|
|
133
|
-
this.$emit("input",
|
|
89
|
+
set(e) {
|
|
90
|
+
this.$emit("input", e), this.$emit("change", e);
|
|
134
91
|
}
|
|
135
92
|
},
|
|
136
93
|
styleName() {
|
|
@@ -142,7 +99,7 @@ const f = {
|
|
|
142
99
|
}
|
|
143
100
|
},
|
|
144
101
|
created() {
|
|
145
|
-
this.id =
|
|
102
|
+
this.id = r(), this.jsplumbSetting.Container = this.id;
|
|
146
103
|
},
|
|
147
104
|
mounted() {
|
|
148
105
|
this.init();
|
|
@@ -153,59 +110,59 @@ const f = {
|
|
|
153
110
|
this.jsPlumbInit();
|
|
154
111
|
});
|
|
155
112
|
},
|
|
156
|
-
handleClick(
|
|
157
|
-
this.$emit("click",
|
|
113
|
+
handleClick(e) {
|
|
114
|
+
this.$emit("click", e);
|
|
158
115
|
},
|
|
159
116
|
// 是否具有该线
|
|
160
|
-
hasLine(
|
|
117
|
+
hasLine(e, t) {
|
|
161
118
|
for (let n = 0; n < this.data.lineList.length; n++) {
|
|
162
119
|
const i = this.data.lineList[n];
|
|
163
|
-
if (i.from ===
|
|
120
|
+
if (i.from === e && i.to === t)
|
|
164
121
|
return !0;
|
|
165
122
|
}
|
|
166
123
|
return !1;
|
|
167
124
|
},
|
|
168
125
|
// 是否含有相反的线
|
|
169
|
-
hashOppositeLine(
|
|
170
|
-
return this.hasLine(
|
|
126
|
+
hashOppositeLine(e, t) {
|
|
127
|
+
return this.hasLine(t, e);
|
|
171
128
|
},
|
|
172
129
|
// 删除线
|
|
173
|
-
deleteLine(
|
|
130
|
+
deleteLine(e, t) {
|
|
174
131
|
this.option.lineList = this.option.lineList.filter(function(n) {
|
|
175
|
-
return n.from !==
|
|
132
|
+
return n.from !== e && n.to !== t;
|
|
176
133
|
});
|
|
177
134
|
},
|
|
178
135
|
// 改变连线
|
|
179
|
-
changeLine(
|
|
180
|
-
this.deleteLine(
|
|
136
|
+
changeLine(e, t) {
|
|
137
|
+
this.deleteLine(e, t);
|
|
181
138
|
},
|
|
182
139
|
// 改变节点的位置
|
|
183
|
-
changeNodeSite({ index:
|
|
140
|
+
changeNodeSite({ index: e, left: t, top: n }) {
|
|
184
141
|
for (let i = 0; i < this.option.nodeList.length; i++)
|
|
185
|
-
i ===
|
|
142
|
+
i === e && (this.$set(this.option.nodeList[i], "left", t), this.$set(this.option.nodeList[i], "top", n));
|
|
186
143
|
},
|
|
187
144
|
// 删除节点
|
|
188
|
-
deleteNode(
|
|
189
|
-
return this.$confirm(`确定要删除节点${
|
|
145
|
+
deleteNode(e) {
|
|
146
|
+
return this.$confirm(`确定要删除节点${e}?`, "提示", {
|
|
190
147
|
confirmButtonText: "确定",
|
|
191
148
|
cancelButtonText: "取消",
|
|
192
149
|
type: "warning",
|
|
193
150
|
closeOnClickModal: !1
|
|
194
151
|
}).then(() => {
|
|
195
|
-
this.option.nodeList.forEach((
|
|
196
|
-
|
|
152
|
+
this.option.nodeList.forEach((t) => {
|
|
153
|
+
t.id === e && (t.display = !0);
|
|
197
154
|
}), this.$nextTick(function() {
|
|
198
|
-
this.jsPlumb.removeAllEndpoints(
|
|
155
|
+
this.jsPlumb.removeAllEndpoints(e);
|
|
199
156
|
});
|
|
200
157
|
}).catch(() => {
|
|
201
158
|
}), !0;
|
|
202
159
|
},
|
|
203
160
|
// 添加新的节点
|
|
204
|
-
addNode(
|
|
205
|
-
const
|
|
161
|
+
addNode(e) {
|
|
162
|
+
const t = this.option.nodeList.length, n = `node${t}`;
|
|
206
163
|
this.option.nodeList.push({
|
|
207
|
-
id: `node${
|
|
208
|
-
name:
|
|
164
|
+
id: `node${t}`,
|
|
165
|
+
name: e,
|
|
209
166
|
left: 0,
|
|
210
167
|
top: 0
|
|
211
168
|
}), this.$nextTick(function() {
|
|
@@ -215,16 +172,16 @@ const f = {
|
|
|
215
172
|
});
|
|
216
173
|
},
|
|
217
174
|
loadEasyFlow() {
|
|
218
|
-
for (let
|
|
219
|
-
const
|
|
220
|
-
this.jsPlumb.makeSource(
|
|
175
|
+
for (let e = 0; e < this.option.nodeList.length; e++) {
|
|
176
|
+
const t = this.option.nodeList[e];
|
|
177
|
+
this.jsPlumb.makeSource(t.id, this.jsplumbSourceOptions), this.jsPlumb.makeTarget(t.id, this.jsplumbTargetOptions), this.jsPlumb.draggable(t.id);
|
|
221
178
|
}
|
|
222
|
-
for (let
|
|
223
|
-
const
|
|
179
|
+
for (let e = 0; e < this.option.lineList.length; e++) {
|
|
180
|
+
const t = this.option.lineList[e];
|
|
224
181
|
this.jsPlumb.connect(
|
|
225
182
|
{
|
|
226
|
-
source:
|
|
227
|
-
target:
|
|
183
|
+
source: t.from,
|
|
184
|
+
target: t.to
|
|
228
185
|
},
|
|
229
186
|
this.jsplumbConnectOptions
|
|
230
187
|
);
|
|
@@ -234,58 +191,61 @@ const f = {
|
|
|
234
191
|
});
|
|
235
192
|
},
|
|
236
193
|
jsPlumbInit() {
|
|
237
|
-
const
|
|
194
|
+
const e = this;
|
|
238
195
|
this.jsPlumb.ready(function() {
|
|
239
|
-
|
|
240
|
-
console.log("click",
|
|
196
|
+
e.jsPlumb.importDefaults(e.jsplumbSetting), e.jsPlumb.setSuspendDrawing(!1, !0), e.loadEasyFlow(), e.jsPlumb.bind("click", function(t) {
|
|
197
|
+
console.log("click", t), e.$confirm("确定删除所点击的线吗?", "提示", {
|
|
241
198
|
confirmButtonText: "确定",
|
|
242
199
|
cancelButtonText: "取消",
|
|
243
200
|
type: "warning"
|
|
244
201
|
}).then(() => {
|
|
245
|
-
|
|
202
|
+
e.jsPlumb.deleteConnection(t);
|
|
246
203
|
}).catch(() => {
|
|
247
204
|
});
|
|
248
|
-
}),
|
|
249
|
-
console.log("connection",
|
|
250
|
-
const n =
|
|
251
|
-
|
|
205
|
+
}), e.jsPlumb.bind("connection", function(t) {
|
|
206
|
+
console.log("connection", t);
|
|
207
|
+
const n = t.source.id, i = t.target.id;
|
|
208
|
+
e.loadEasyFlowFinish && e.option.lineList.push({
|
|
252
209
|
from: n,
|
|
253
210
|
to: i
|
|
254
211
|
});
|
|
255
|
-
}),
|
|
256
|
-
console.log("connectionDetached",
|
|
257
|
-
}),
|
|
258
|
-
console.log("connectionMoved",
|
|
259
|
-
}),
|
|
260
|
-
console.log("contextmenu",
|
|
261
|
-
}),
|
|
262
|
-
console.log("beforeDrop",
|
|
263
|
-
const n =
|
|
264
|
-
return n === i ? (
|
|
265
|
-
}),
|
|
266
|
-
console.log("beforeDetach",
|
|
212
|
+
}), e.jsPlumb.bind("connectionDetached", function(t) {
|
|
213
|
+
console.log("connectionDetached", t), e.deleteLine(t.sourceId, t.targetId);
|
|
214
|
+
}), e.jsPlumb.bind("connectionMoved", function(t) {
|
|
215
|
+
console.log("connectionMoved", t), e.changeLine(t.originalSourceId, t.originalTargetId);
|
|
216
|
+
}), e.jsPlumb.bind("contextmenu", function(t) {
|
|
217
|
+
console.log("contextmenu", t);
|
|
218
|
+
}), e.jsPlumb.bind("beforeDrop", function(t) {
|
|
219
|
+
console.log("beforeDrop", t);
|
|
220
|
+
const n = t.sourceId, i = t.targetId;
|
|
221
|
+
return n === i ? (e.$message.error("不能连接自己"), !1) : e.hasLine(n, i) ? (e.$message.error("不能重复连线"), !1) : e.hashOppositeLine(n, i) ? (e.$message.error("不能回环哦"), !1) : !0;
|
|
222
|
+
}), e.jsPlumb.bind("beforeDetach", function(t) {
|
|
223
|
+
console.log("beforeDetach", t);
|
|
267
224
|
});
|
|
268
225
|
});
|
|
269
226
|
}
|
|
270
227
|
}
|
|
271
|
-
}
|
|
272
|
-
var
|
|
273
|
-
|
|
274
|
-
|
|
228
|
+
};
|
|
229
|
+
var u = function() {
|
|
230
|
+
var t = this, n = t._self._c;
|
|
231
|
+
return n("div", { staticClass: "avue-flow", style: t.styleName }, [n("div", { style: t.styleName, attrs: { id: t.id } }, [n("div", { staticClass: "avue-grid" }), t._l(t.option.nodeList, function(i, o) {
|
|
232
|
+
return [i.display ? t._e() : n("FlowNode", { key: o, attrs: { id: i.id, node: i, index: o, active: t.active }, on: { changeNodeSite: t.changeNodeSite }, nativeOn: { click: function(s) {
|
|
233
|
+
return t.handleClick(i);
|
|
234
|
+
} }, scopedSlots: t._u([{ key: "header", fn: function({ node: s }) {
|
|
235
|
+
return [t._t("header", null, { node: s })];
|
|
236
|
+
} }], null, !0) }, [t._t("default", null, { node: i })], 2)];
|
|
237
|
+
})], 2)]);
|
|
238
|
+
}, d = [], h = /* @__PURE__ */ a(
|
|
239
|
+
c,
|
|
240
|
+
u,
|
|
275
241
|
d,
|
|
276
242
|
!1,
|
|
277
|
-
|
|
243
|
+
null,
|
|
278
244
|
null,
|
|
279
245
|
null,
|
|
280
246
|
null
|
|
281
247
|
);
|
|
282
|
-
|
|
283
|
-
for (let e in r)
|
|
284
|
-
this[e] = r[e];
|
|
285
|
-
}
|
|
286
|
-
const j = /* @__PURE__ */ function() {
|
|
287
|
-
return m.exports;
|
|
288
|
-
}();
|
|
248
|
+
const p = h.exports;
|
|
289
249
|
export {
|
|
290
|
-
|
|
250
|
+
p as default
|
|
291
251
|
};
|