@web-utils/component 3.8.2 → 4.0.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 (67) hide show
  1. package/card/index.mjs +13 -13
  2. package/chat/index.mjs +2 -2
  3. package/chunks/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
  4. package/chunks/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
  5. package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
  6. package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
  7. package/chunks/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
  8. package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
  9. package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
  10. package/dialog-form/index.mjs +6 -6
  11. package/flow/index.mjs +30 -32
  12. package/flow-designer/index.mjs +1 -1
  13. package/flow-node/index.mjs +1 -1
  14. package/form-holder/index.mjs +18 -36
  15. package/form-view/index.mjs +21 -23
  16. package/fy-array/index.mjs +2 -2
  17. package/fy-cascader/index.mjs +1 -1
  18. package/fy-checkbox/index.mjs +1 -1
  19. package/fy-code/index.mjs +1 -1
  20. package/fy-curd/index.mjs +141 -137
  21. package/fy-date/index.mjs +1 -1
  22. package/fy-draggable/index.mjs +27 -19
  23. package/fy-dynamic/index.mjs +64 -57
  24. package/fy-empty/index.mjs +1 -1
  25. package/fy-form/index.mjs +117 -136
  26. package/fy-form-design/index.mjs +15 -16
  27. package/fy-form-design/style.css +1 -1
  28. package/fy-input/index.mjs +2 -2
  29. package/fy-input-color/index.mjs +1 -1
  30. package/fy-input-icon/index.mjs +1 -1
  31. package/fy-input-map/index.mjs +56 -51
  32. package/fy-input-number/index.mjs +1 -1
  33. package/fy-input-table/index.mjs +46 -38
  34. package/fy-input-tree/index.mjs +1 -1
  35. package/fy-radio/index.mjs +1 -1
  36. package/fy-rate/index.mjs +1 -1
  37. package/fy-select/index.mjs +4 -4
  38. package/fy-slider/index.mjs +2 -2
  39. package/fy-switch/index.mjs +1 -1
  40. package/fy-tabs/index.mjs +0 -1
  41. package/fy-time/index.mjs +1 -1
  42. package/fy-title/index.mjs +1 -1
  43. package/fy-tree/index.mjs +1 -1
  44. package/fy-u-editor/index.mjs +1 -1
  45. package/fy-upload/index.mjs +3 -3
  46. package/highlight-j-s/index.mjs +1 -1
  47. package/image-cropper/index.mjs +1 -1
  48. package/image-preview/index.mjs +1 -1
  49. package/license/index.mjs +1 -1
  50. package/login/index.mjs +1 -1
  51. package/monaco-editor/index.mjs +10 -12
  52. package/package.json +17 -17
  53. package/pageable-table/index.mjs +33 -37
  54. package/pageable-view/index.mjs +53 -57
  55. package/record-video/index.mjs +1 -1
  56. package/search/index.mjs +2 -2
  57. package/search-popover/index.mjs +1 -1
  58. package/sign/index.mjs +1 -1
  59. package/split-pane/index.mjs +3 -3
  60. package/table-view/index.mjs +1 -3
  61. package/text-ellipsis/index.mjs +1 -1
  62. package/verify/index.mjs +1 -1
  63. package/vue-cron/index.mjs +117 -97
  64. package/vue-quill-editor/index.mjs +24 -13
  65. package/vue-tags-input/index.mjs +21 -10
  66. package/vue-video-player/index.mjs +10 -12
  67. package/web-types.json +2 -5
package/card/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
1
+ import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
2
2
  const n = {
3
3
  img: "img",
4
4
  title: "title",
@@ -21,13 +21,13 @@ const n = {
21
21
  };
22
22
  },
