@web-utils/component 3.2.0 → 3.2.2

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 (58) hide show
  1. package/chunks/{FormTemp.0eqGAu6W.mjs → FormTemp.0ezzipG4.mjs} +5 -6
  2. package/chunks/FyUEditor.c06LkvIy.mjs +224 -0
  3. package/chunks/FyUEditor.vue_vue_type_style_index_0_lang.0-PDx197.mjs +167 -0
  4. package/chunks/IconTemp.tzsg5qth.mjs +29 -0
  5. package/chunks/ResizeObserver.sOHk2Cm-.mjs +51 -0
  6. package/chunks/{form-input-mixin.IKogWBfn.mjs → form-input-mixin.DLHG0EnH.mjs} +2 -2
  7. package/chunks/{form-item-mixin.BilKDUlK.mjs → form-item-mixin.gd9p9Rrj.mjs} +1 -1
  8. package/chunks/{index.LGsb2aDq.mjs → index.Uf8ONhVI.mjs} +3 -3
  9. package/data-display/index.mjs +129 -15
  10. package/data-table-picker/index.mjs +1 -1
  11. package/easy-popup/index.mjs +8 -7
  12. package/editable-tree/index.mjs +1 -1
  13. package/flex-column/index.mjs +1 -1
  14. package/flex-item/index.mjs +1 -1
  15. package/flex-row/index.mjs +1 -1
  16. package/flow-designer/index.mjs +218 -164
  17. package/flow-viewer/index.mjs +161 -73
  18. package/form-button/index.mjs +25 -11
  19. package/form-cascader/index.mjs +2 -2
  20. package/form-checkbox-group/index.mjs +2 -2
  21. package/form-date-picker/index.mjs +2 -2
  22. package/form-holder/index.mjs +1 -1
  23. package/form-input/index.mjs +2 -2
  24. package/form-input-email/index.mjs +2 -2
  25. package/form-input-id-card/index.mjs +2 -2
  26. package/form-input-number/index.mjs +2 -2
  27. package/form-input-phone-number/index.mjs +2 -2
  28. package/form-input-tag/index.mjs +155 -31
  29. package/form-input-time/index.mjs +2 -2
  30. package/form-item/index.mjs +1 -1
  31. package/form-radio-group/index.mjs +2 -2
  32. package/form-select/index.mjs +2 -2
  33. package/form-switch/index.mjs +2 -2
  34. package/form-textarea/index.mjs +2 -2
  35. package/form-view/index.mjs +12 -13
  36. package/fy-curd/index.mjs +4 -5
  37. package/fy-form/index.mjs +1 -1
  38. package/fy-form-design/index.mjs +498 -329
  39. package/fy-input-icon/index.mjs +20 -21
  40. package/fy-u-editor/index.mjs +75 -237
  41. package/highlight-j-s/index.mjs +4 -3
  42. package/icon-temp/index.mjs +7 -6
  43. package/index.mjs +446 -446
  44. package/nav-bar/index.mjs +7 -6
  45. package/package.json +4 -4
  46. package/page/index.mjs +1 -0
  47. package/page-header/index.mjs +3 -2
  48. package/page-skeleton/index.mjs +95 -17
  49. package/pageable-table/index.mjs +1 -1
  50. package/pageable-view/index.mjs +8 -8
  51. package/present-view/index.mjs +3 -4
  52. package/resize-observer/index.mjs +4 -3
  53. package/split-pane/index.mjs +3 -4
  54. package/swiper/index.mjs +3 -4
  55. package/table-view/index.mjs +1 -1
  56. package/watermark/index.mjs +1 -1
  57. package/web-types.json +1 -1
  58. package/x-input-tag/index.mjs +10 -9
@@ -1,11 +1,10 @@
1
1
  import { isBlank as _ } from "@web-utils/core";
2
2
  import { formatDate as i } from "@web-utils/integrations/dayjs";
3
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.y1gUGRqi.mjs";
4
- import "@web-utils/component/fy-u-editor/style.css";
5
4
  import { a as D, b as O } from "./dataformat.Ab9PZnVk.mjs";
6
5
  import { s as j } from "./slot.j1uMmBnG.mjs";