23
23
  computed: {
24
- imgKey: function() {
24
+ imgKey() {
25
25
  return this.option.props.img || this.propsDefault.img;
26
26
  },
27
- titleKey: function() {
27
+ titleKey() {
28
28
  return this.option.props.title || this.propsDefault.title;
29
29
  },
30
- infoKey: function() {
30
+ infoKey() {
31
31
  return this.option.props.info || this.propsDefault.info;
32
32
  },
33
33
  span() {
@@ -41,24 +41,24 @@ const n = {
41
41
  rowAdd() {
42
42
  this.$emit("row-add");
43
43
  },
44
- rowClick(r, t) {
45
- this.$emit("row-click", r, t);
44
+ rowClick(e, t) {
45
+ this.$emit("row-click", e, t);
46
46
  }
47
47
  }
48
48
  };
49
- var c = function() {
49
+ var l = function() {
50
50
  var t = this, a = t._self._c;
51
51
  return a("div", { staticClass: "avue-card" }, [a("ElRow", { attrs: { span: 24, gutter: t.gutter } }, [t.option.addBtn ? a("ElCol", { attrs: { span: t.span } }, [a("div", { staticClass: "avue-card__item avue-card__item--add", on: { click: function(s) {
52
52
  return t.rowAdd();
53
- } } }, [a("i", { staticClass: "el-icon-plus" }), a("span", [t._v("添加")])])]) : t._e(), t._l(t.data, function(s, i) {
54
- return a("ElCol", { key: i, attrs: { span: t.span } }, [a("div", { staticClass: "avue-card__item", on: { click: function(d) {
55
- return t.rowClick(s, i);
56
- } } }, [a("div", { staticClass: "avue-card__body" }, [a("div", { staticClass: "avue-card__avatar" }, [a("img", { attrs: { src: s[t.imgKey], alt: "" } })]), a("div", { staticClass: "avue-card__detail" }, [a("div", { staticClass: "avue-card__title" }, [t._v(" " + t._s(s[t.titleKey]) + " ")]), a("div", { staticClass: "avue-card__info" }, [t._v(" " + t._s(s[t.infoKey]) + " ")])])]), a("div", { staticClass: "avue-card__menu" }, [t._t("menu", null, { index: i, row: s })], 2)])]);
53
+ } } }, [a("i", { staticClass: "el-icon-plus" }), a("span", [t._v("添加")])])]) : t._e(), t._l(t.data, function(s, r) {
54
+ return a("ElCol", { key: r, attrs: { span: t.span } }, [a("div", { staticClass: "avue-card__item", on: { click: function(d) {
55
+ return t.rowClick(s, r);
56
+ } } }, [a("div", { staticClass: "avue-card__body" }, [a("div", { staticClass: "avue-card__avatar" }, [a("img", { attrs: { src: s[t.imgKey], alt: "" } })]), a("div", { staticClass: "avue-card__detail" }, [a("div", { staticClass: "avue-card__title" }, [t._v(" " + t._s(s[t.titleKey]) + " ")]), a("div", { staticClass: "avue-card__info" }, [t._v(" " + t._s(s[t.infoKey]) + " ")])])]), a("div", { staticClass: "avue-card__menu" }, [t._t("menu", null, { index: r, row: s })], 2)])]);
57
57
  })], 2)], 1);
58
- }, l = [], u = /* @__PURE__ */ e(
58
+ }, c = [], u = /* @__PURE__ */ i(
59
59
  o,
60
- c,
61
60
  l,
61
+ c,
62
62
  !1,
63
63
  null,
64
64
  null
package/chat/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { formatDate as r } from "@web-utils/integrations/dayjs";
2
- import { s as l } from "../chunks/util.CoahLDYn.mjs";
2
+ import { s as l } from "../chunks/util.DqFv_pWg.mjs";
3
3
  import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
4
  const d = {
5
5
  name: "Chat",
@@ -117,7 +117,7 @@ const d = {
117
117
  const t = this, e = Notification || window.Notification;
118
118
  if (e) {
119
119
  let a = function() {
120
- e.requestPermission(function(n) {
120
+ e.requestPermission((n) => {
121
121
  n === "granted" ? o() : console.log("用户无情残忍的拒绝了你!!!");
122
122
  });
123
123
  }, o = function() {
@@ -1,8 +1,8 @@
1
1
  import { isBlank as _ } from "@web-utils/core";
2
2
  import { formatDate as i } from "@web-utils/integrations/dayjs";
3
- import { p as h, M as g, A as b, b as c, q as A, e as S, k as d, t as T, h as C, v, u as x } from "./util.CoahLDYn.mjs";
3
+ import { p as h, M as g, A as b, b as c, q as A, e as S, k as d, t as T, h as C, v, u as x } from "./util.DqFv_pWg.mjs";
4
4
  import "../fy-u-editor/style.css";
5
- import { a as D, b as O } from "./dataformat.B9UvztrQ.mjs";
5
+ import { a as D, b as O } from "./dataformat.CpqOeGBl.mjs";
6
6
  import { s as j } from "./slot.DXIbhGat.mjs";
7
7
  import { n as L } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
8
8
  const R = (n = {}, e = {}, s = {}, r = []) => {
@@ -1,5 +1,5 @@
1
1
  import { isBlank as l } from "@web-utils/core";
2
- import { S as E, K as A, b as I, M as f, A as h, R as T, c as p, e as m, f as L, g as S, h as B, I as _ } from "./util.CoahLDYn.mjs";
2
+ import { S as E, K as A, b as I, M as f, A as h, R as T, c as p, e as m, f as L, g as S, h as B, I as _ } from "./util.DqFv_pWg.mjs";
3
3
  const P = {
4
4
  common: {
5
5
  condition: "条件",
@@ -138,7 +138,7 @@ const v = (e, n = 12, t = !1) => {
138
138
  }), {
139
139
  tableForm: n
140
140
  };
141
- }, O = function(e) {
141
+ }, O = (e) => {
142
142
  const n = e.placeholder, t = e.label;
143
143
  return l(n) ? E.includes(e.type) ? `${u("tip.select")} ${t}` : `${u("tip.input")} ${t}` : n;
144
144
  };
@@ -1,27 +1,27 @@
1
1
  import { isBlank as P } from "@web-utils/core";
2
- import { m as w, n as E } from "./util.CoahLDYn.mjs";
3
- const F = (n, t = []) => new Promise((i) => {
2
+ import { m as w, n as E } from "./util.DqFv_pWg.mjs";
3
+ const F = (d, r = []) => new Promise((i) => {
4
4
  const c = [], s = [], a = {};
5
- n.forEach((r) => {
6
- r.parentProp && c.push(r);
7
- }), t.forEach((r, e) => {
5
+ d.forEach((t) => {
6
+ t.parentProp && c.push(t);
7
+ }), r.forEach((t, e) => {
8
8
  c.forEach((o) => {
9
9
  o.hide !== !0 && o.dicFlag !== !1 && s.push(
10
- new Promise((d) => {
11
- P(r[o.parentProp]) ? d({
10
+ new Promise((n) => {
11
+ P(t[o.parentProp]) ? n({
12
12
  prop: o.prop,
13
13
  data: [],
14
14
  index: e
15
15
  }) : o.dicUrl && D({
16
- url: `${o.dicUrl.replace("{{key}}", r[o.parentProp])}`,
16
+ url: `${o.dicUrl.replace("{{key}}", t[o.parentProp])}`,
17
17
  props: o.props,
18
18
  method: o.dicMethod,
19
19
  headers: o.dicHeaders,
20
20
  formatter: o.dicFormatter,
21
21
  query: o.dicQuery,
22
- form: r
22
+ form: t
23
23
  }).then((u) => {
24
- d({
24
+ n({
25
25
  prop: o.prop,
26
26
  data: u,
27
27
  index: e
@@ -30,36 +30,36 @@ const F = (n, t = []) => new Promise((i) => {
30
30
  })
31
31
  );
32
32
  });
33
- }), Promise.all(s).then((r) => {
34
- r.forEach((e) => {
33
+ }), Promise.all(s).then((t) => {
34
+ t.forEach((e) => {
35
35
  P(a[e.index]) && (a[e.index] = {}), a[e.index][e.prop] = e.data;
36
36
  }), i(a);
37
37
  });
38
- }), U = (n) => {
39
- let t = [];
38
+ }), U = (d) => {
39
+ let r = [];
40
40
  return new Promise((i, c) => {
41
- t = k(n).ajaxdic, x(t).then((a) => {
41
+ r = k(d).ajaxdic, x(r).then((a) => {
42
42
  i(a);
43
43
  }).catch((a) => {
44
44
  c(a);
45
45
  });
46
46
  });
47
- }, K = (n) => {
48
- const t = {}, i = n.dicData || {};
49
- return n.column.forEach((c) => {
50
- c.dicData && (t[c.prop] = w(c.dicData, c.props, c.dataType));
51
- }), Object.assign(i, t);
47
+ }, K = (d) => {
48
+ const r = {}, i = d.dicData || {};
49
+ return d.column.forEach((c) => {
50
+ c.dicData && (r[c.prop] = w(c.dicData, c.props, c.dataType));
51
+ }), Object.assign(i, r);
52
52
  };
53
- function k(n) {
54
- const t = n.column || [], i = [], c = {};
53
+ function k(d) {
54
+ const r = d.column || [], i = [], c = {};
55
55
  let s = [];
56
- return t.forEach((a) => {
57
- const r = a.dicData, e = a.dicUrl, o = a.prop, d = a.parentProp;
58
- s = s.concat(a.cascader || []), Array.isArray(r) && (c[o] = r), !(a.dicFlag === !1 || a.lazy === !0 || s.includes(o)) && e && !d && i.push({
56
+ return r.forEach((a) => {
57
+ const t = a.dicData, e = a.dicUrl, o = a.prop, n = a.parentProp;
58
+ s = s.concat(a.cascader || []), Array.isArray(t) && (c[o] = t), !(a.dicFlag === !1 || a.lazy === !0 || s.includes(o)) && e && !n && i.push({
59
59
  url: e,
60
60
  name: o,
61
61
  method: a.dicMethod,
62
- headers: t.dicHeaders,
62
+ headers: r.dicHeaders,
63
63
  formatter: a.dicFormatter,
64
64
  props: a.props,
65
65
  dataType: a.dataType,
@@ -71,51 +71,51 @@ function k(n) {
71
71
  locationdic: c
72
72
  };
73
73
  }
74
- function x(n) {
75
- const t = {}, i = [];
74
+ function x(d) {
75
+ const r = {}, i = [];
76
76
  return new Promise((c) => {
77
- n.forEach((s) => {
77
+ d.forEach((s) => {
78
78
  i.push(
79
79
  new Promise((a) => {
80
80
  D(
81
81
  Object.assign(s, {
82
82
  url: `${s.url.replace("{{key}}", "")}`
83
83
  })
84
- ).then((r) => {
85
- r = w(r, s.props, s.dataType), a(r);
84
+ ).then((t) => {
85
+ t = w(t, s.props, s.dataType), a(t);
86
86
  }).catch(() => {
87
87
  a([]);
88
88
  });
89
89
  })
90
90
  );
91
91
  }), Promise.all(i).then((s) => {
92
- n.forEach((a, r) => {
93
- t[a.name] = s[r];
94
- }), c(t);
92
+ d.forEach((a, t) => {
93
+ r[a.name] = s[t];
94
+ }), c(r);
95
95
  });
96
96
  });
97
97
  }
98
- const D = (n) => {
99
- let { url: t, query: i, method: c, resKey: s, props: a, formatter: r, headers: e = {}, value: o = "", column: d, form: u = {} } = n;
100
- d && (t = d.dicUrl, c = d.dicMethod, e = d.headers || {}, i = d.dicQuery || {}, r = d.dicFormatter, a = d.props);
98
+ const D = (d) => {
99
+ let { url: r, query: i, method: c, resKey: s, props: a, formatter: t, headers: e = {}, value: o = "", column: n, form: u = {} } = d;
100
+ n && (r = n.dicUrl, c = n.dicMethod, e = n.headers || {}, i = n.dicQuery || {}, t = n.dicFormatter, a = n.props);
101
101
  const g = "key";
102
- t = t || "";
102
+ r = r || "";
103
103
  let m;
104
104
  const y = {};
105
- return m = t.match(/[^{}]+(?=})/g) || [], m.forEach((p) => {
105
+ return m = r.match(/[^{}]+(?=})/g) || [], m.forEach((p) => {
106
106
  const f = `{{${p}}}`, h = u[p];
107
- p === g ? t = t.replace(f, o) : t = t.replace(f, h);
107
+ p === g ? r = r.replace(f, o) : r = r.replace(f, h);
108
108
  }), c === "post" && (m = Object.keys(i), m.forEach((p) => {
109
109
  const f = i[p];
110
110
  typeof f == "string" && f.match(/\{{|}}/g) ? y[p] = u[f.replace(/\{{|}}/g, "")] : y[p] = f;
111
111
  })), a && (s = (a || {}).res || s), new Promise((p) => {
112
112
  const f = (h) => {
113
113
  let l = [];
114
- typeof r == "function" ? l = r(h.data) : l = E(h.data, s), p(l);
114
+ typeof t == "function" ? l = t(h.data) : l = E(h.data, s), p(l);
115
115
  };
116
- c === "post" ? window.axios.post(t, y, { headers: e }).then(function(h) {
116
+ c === "post" ? window.axios.post(r, y, { headers: e }).then((h) => {
117
117
  f(h);
118
- }).catch(() => [p([])]) : window.axios.get(t, { params: i, headers: e }).then(function(h) {
118
+ }).catch(() => [p([])]) : window.axios.get(r, { params: i, headers: e }).then((h) => {
119
119
  f(h);
120
120
  }).catch(() => [p([])]);
121
121
  });
@@ -1,7 +1,7 @@
1
- import { D as r, a as i, b as a } from "./util.CoahLDYn.mjs";
1
+ import { D as r, a as i, b as a } from "./util.DqFv_pWg.mjs";
2
2
  import { s as l } from "./slot.DXIbhGat.mjs";
3
3
  import { isBlank as s } from "@web-utils/core";
4
- import { i as p } from "./dataformat.B9UvztrQ.mjs";
4
+ import { i as p } from "./dataformat.CpqOeGBl.mjs";
5
5
  const f = {
6
6
  mixins: [l],
7
7
  data() {
@@ -1,5 +1,5 @@
1
- import { l as a, a as n, b as h, s as r } from "./dic.CET0XdKP.mjs";
2
- import { D as d, d as c } from "./util.CoahLDYn.mjs";
1
+ import { l as a, a as n, b as h, s as r } from "./dic.Dkl-leRW.mjs";
2
+ import { D as d, d as c } from "./util.DqFv_pWg.mjs";
3
3
  import { s as l } from "./slot.DXIbhGat.mjs";
4
4
  import { isBlank as s } from "@web-utils/core";
5
5
  const f = {
@@ -47,12 +47,12 @@ const a = {
47
47
  title: "需要引入mock模拟数据包",
48
48
  github: "https://github.com/Colingo/mock"
49
49
  }
50
- }, o = {
51
- logs: function(s) {
50
+ }, e = {
51
+ logs(s) {
52
52
  const t = a[s], i = l(s);
53
53
  i.warning(t.title), i.warning(`CDN:${t.url || "-"}`), i.warning(`GITHUB:${t.github || "-"}`);
54
54
  }
55
55
  };
56
56
  export {
57
- o as p
57
+ e as p
58
58
  };
@@ -67,49 +67,48 @@ function Y(e) {
67
67
  function $(...e) {
68
68
  let n = e[0] || {}, t = !1;
69
69
  const r = Array.prototype.slice.call(e);
70
- let o = 1, s, i, c, a, d = !1;
71
- for (typeof n == "boolean" && (t = n, o++, n = e[1]); o < r.length; o++)
72
- if ((s = r[o]) != null)
73
- for (c in s)
74
- a = s[c], i = n[c], t && (toString.call(a) === "[object Object]" || (d = toString.call(a) === "[object Array]")) ? (d ? i = toString.call(i) === "[object Array]" ? i : [] : i = toString.call(i) === "[object Object]" ? i : {}, n[c] = $(t, i, a)) : a !== void 0 && a !== i && (n[c] = a);
70
+ let s = 1, o, i, c, a, d = !1;
71
+ for (typeof n == "boolean" && (t = n, s++, n = e[1]); s < r.length; s++)
72
+ if ((o = r[s]) != null)
73
+ for (c in o)
74
+ a = o[c], i = n[c], t && (toString.call(a) === "[object Object]" || (d = toString.call(a) === "[object Array]")) ? (d ? i = toString.call(i) === "[object Array]" ? i : [] : i = toString.call(i) === "[object Object]" ? i : {}, n[c] = $(t, i, a)) : a !== void 0 && a !== i && (n[c] = a);
75
75
  return n;
76
76
  }
77
77
  function H(e, n) {
78
- const t = n.split("."), r = t.splice(0, 1)[0], o = {};
79
- if (o[r] = {}, t.length >= 2) {
80
- const s = "{", i = "}";
78
+ const t = n.split("."), r = t.splice(0, 1)[0], s = {};
79
+ if (s[r] = {}, t.length >= 2) {
81
80
  let c = "";
82
81
  t.forEach((a) => {
83
- c = `${c}${s}"${a}":`;
82
+ c = `${c}{"${a}":`;
84
83
  }), c = `${c}""`;
85
84
  for (let a = 0; a < t.length; a++)
86
- c = `${c}${i}`;
87
- c = JSON.parse(c), o[r] = c;
85
+ c = `${c}}`;
86
+ c = JSON.parse(c), s[r] = c;
88
87
  }
89
- return e = $(!0, e, o), e;
88
+ return e = $(!0, e, s), e;
90
89
  }
91
90
  function q(e, n) {
92
- const t = e.split(","), r = t[0].match(/:(.*?);/)[1], o = atob(t[1]);
93
- let s = o.length;
94
- const i = new Uint8Array(s);
95
- for (; s--; )
96
- i[s] = o.charCodeAt(s);
91
+ const t = e.split(","), r = t[0].match(/:(.*?);/)[1], s = atob(t[1]);
92
+ let o = s.length;
93
+ const i = new Uint8Array(o);
94
+ for (; o--; )
95
+ i[o] = s.charCodeAt(o);
97
96
  return new File([i], n, {
98
97
  type: r
99
98
  });
100
99
  }
101
100
  function z(e, n, t = "prop") {
102
101
  let r = -1;
103
- const o = (() => {
104
- let s;
102
+ const s = (() => {
103
+ let o;
105
104
  return e.forEach((i) => {
106
- i.column ? s = "group" : i.children && (s = "tree");
107
- }), s;
105
+ i.column ? o = "group" : i.children && (o = "tree");
106
+ }), o;
108
107
  })();
109
- return o === "group" ? e.forEach((s) => {
110
- const i = E(s.column, n, t);
108
+ return s === "group" ? e.forEach((o) => {
109
+ const i = E(o.column, n, t);
111
110
  i !== -1 && (r = i);
112
- }) : o === "tree" ? r = S(e, n, { value: t }, !0) : r = E(e, n, t), r;
111
+ }) : s === "tree" ? r = S(e, n, { value: t }, !0) : r = E(e, n, t), r;
113
112
  }
114
113
  function Q() {
115
114
  const e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", n = e.length;
@@ -139,51 +138,51 @@ const u = (e) => {
139
138
  }
140
139
  return n;
141
140
  }, X = (e, n = "") => (e || (e = n), e ? (e = `${e}`, e.indexOf("%") === -1 && e.indexOf("px") === -1 && (e = `${e}px`), e) : ""), O = (e, n) => l(e) ? e : n === "number" ? Number(e) : n === "string" ? `${e}` : e, _ = (e = [], n = {}, t) => {
142
- const r = n.value || f.value, o = n.children || f.children;
143
- return e.forEach((s) => {
144
- s[r] = O(s[r], t), s[o] && _(s[o], n, t);
141
+ const r = n.value || f.value, s = n.children || f.children;
142
+ return e.forEach((o) => {
143
+ o[r] = O(o[r], t), o[s] && _(o[s], n, t);
145
144
  }), e;
146
145
  }, Z = (e, n, t) => {
147
146
  if (l(e)) return n;
148
- const r = n instanceof Array, o = r ? n : [n];
147
+ const r = n instanceof Array, s = r ? n : [n];
149
148
  t = t || f;
150
- const s = [];
151
- for (let i = 0; i < o.length; i++)
152
- s.push(S(e, o[i], t) || o[i]);
153
- return r ? s.join(T) : s.join();
149
+ const o = [];
150
+ for (let i = 0; i < s.length; i++)
151
+ o.push(S(e, s[i], t) || s[i]);
152
+ return r ? o.join(T) : o.join();
154
153
  }, ee = (e, n = ["", "$"], t = !0) => {
155
154
  const r = t ? u(e) : e;
156
- for (const o in r)
157
- n.includes("") && l(r[o]) && delete r[o], n.includes("$") && o.indexOf("$") !== -1 && delete r[o];
155
+ for (const s in r)
156
+ n.includes("") && l(r[s]) && delete r[s], n.includes("$") && s.indexOf("$") !== -1 && delete r[s];
158
157
  return r;
159
158
  }, N = (e = [], n = {}) => {
160
159
  let t = u(e);
161
160
  const r = n[f.groups] || f.groups;
162
- return e.forEach((o) => {
163
- o[r] && (t = t.concat(o[r]));
161
+ return e.forEach((s) => {
162
+ s[r] && (t = t.concat(s[r]));
164
163
  }), t;
165
164
  }, S = (e, n, t, r = null) => {
166
- let o;
165
+ let s;
167
166
  r || (e = N(e, t));
168
- const s = (i) => {
167
+ const o = (i) => {
169
168
  const c = t.label || f.label, a = t.value || f.value, d = t.children || f.children;
170
169
  for (let p = 0; p < i.length; p++) {
171
170
  const h = i[p], w = h[d] || [];
172
- h[a] === n ? o = r ? h : h[c] : s(w);
171
+ h[a] === n ? s = r ? h : h[c] : o(w);
173
172
  }
174
173
  };
175
- return s(e), o;
174
+ return o(e), s;
176
175
  }, j = (e) => (Array.isArray(e) ? e : e.data) || [], te = (e, n = "", t = null) => {
177
176
  const r = n.split(".");
178
- let o = e;
179
- return r[0] === "" && t !== "object" ? j(e) : (r[0] !== "" && r.forEach((s) => {
180
- o = o[s];
181
- }), o);
177
+ let s = e;
178
+ return r[0] === "" && t !== "object" ? j(e) : (r[0] !== "" && r.forEach((o) => {
179
+ s = s[o];
180
+ }), s);
182
181
  }, E = (e, n, t, r) => {
183
182
  t = t || f.value;
184
- for (let o = 0; o < e.length; o++)
185
- if (e[o][t] === n)
186
- return e[o];
183
+ for (let s = 0; s < e.length; s++)
184
+ if (e[s][t] === n)
185
+ return e[s];
187
186
  return -1;
188
187
  }, ne = (e = "", n) => {
189
188
  const t = e.toString().length;
@@ -191,16 +190,16 @@ const u = (e) => {
191
190
  for (let r = 0; r < t; r++)
192
191
  e = e + n;
193
192
  return e;
194
- }, re = (e = [], n, t) => e.filter((r) => !l(r[n])).sort((r, o) => t(r, o)).concat(e.filter((r) => l(r[n]))), oe = (e, n) => e ? (n.forEach((t) => {
193
+ }, re = (e = [], n, t) => e.filter((r) => !l(r[n])).sort((r, s) => t(r, s)).concat(e.filter((r) => l(r[n]))), se = (e, n) => e ? (n.forEach((t) => {
195
194
  t.includes("$") ? delete e[t] : l(e[t]) || (g(e[t]) ? e[t] = [] : m(e[t]) ? e[t] = {} : b(e[t]) || A(e[t]) ? e[t] = void 0 : e[t] = "");
196
- }), e) : {}, se = (e, n) => typeof e == "boolean" ? e : l(e) ? n : e;
195
+ }), e) : {}, oe = (e, n) => typeof e == "boolean" ? e : l(e) ? n : e;
197
196
  function ie(e = {}, n) {
198
197
  n = n || this;
199
198
  const t = ["uploadPreview", "uploadBefore", "uploadAfter", "uploadDelete", "uploadError", "uploadExceed"], r = {};
200
- return e.type === "upload" ? t.forEach((o) => {
201
- e[o] || (r[o] = n[o]);
202
- }) : t.forEach((o) => {
203
- r[o] = n[o];
199
+ return e.type === "upload" ? t.forEach((s) => {
200
+ e[s] || (r[s] = n[s]);
201
+ }) : t.forEach((s) => {
202
+ r[s] = n[s];
204
203
  }), r;
205
204
  }
206
205
  export {
@@ -227,7 +226,7 @@ export {
227
226
  re as l,
228
227
  _ as m,
229
228
  te as n,
230
- se as o,
229
+ oe as o,
231
230
  v as p,
232
231
  Y as q,
233
232
  Q as r,
@@ -236,7 +235,7 @@ export {
236
235
  ie as u,
237
236
  Z as v,
238
237
  U as w,
239
- oe as x,
238
+ se as x,
240
239
  J as y,
241
240
  x as z
242
241
  };
@@ -10,8 +10,8 @@ var l = (t, e, o) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writab
10
10
  p.call(e, o) && l(t, o, e[o]);
11
11
  return t;
12
12
  }, r = (t, e) => d(t, m(e));
13
- import { isEmpty as b } from "@web-utils/core";
14
- import { d as f } from "../chunks/util.CoahLDYn.mjs";
13
+ import { isEmpty as f } from "@web-utils/core";
14
+ import { d as b } from "../chunks/util.DqFv_pWg.mjs";
15
15
  import h from "vue";
16
16
  import { n as _ } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
17
17
  const i = {
@@ -45,8 +45,8 @@ const i = {
45
45
  }
46
46
  },
47
47
  methods: {
48
- isEmpty: b,
49
- deepClone: f,
48
+ isEmpty: f,
49
+ deepClone: b,
50
50
  submit() {
51
51
  this.$refs.form.submit();
52
52
  },
@@ -95,7 +95,7 @@ var y = function() {
95
95
  null,
96
96
  null
97
97
  );
98
- const D = C.exports;
98
+ const $ = C.exports;
99
99
  export {
100
- D as default
100
+ $ as default
101
101
  };
package/flow/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r, s as l } from "../chunks/util.CoahLDYn.mjs";
1
+ import { r, s as l } from "../chunks/util.DqFv_pWg.mjs";
2
2
  import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
3
  const c = {
4
4
  name: "Flow",
@@ -115,9 +115,9 @@ const c = {
115
115
  },
116
116
  // 是否具有该线
117
117
  hasLine(e, t) {
118
- for (let n = 0; n < this.data.lineList.length; n++) {
119
- const i = this.data.lineList[n];
120
- if (i.from === e && i.to === t)
118
+ for (let i = 0; i < this.data.lineList.length; i++) {
119
+ const n = this.data.lineList[i];
120
+ if (n.from === e && n.to === t)
121
121
  return !0;
122
122
  }
123
123
  return !1;
@@ -128,18 +128,16 @@ const c = {
128
128
  },
129
129
  // 删除线
130
130
  deleteLine(e, t) {
131
- this.option.lineList = this.option.lineList.filter(function(n) {
132
- return n.from !== e && n.to !== t;
133
- });
131
+ this.option.lineList = this.option.lineList.filter((i) => i.from !== e && i.to !== t);
134
132
  },
135
133
  // 改变连线
136
134
  changeLine(e, t) {
137
135
  this.deleteLine(e, t);
138
136
  },
139
137
  // 改变节点的位置
140
- changeNodeSite({ index: e, left: t, top: n }) {
141
- for (let i = 0; i < this.option.nodeList.length; i++)
142
- i === e && (this.$set(this.option.nodeList[i], "left", t), this.$set(this.option.nodeList[i], "top", n));
138
+ changeNodeSite({ index: e, left: t, top: i }) {
139
+ for (let n = 0; n < this.option.nodeList.length; n++)
140
+ n === e && (this.$set(this.option.nodeList[n], "left", t), this.$set(this.option.nodeList[n], "top", i));
143
141
  },
144
142
  // 删除节点
145
143
  deleteNode(e) {
@@ -159,14 +157,14 @@ const c = {
159
157
  },
160
158
  // 添加新的节点
161
159
  addNode(e) {
162
- const t = this.option.nodeList.length, n = `node${t}`;
160
+ const t = this.option.nodeList.length, i = `node${t}`;
163
161
  this.option.nodeList.push({
164
162
  id: `node${t}`,
165
163
  name: e,
166
164
  left: 0,
167
165
  top: 0
168
166
  }), this.$nextTick(function() {
169
- this.jsPlumb.makeSource(n, this.jsplumbSourceOptions), this.jsPlumb.makeTarget(n, this.jsplumbTargetOptions), this.jsPlumb.draggable(n, {
167
+ this.jsPlumb.makeSource(i, this.jsplumbSourceOptions), this.jsPlumb.makeTarget(i, this.jsplumbTargetOptions), this.jsPlumb.draggable(i, {
170
168
  containment: "parent"
171
169
  });
172
170
  });
@@ -192,8 +190,8 @@ const c = {
192
190
  },
193
191
  jsPlumbInit() {
194
192
  const e = this;
195
- this.jsPlumb.ready(function() {
196
- e.jsPlumb.importDefaults(e.jsplumbSetting), e.jsPlumb.setSuspendDrawing(!1, !0), e.loadEasyFlow(), e.jsPlumb.bind("click", function(t) {
193
+ this.jsPlumb.ready(() => {
194
+ e.jsPlumb.importDefaults(e.jsplumbSetting), e.jsPlumb.setSuspendDrawing(!1, !0), e.loadEasyFlow(), e.jsPlumb.bind("click", (t) => {
197
195
  console.log("click", t), e.$confirm("确定删除所点击的线吗?", "提示", {
198
196
  confirmButtonText: "确定",
199
197
  cancelButtonText: "取消",
@@ -202,24 +200,24 @@ const c = {
202
200
  e.jsPlumb.deleteConnection(t);
203
201
  }).catch(() => {
204
202
  });
205
- }), e.jsPlumb.bind("connection", function(t) {
203
+ }), e.jsPlumb.bind("connection", (t) => {
206
204
  console.log("connection", t);
207
- const n = t.source.id, i = t.target.id;
205
+ const i = t.source.id, n = t.target.id;
208
206
  e.loadEasyFlowFinish && e.option.lineList.push({
209
- from: n,
210
- to: i
207
+ from: i,
208
+ to: n
211
209
  });
212
- }), e.jsPlumb.bind("connectionDetached", function(t) {
210
+ }), e.jsPlumb.bind("connectionDetached", (t) => {
213
211
  console.log("connectionDetached", t), e.deleteLine(t.sourceId, t.targetId);
214
- }), e.jsPlumb.bind("connectionMoved", function(t) {
212
+ }), e.jsPlumb.bind("connectionMoved", (t) => {
215
213
  console.log("connectionMoved", t), e.changeLine(t.originalSourceId, t.originalTargetId);
216
- }), e.jsPlumb.bind("contextmenu", function(t) {
214
+ }), e.jsPlumb.bind("contextmenu", (t) => {
217
215
  console.log("contextmenu", t);
218
- }), e.jsPlumb.bind("beforeDrop", function(t) {
216
+ }), e.jsPlumb.bind("beforeDrop", (t) => {
219
217
  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) {
218
+ const i = t.sourceId, n = t.targetId;
219
+ return i === n ? (e.$message.error("不能连接自己"), !1) : e.hasLine(i, n) ? (e.$message.error("不能重复连线"), !1) : e.hashOppositeLine(i, n) ? (e.$message.error("不能回环哦"), !1) : !0;
220
+ }), e.jsPlumb.bind("beforeDetach", (t) => {
223
221
  console.log("beforeDetach", t);
224
222
  });
225
223
  });
@@ -227,13 +225,13 @@ const c = {
227
225
  }
228
226
  };
229
227
  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);
228
+ var t = this, i = t._self._c;
229
+ return i("div", { staticClass: "avue-flow", style: t.styleName }, [i("div", { style: t.styleName, attrs: { id: t.id } }, [i("div", { staticClass: "avue-grid" }), t._l(t.option.nodeList, function(n, o) {
230
+ return [n.display ? t._e() : i("FlowNode", { key: o, attrs: { id: n.id, node: n, index: o, active: t.active }, on: { changeNodeSite: t.changeNodeSite }, nativeOn: { click: function(s) {
231
+ return t.handleClick(n);
234
232
  } }, scopedSlots: t._u([{ key: "header", fn: function({ node: s }) {
235
233
  return [t._t("header", null, { node: s })];
236
- } }], null, !0) }, [t._t("default", null, { node: i })], 2)];
234
+ } }], null, !0) }, [t._t("default", null, { node: n })], 2)];
237
235
  })], 2)]);
238
236
  }, h = [], d = /* @__PURE__ */ a(
239
237
  c,
@@ -243,7 +241,7 @@ var u = function() {
243
241
  null,
244
242
  null
245
243
  );
246
- const p = d.exports;
244
+ const f = d.exports;
247
245
  export {
248
- p as default
246
+ f as default
249
247
  };