7
6
  import { n as L } from "./_plugin-vue2_normalizer.JwmUNtgn.mjs";
8
- const R = (n = {}, e = {}, s = {}, r = []) => {
7
+ const M = (n = {}, e = {}, s = {}, r = []) => {
9
8
  let t = n[e.prop];
10
9
  const a = e.type, o = e.separator;
11
10
  if (e.bind && (t = h(n, e.bind)), _(t))
@@ -29,7 +28,7 @@ const R = (n = {}, e = {}, s = {}, r = []) => {
29
28
  return e.formatter && typeof e.formatter == "function" && (t = e.formatter(n, n[e.prop], t, e)), t;
30
29
  }, Y = {
31
30
  name: "FormTemp",
32
- components: { FyUEditor: () => import("@web-utils/component/fy-u-editor") },
31
+ components: { FyUEditor: () => import("./FyUEditor.c06LkvIy.mjs") },
33
32
  mixins: [j],
34
33
  props: {
35
34
  value: [String, Object, Number, Boolean, Array],
@@ -118,8 +117,8 @@ var k = function() {
118
117
  null,
119
118
  null
120
119
  );
121
- const V = I.exports;
120
+ const R = I.exports;
122
121
  export {
123
- V as F,
124
- R as d
122
+ R as F,
123
+ M as d
125
124
  };
@@ -0,0 +1,224 @@
1
+ var y = Object.defineProperty, g = Object.defineProperties;
2
+ var b = Object.getOwnPropertyDescriptors;
3
+ var h = Object.getOwnPropertySymbols;
4
+ var S = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
5
+ var p = (t, s, e) => s in t ? y(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e, u = (t, s) => {
6
+ for (var e in s || (s = {}))
7
+ S.call(s, e) && p(t, e, s[e]);
8
+ if (h)
9
+ for (var e of h(s))
10
+ O.call(s, e) && p(t, e, s[e]);
11
+ return t;
12
+ }, f = (t, s) => g(t, b(s));
13
+ var c = (t, s, e) => new Promise((a, i) => {
14
+ var d = (r) => {
15
+ try {
16
+ l(e.next(r));
17
+ } catch (o) {
18
+ i(o);
19
+ }
20
+ }, n = (r) => {
21
+ try {
22
+ l(e.throw(r));
23
+ } catch (o) {
24
+ i(o);
25
+ }
26
+ }, l = (r) => r.done ? a(r.value) : Promise.resolve(r.value).then(d, n);
27
+ l((e = e.apply(t, s)).next());
28
+ });
29
+ import "@wangeditor/editor/dist/css/style.css";
30
+ import { g as C, a as _ } from "./FyUEditor.vue_vue_type_style_index_0_lang.0-PDx197.mjs";
31
+ import { createEditor as v, createToolbar as K } from "@wangeditor/editor";
32
+ import { p as H } from "./util.y1gUGRqi.mjs";
33
+ import { n as j } from "./_plugin-vue2_normalizer.JwmUNtgn.mjs";
34
+ const F = {
35
+ name: "FyUEditor",
36
+ props: {
37
+ data: {
38
+ type: Object,
39
+ default: () => ({})
40
+ },
41
+ headers: {
42
+ type: Object,
43
+ default: () => ({})
44
+ },
45
+ customConfig: {
46
+ type: Object,
47
+ default: () => ({})
48
+ },
49
+ toolbarConfig: {
50
+ type: Object,
51
+ default: () => ({})
52
+ },
53
+ propsHttp: {
54
+ type: Object,
55
+ default: () => ({})
56
+ },
57
+ ali: {
58
+ type: Object,
59
+ default: () => ({})
60
+ },
61
+ qiniu: {
62
+ type: Object,
63
+ default: () => ({})
64
+ },
65
+ oss: String,
66
+ action: String,
67
+ disabled: {
68
+ type: Boolean,
69
+ default: !1
70
+ },
71
+ value: {
72
+ type: String,
73
+ default: ""
74
+ },
75
+ placeholder: {
76
+ type: String,
77
+ default: ""
78
+ }
79
+ },
80
+ data() {
81
+ return {
82
+ editor: null
83
+ };
84
+ },
85
+ computed: {
86
+ fileName() {
87
+ return this.propsHttp.fileName || "file";
88
+ },
89
+ homeUrl() {
90
+ return this.propsHttp.home || "";
91
+ },
92
+ resKey() {
93
+ return this.propsHttp.res;
94
+ },
95
+ urlKey() {
96
+ return this.propsHttp.url || "url";
97
+ },
98
+ isQiniuOSS() {
99
+ return this.oss === "qiniu";
100
+ },
101
+ isAliOSS() {
102
+ return this.oss === "ali";
103
+ }
104
+ },
105
+ watch: {
106
+ disabled(t) {
107
+ t ? this.editor.disable() : this.editor.enable();
108
+ },
109
+ value(t) {
110
+ t ? this.editor.setHtml(t) : this.editor.clear();
111
+ }
112
+ },
113
+ mounted() {
114
+ this.initEdit();
115
+ },
116
+ beforeDestroy() {
117
+ var t;
118
+ (t = this.editor) == null || t.destroy();
119
+ },
120
+ methods: {
121
+ initEdit() {
122
+ const t = "default", s = f(u({
123
+ placeholder: this.placeholder,
124
+ readOnly: this.disabled,
125
+ MENU_CONF: {
126
+ uploadImage: {
127
+ customUpload: (a) => c(this, null, function* () {
128
+ const i = yield this.uploadFile(a);
129
+ this.editor.dangerouslyInsertHtml(i);
130
+ })
131
+ },
132
+ uploadVideo: {
133
+ customUpload: (a) => c(this, null, function* () {
134
+ const i = yield this.uploadFile(a);
135
+ this.editor.dangerouslyInsertHtml(i);
136
+ })
137
+ }
138
+ }
139
+ }, this.customConfig), {
140
+ onFocus: () => {
141
+ this.$emit("focus", this.value);
142
+ },
143
+ onBlur: (a) => {
144
+ const i = a.getHtml();
145
+ this.$emit("blur", i);
146
+ },
147
+ onChange: (a) => {
148
+ const i = a.getHtml();
149
+ this.$emit("input", i);
150
+ }
151
+ });
152
+ this.editor = Object.seal(
153
+ v({
154
+ selector: this.$refs.editor,
155
+ config: s,
156
+ html: this.value,
157
+ mode: t
158
+ })
159
+ );
160
+ const e = u({}, this.toolbarConfig);
161
+ this.toolbar = K({
162
+ editor: this.editor,
163
+ selector: this.$refs.toolbar,
164
+ config: e,
165
+ mode: t
166
+ });
167
+ },
168
+ uploadFile(t) {
169
+ return new Promise((s, e) => {
170
+ const a = Object.assign(this.headers, {
171
+ "Content-Type": "multipart/form-data"
172
+ });
173
+ let i = {}, d;
174
+ const n = new FormData();
175
+ let l = this.action;
176
+ if (n.append(this.fileName, t), Object.keys(this.data).forEach((r) => {
177
+ n.append(r, this.data[r]);
178
+ }), this.isQiniuOSS) {
179
+ i = this.qiniu;
180
+ const r = C(i.AK, i.SK, {
181
+ scope: i.scope,
182
+ deadline: (/* @__PURE__ */ new Date()).getTime() + i.deadline * 3600
183
+ });
184
+ n.append("token", r), l = "http://up.qiniu.com/";
185
+ } else
186
+ this.isAliOSS && (i = this.ali, d = _({
187
+ region: i.region,
188
+ endpoint: i.endpoint,
189
+ accessKeyId: i.accessKeyId,
190
+ accessKeySecret: i.accessKeySecret,
191
+ bucket: i.bucket
192
+ }));
193
+ (() => this.isAliOSS ? d.put(t.name, t) : this.$axios.post(l, n, { headers: a }))().then((r) => {
194
+ let o;
195
+ this.isAliOSS ? o = r : this.isQiniuOSS ? (o = r.data, o.key = i.url + o.key) : typeof this.resKey == "function" ? o = this.resKey(r.data) : (o = H(r.data, this.resKey), o = o[this.urlKey]);
196
+ const m = this.homeUrl + o;
197
+ s(m);
198
+ }).catch((r) => {
199
+ e(r);
200
+ });
201
+ });
202
+ },
203
+ getUEContent() {
204
+ return this.editor.getHtml();
205
+ }
206
+ }
207
+ };
208
+ var k = function() {
209
+ var s = this, e = s._self._c;
210
+ return e("div", { staticClass: "avue-ueditor" }, [e("div", { ref: "toolbar", staticClass: "fy-editor-toolbar" }), e("div", { ref: "editor", staticClass: "fy-editor" })]);
211
+ }, E = [], U = /* @__PURE__ */ j(
212
+ F,
213
+ k,
214
+ E,
215
+ !1,
216
+ null,
217
+ null,
218
+ null,
219
+ null
220
+ );
221
+ const T = U.exports;
222
+ export {
223
+ T as default
224
+ };
@@ -0,0 +1,167 @@
1
+ const l = (t) => {
2
+ const { region: e, endpoint: n, accessKeyId: c, accessKeySecret: r, bucket: a } = t;
3
+ return new window.OSS({ region: e, endpoint: n, accessKeyId: c, accessKeySecret: r, bucket: a });
4
+ }, A = (t, e, n) => {
5
+ let { scope: c, deadline: r } = n;
6
+ var a = JSON.stringify({ scope: c, deadline: r }), f = C(x(a)), i = window.CryptoJS.HmacSHA1(f, e), h = i.toString(window.CryptoJS.enc.Base64), d = t + ":" + g(h) + ":" + f;
7
+ return d;
8
+ };
9
+ function x(t) {
10
+ var e, n, c, r;
11
+ for (e = "", c = t.length, n = 0; n < c; n++)
12
+ r = t.charCodeAt(n), r >= 1 && r <= 127 ? e += t.charAt(n) : r > 2047 ? (e += String.fromCharCode(224 | r >> 12 & 15), e += String.fromCharCode(128 | r >> 6 & 63), e += String.fromCharCode(128 | r >> 0 & 63)) : (e += String.fromCharCode(192 | r >> 6 & 31), e += String.fromCharCode(128 | r >> 0 & 63));
13
+ return e;
14
+ }
15
+ var o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
16
+ new Array(
17
+ -1,
18
+ -1,
19
+ -1,
20
+ -1,
21
+ -1,
22
+ -1,
23
+ -1,
24
+ -1,
25
+ -1,
26
+ -1,
27
+ -1,
28
+ -1,
29
+ -1,
30
+ -1,
31
+ -1,
32
+ -1,
33
+ -1,
34
+ -1,
35
+ -1,
36
+ -1,
37
+ -1,
38
+ -1,
39
+ -1,
40
+ -1,
41
+ -1,
42
+ -1,
43
+ -1,
44
+ -1,
45
+ -1,
46
+ -1,
47
+ -1,
48
+ -1,
49
+ -1,
50
+ -1,
51
+ -1,
52
+ -1,
53
+ -1,
54
+ -1,
55
+ -1,
56
+ -1,
57
+ -1,
58
+ -1,
59
+ -1,
60
+ 62,
61
+ -1,
62
+ -1,
63
+ -1,
64
+ 63,
65
+ 52,
66
+ 53,
67
+ 54,
68
+ 55,
69
+ 56,
70
+ 57,
71
+ 58,
72
+ 59,
73
+ 60,
74
+ 61,
75
+ -1,
76
+ -1,
77
+ -1,
78
+ -1,
79
+ -1,
80
+ -1,
81
+ -1,
82
+ 0,
83
+ 1,
84
+ 2,
85
+ 3,
86
+ 4,
87
+ 5,
88
+ 6,
89
+ 7,
90
+ 8,
91
+ 9,
92
+ 10,
93
+ 11,
94
+ 12,
95
+ 13,
96
+ 14,
97
+ 15,
98
+ 16,
99
+ 17,
100
+ 18,
101
+ 19,
102
+ 20,
103
+ 21,
104
+ 22,
105
+ 23,
106
+ 24,
107
+ 25,
108
+ -1,
109
+ -1,
110
+ -1,
111
+ -1,
112
+ -1,
113
+ -1,
114
+ 26,
115
+ 27,
116
+ 28,
117
+ 29,
118
+ 30,
119
+ 31,
120
+ 32,
121
+ 33,
122
+ 34,
123
+ 35,
124
+ 36,
125
+ 37,
126
+ 38,
127
+ 39,
128
+ 40,
129
+ 41,
130
+ 42,
131
+ 43,
132
+ 44,
133
+ 45,
134
+ 46,
135
+ 47,
136
+ 48,
137
+ 49,
138
+ 50,
139
+ 51,
140
+ -1,
141
+ -1,
142
+ -1,
143
+ -1,
144
+ -1
145
+ );
146
+ function C(t) {
147
+ var e, n, c, r, a, f;
148
+ for (c = t.length, n = 0, e = ""; n < c; ) {
149
+ if (r = t.charCodeAt(n++) & 255, n == c) {
150
+ e += o.charAt(r >> 2), e += o.charAt((r & 3) << 4), e += "==";
151
+ break;
152
+ }
153
+ if (a = t.charCodeAt(n++), n == c) {
154
+ e += o.charAt(r >> 2), e += o.charAt((r & 3) << 4 | (a & 240) >> 4), e += o.charAt((a & 15) << 2), e += "=";
155
+ break;
156
+ }
157
+ f = t.charCodeAt(n++), e += o.charAt(r >> 2), e += o.charAt((r & 3) << 4 | (a & 240) >> 4), e += o.charAt((a & 15) << 2 | (f & 192) >> 6), e += o.charAt(f & 63);
158
+ }
159
+ return e;
160
+ }
161
+ var g = function(t) {
162
+ return t = t.replace(/\+/g, "-"), t = t.replace(/\//g, "_"), t;
163
+ };
164
+ export {
165
+ l as a,
166
+ A as g
167
+ };
@@ -0,0 +1,29 @@
1
+ /* empty css */
2
+ import { n as t } from "./_plugin-vue2_normalizer.JwmUNtgn.mjs";
3
+ const s = {
4
+ name: "IconTemp",
5
+ props: {
6
+ small: Boolean,
7
+ text: {
8
+ type: String,
9
+ default: ""
10
+ }
11
+ }
12
+ };
13
+ var a = function() {
14
+ var e = this, n = e._self._c;
15
+ return n("span", { staticClass: "avue-icon", class: { "avue-icon--small": e.small } }, [e.text.includes("#") ? n("svg", { attrs: { "aria-hidden": "true" } }, [n("use", { attrs: { "xlink:href": e.text } })]) : n("i", { class: e.text })]);
16
+ }, l = [], r = /* @__PURE__ */ t(
17
+ s,
18
+ a,
19
+ l,
20
+ !1,
21
+ null,
22
+ null,
23
+ null,
24
+ null
25
+ );
26
+ const m = r.exports;
27
+ export {
28
+ m as I
29
+ };
@@ -0,0 +1,51 @@
1
+ import { h as r } from "./index.Uf8ONhVI.mjs";
2
+ /* empty css */
3
+ import { n as o } from "./_plugin-vue2_normalizer.JwmUNtgn.mjs";
4
+ let t;
5
+ function i() {
6
+ i.init || (i.init = !0, t = r() !== -1);
7
+ }
8
+ const h = {
9
+ name: "ResizeObserver",
10
+ mounted() {
11
+ i(), this.$nextTick(() => {
12
+ this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight;
13
+ });
14
+ const e = document.createElement("object");
15
+ this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", t && this.$el.appendChild(e), e.data = "about:blank", t || this.$el.appendChild(e);
16
+ },
17
+ beforeDestroy() {
18
+ this.removeResizeHandlers();
19
+ },
20
+ methods: {
21
+ compareAndNotify() {
22
+ (this._w !== this.$el.offsetWidth || this._h !== this.$el.offsetHeight) && (this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.$emit("notify", {
23
+ width: this._w,
24
+ height: this._h
25
+ }));
26
+ },
27
+ addResizeHandlers() {
28
+ this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
29
+ },
30
+ removeResizeHandlers() {
31
+ this._resizeObject && this._resizeObject.onload && (!t && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null);
32
+ }
33
+ }
34
+ };
35
+ var a = function() {
36
+ var s = this, n = s._self._c;
37
+ return n("div", { staticClass: "resize-observer", attrs: { tabindex: "-1" } });
38
+ }, l = [], d = /* @__PURE__ */ o(
39
+ h,
40
+ a,
41
+ l,
42
+ !1,
43
+ null,
44
+ null,
45
+ null,
46
+ null
47
+ );
48
+ const m = d.exports;
49
+ export {
50
+ m as R
51
+ };
@@ -1,5 +1,5 @@
1
- import { f as e } from "./form-item-mixin.BilKDUlK.mjs";
2
- import { d as r } from "./index.LGsb2aDq.mjs";
1
+ import { f as e } from "./form-item-mixin.gd9p9Rrj.mjs";
2
+ import { d as r } from "./index.Uf8ONhVI.mjs";
3
3
  const o = {
4
4
  mixins: [e],
5
5
  props: {
@@ -9,7 +9,7 @@ var i = (e, r, t) => r in e ? m(e, r, { enumerable: !0, configurable: !0, writab
9
9
  c.call(r, t) && i(e, t, r[t]);
10
10
  return e;
11
11
  };
12
- import { d as o } from "./index.LGsb2aDq.mjs";
12
+ import { d as o } from "./index.Uf8ONhVI.mjs";
13
13
  import a from "element-ui/lib/col";
14
14
  import u from "element-ui/lib/form-item";
15
15
  const d = ["span"], n = [...Object.keys(a.props || a.default.props)], h = n.filter((e) => !d.includes(e)), b = ["label", "prop", "rules", "labelWidth", "required"], p = [...Object.keys(u.props || u.default.props)], g = p.filter((e) => !b.includes(e)), y = [
@@ -177,9 +177,9 @@ export {
177
177
  I as e,
178
178
  K as f,
179
179
  T as g,
180
- V as h,
181
- R as i,
182
- E as j,
180
+ E as h,
181
+ V as i,
182
+ R as j,
183
183
  M as k,
184
184
  A as n
185
185
  };
@@ -1,9 +1,123 @@
1
- import o from "@web-utils/component/count-up";
2
- import { n as i } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
3
- const r = {
1
+ var u = Object.defineProperty, d = Object.defineProperties;
2
+ var p = Object.getOwnPropertyDescriptors;
3
+ var n = Object.getOwnPropertySymbols;
4
+ var m = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
5
+ var i = (e, t, s) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, r = (e, t) => {
6
+ for (var s in t || (t = {}))
7
+ m.call(t, s) && i(e, s, t[s]);
8
+ if (n)
9
+ for (var s of n(t))
10
+ f.call(t, s) && i(e, s, t[s]);
11
+ return e;
12
+ }, o = (e, t) => d(e, p(t));
13
+ import { CountUp as h } from "countup.js";
14
+ import { n as l } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
15
+ const _ = {
16
+ name: "CountUp",
17
+ props: {
18
+ animation: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ start: {
23
+ type: [Number, String],
24
+ required: !1,
25
+ default: 0
26
+ },
27
+ end: {
28
+ type: [Number, String],
29
+ required: !0
30
+ },
31
+ decimals: {
32
+ type: Number,
33
+ required: !1,
34
+ default: 0
35
+ },
36
+ duration: {
37
+ type: Number,
38
+ required: !1,
39
+ default: 2
40
+ },
41
+ options: {
42
+ type: Object,
43
+ required: !1,
44
+ default() {
45
+ return {};
46
+ }
47
+ },
48
+ callback: {
49
+ type: Function,
50
+ required: !1,
51
+ default: () => {
52
+ }
53
+ }
54
+ },
55
+ watch: {
56
+ decimals() {
57
+ var e;
58
+ (e = this.c) == null || e.update(this.end);
59
+ },
60
+ end(e) {
61
+ var t;
62
+ (t = this.c) == null || t.update(e);
63
+ }
64
+ },
65
+ mounted() {
66
+ this.animation && this.init();
67
+ },
68
+ beforeDestroy() {
69
+ this.destroy();
70
+ },
71
+ methods: {
72
+ init() {
73
+ this.c || (this.c = new h(this.$el, this.end, o(r({}, this.options), {
74
+ decimal: this.decimals,
75
+ duration: this.duration,
76
+ startVal: this.start
77
+ })), this.c.start(() => {
78
+ this.callback(this.c);
79
+ }));
80
+ },
81
+ destroy() {
82
+ this.c = null;
83
+ }
84
+ },
85
+ start(e) {
86
+ var t;
87
+ (t = this.c) == null || t.start(() => {
88
+ e && e(this.c);
89
+ });
90
+ },
91
+ pauseResume() {
92
+ var e;
93
+ (e = this.c) == null || e.pauseResume();
94
+ },
95
+ reset() {
96
+ var e;
97
+ (e = this.c) == null || e.reset();
98
+ },
99
+ update(e) {
100
+ var t;
101
+ (t = this.c) == null || t.update(e);
102
+ }
103
+ };
104
+ var v = function() {
105
+ var t = this, s = t._self._c;
106
+ return s("span", [t._v(t._s(t.end))]);
107
+ }, y = [], C = /* @__PURE__ */ l(
108
+ _,
109
+ v,
110
+ y,
111
+ !1,
112
+ null,
113
+ null,
114
+ null,
115
+ null
116
+ );
117
+ const b = C.exports, $ = {
4
118
  name: "DataDisplay",
5
119
  components: {
6
- CountUp: o
120
+ CountUp: b
7
121
  },
8
122
  props: {
9
123
  option: {
@@ -30,24 +144,24 @@ const r = {
30
144
  }
31
145
  }
32
146
  };
33
- var l = function() {
34
- var t = this, n = t._self._c;
35
- return n("div", { staticClass: "avue-data-display" }, [n("ElRow", { attrs: { span: 24 } }, t._l(t.data, function(a, s) {
36
- return n("ElCol", { key: s, attrs: { md: t.span, xs: 12, sm: 12 } }, [n("div", { staticClass: "item", style: { color: t.color } }, [n("a", { attrs: { href: a.href, target: a.target }, on: { click: function(u) {
147
+ var q = function() {
148
+ var t = this, s = t._self._c;
149
+ return s("div", { staticClass: "avue-data-display" }, [s("ElRow", { attrs: { span: 24 } }, t._l(t.data, function(a, c) {
150
+ return s("ElCol", { key: c, attrs: { md: t.span, xs: 12, sm: 12 } }, [s("div", { staticClass: "item", style: { color: t.color } }, [s("a", { attrs: { href: a.href, target: a.target }, on: { click: function(D) {
37
151
  a.click && a.click(a);
38
- } } }, [n("CountUp", { staticClass: "count", attrs: { animation: a.animation || t.animation, decimals: a.decimals || t.decimals, end: a.count } }), n("span", { staticClass: "splitLine" }), n("div", { staticClass: "title" }, [t._v(t._s(a.title))])], 1)])]);
152
+ } } }, [s("CountUp", { staticClass: "count", attrs: { animation: a.animation || t.animation, decimals: a.decimals || t.decimals, end: a.count } }), s("span", { staticClass: "splitLine" }), s("div", { staticClass: "title" }, [t._v(t._s(a.title))])], 1)])]);
39
153
  }), 1)], 1);
40
- }, e = [], c = /* @__PURE__ */ i(
41
- r,
42
- l,
43
- e,
154
+ }, g = [], k = /* @__PURE__ */ l(
155
+ $,
156
+ q,
157
+ g,
44
158
  !1,
45
159
  null,
46
160
  null,
47
161
  null,
48
162
  null
49
163
  );
50
- const _ = c.exports;
164
+ const N = k.exports;
51
165
  export {
52
- _ as default
166
+ N as default
53
167
  };
@@ -1,4 +1,4 @@
1
- import { f as i } from "../chunks/index.LGsb2aDq.mjs";
1
+ import { f as i } from "../chunks/index.Uf8ONhVI.mjs";
2
2
  import { n } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
3
3
  const o = {
4
4
  name: "DataTablePicker",