@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.
Files changed (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
@@ -1,32 +1,5 @@
1
- import { n as i } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
- var n = function() {
3
- var t = this, e = t.$createElement, a = t._self._c || e;
4
- return a("ElSteps", {
5
- staticClass: "guide-steps",
6
- attrs: {
7
- "align-center": ""
8
- }
9
- }, t._l(t.steps, function(r, s) {
10
- return a("ElStep", {
11
- key: r.label,
12
- class: [{
13
- "current important": t.value === s,
14
- disabled: !t.available(s),
15
- available: !t.ready[s] && t.available(s)
16
- }],
17
- attrs: {
18
- status: t.ready[s] ? "success" : "",
19
- title: r.label
20
- },
21
- nativeOn: {
22
- click: function(_) {
23
- return t.activeStep(s);
24
- }
25
- }
26
- });
27
- }), 1);
28
- }, u = [];
29
- const c = {
1
+ import { n as l } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
2
+ const i = {
30
3
  name: "GuideSteps",
31
4
  props: {
32
5
  value: {
@@ -47,48 +20,55 @@ const c = {
47
20
  steps: {
48
21
  immediate: !0,
49
22
  deep: !0,
50
- handler(t) {
51
- this.ready = t != null && t.length ? t.map(() => !1) : [];
23
+ handler(e) {
24
+ this.ready = e != null && e.length ? e.map(() => !1) : [];
52
25
  }
53
26
  }
54
27
  },
55
28
  methods: {
56
- activeStep(t) {
57
- t !== 0 && !this.available(t) || this.$emit("input", t);
29
+ activeStep(e) {
30
+ e !== 0 && !this.available(e) || this.$emit("input", e);
58
31
  },
59
- setReady(t, e) {
60
- t < this.ready.length && this.$set(this.ready, t, e);
32
+ setReady(e, t) {
33
+ e < this.ready.length && this.$set(this.ready, e, t);
61
34
  },
62
- available(t) {
63
- let e = !0;
64
- if (t > 0 && t < this.ready.length) {
65
- for (let a = 0; a < t; a++)
35
+ available(e) {
36
+ let t = !0;
37
+ if (e > 0 && e < this.ready.length) {
38
+ for (let a = 0; a < e; a++)
66
39
  if (!this.ready[a]) {
67
- e = !1;
40
+ t = !1;
68
41
  break;
69
42
  }
70
43
  }
71
- return e;
44
+ return t;
72
45
  }
73
46
  }
74
- }, l = {};
75
- var o = /* @__PURE__ */ i(
76
- c,
77
- n,
47
+ };
48
+ var u = function() {
49
+ var t = this, a = t._self._c;
50
+ return a("ElSteps", { staticClass: "guide-steps", attrs: { "align-center": "" } }, t._l(t.steps, function(r, s) {
51
+ return a("ElStep", { key: r.label, class: [
52
+ {
53
+ "current important": t.value === s,
54
+ disabled: !t.available(s),
55
+ available: !t.ready[s] && t.available(s)
56
+ }
57
+ ], attrs: { status: t.ready[s] ? "success" : "", title: r.label }, nativeOn: { click: function(c) {
58
+ return t.activeStep(s);
59
+ } } });
60
+ }), 1);
61
+ }, n = [], p = /* @__PURE__ */ l(
62
+ i,
78
63
  u,
64
+ n,
79
65
  !1,
80
- p,
66
+ null,
81
67
  null,
82
68
  null,
83
69
  null
84
70
  );
85
- function p(t) {
86
- for (let e in l)
87
- this[e] = l[e];
88
- }
89
- const f = /* @__PURE__ */ function() {
90
- return o.exports;
91
- }();
71
+ const f = p.exports;
92
72
  export {
93
73
  f as default
94
74
  };
@@ -1,19 +1,8 @@
1
1
  import a from "highlight.js/lib/core";
2
2
  import "highlight.js/styles/atom-one-dark-reasonable.css";
3
- import { escapeHtml as l } from "@web-utils/core";
4
- import { n as g } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
5
- var s = function() {
6
- var e = this, t = e.$createElement, n = e._self._c || t;
7
- return n("pre", {
8
- staticClass: "highlight-js"
9
- }, [n("code", {
10
- class: e.className,
11
- domProps: {
12
- innerHTML: e._s(e.highlighted.value)
13
- }
14
- })]);
15
- }, r = [];
16
- const o = {
3
+ import { escapeHtml as g } from "@web-utils/core";
4
+ import { n as l } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
5
+ const i = {
17
6
  name: "HighlightJS",
18
7
  props: {
19
8
  language: String,
@@ -33,7 +22,7 @@ const o = {
33
22
  if (!this.language && !a.getLanguage(this.language))
34
23
  return console.warn(`The language "${this.language}" you specified could not be found.`), {
35
24
  language: "",
36
- value: l(this.code)
25
+ value: g(this.code)
37
26
  };
38
27
  let e = {};
39
28
  return !this.language || this.autodetect ? e = a.highlightAuto(this.code) : e = a.highlight(this.code, {
@@ -53,24 +42,21 @@ const o = {
53
42
  }
54
43
  }
55
44
  }
56
- }, i = {};
57
- var u = /* @__PURE__ */ g(
58
- o,
45
+ };
46
+ var s = function() {
47
+ var t = this, n = t._self._c;
48
+ return n("pre", { staticClass: "highlight-js" }, [n("code", { class: t.className, domProps: { innerHTML: t._s(t.highlighted.value) } })]);
49
+ }, r = [], h = /* @__PURE__ */ l(
50
+ i,
59
51
  s,
60
52
  r,
61
53
  !1,
62
- h,
54
+ null,
63
55
  null,
64
56
  null,
65
57
  null
66
58
  );
67
- function h(e) {
68
- for (let t in i)
69
- this[t] = i[t];
70
- }
71
- const p = /* @__PURE__ */ function() {
72
- return u.exports;
73
- }();
59
+ const _ = h.exports;
74
60
  export {
75
- p as default
61
+ _ as default
76
62
  };
@@ -1,26 +1,5 @@
1
- import { n as c } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
- var a = function() {
3
- var t = this, e = t.$createElement, n = t._self._c || e;
4
- return n("div", {
5
- class: ["icon-card", "flex-row", t.iconBg]
6
- }, [n("div", {
7
- staticClass: "card-icon_bg"
8
- }, [n("i", {
9
- class: ["card-icon", t.icon]
10
- })]), n("div", {
11
- staticClass: "flex-item"
12
- }, [n("p", {
13
- staticClass: "icon-card_title"
14
- }, [t._t("default")], 2), n("div", {
15
- staticClass: "icon-card_num"
16
- }, [n("span", {
17
- staticClass: "icon-card_color",
18
- on: {
19
- click: t.toDetails
20
- }
21
- }, [t._v(t._s(t.number))]), t._t("nuit")], 2)])]);
22
- }, i = [];
23
- const o = {
1
+ import { n as s } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
2
+ const a = {
24
3
  name: "IconCard",
25
4
  props: {
26
5
  iconBg: {
@@ -39,24 +18,21 @@ const o = {
39
18
  this.$router.push(this.path);
40
19
  }
41
20
  }
42
- }, s = {};
43
- var r = /* @__PURE__ */ c(
44
- o,
21
+ };
22
+ var c = function() {
23
+ var t = this, n = t._self._c;
24
+ return n("div", { class: ["icon-card", "flex-row", t.iconBg] }, [n("div", { staticClass: "card-icon_bg" }, [n("i", { class: ["card-icon", t.icon] })]), n("div", { staticClass: "flex-item" }, [n("p", { staticClass: "icon-card_title" }, [t._t("default")], 2), n("div", { staticClass: "icon-card_num" }, [n("span", { staticClass: "icon-card_color", on: { click: t.toDetails } }, [t._v(t._s(t.number))]), t._t("nuit")], 2)])]);
25
+ }, e = [], i = /* @__PURE__ */ s(
45
26
  a,
46
- i,
27
+ c,
28
+ e,
47
29
  !1,
48
- l,
30
+ null,
49
31
  null,
50
32
  null,
51
33
  null
52
34
  );
53
- function l(t) {
54
- for (let e in s)
55
- this[e] = s[e];
56
- }
57
- const u = /* @__PURE__ */ function() {
58
- return r.exports;
59
- }();
35
+ const l = i.exports;
60
36
  export {
61
- u as default
37
+ l as default
62
38
  };
@@ -1,24 +1,5 @@
1
- import { n as a } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
- var l = function() {
3
- var e = this, t = e.$createElement, n = e._self._c || t;
4
- return n("span", {
5
- staticClass: "avue-icon",
6
- class: {
7
- "avue-icon--small": e.small
8
- }
9
- }, [e.text.includes("#") ? n("svg", {
10
- attrs: {
11
- "aria-hidden": "true"
12
- }
13
- }, [n("use", {
14
- attrs: {
15
- "xlink:href": e.text
16
- }
17
- })]) : n("i", {
18
- class: e.text
19
- })]);
20
- }, o = [];
21
- const r = {
1
+ import { n as t } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
2
+ const s = {
22
3
  name: "IconTemp",
23
4
  props: {
24
5
  small: Boolean,
@@ -27,24 +8,21 @@ const r = {
27
8
  default: ""
28
9
  }
29
10
  }
30
- }, s = {};
31
- var c = /* @__PURE__ */ a(
32
- r,
11
+ };
12
+ var a = function() {
13
+ var e = this, n = e._self._c;
14
+ 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 })]);
15
+ }, l = [], r = /* @__PURE__ */ t(
16
+ s,
17
+ a,
33
18
  l,
34
- o,
35
19
  !1,
36
- _,
20
+ null,
37
21
  null,
38
22
  null,
39
23
  null
40
24
  );
41
- function _(e) {
42
- for (let t in s)
43
- this[t] = s[t];
44
- }
45
- const u = /* @__PURE__ */ function() {
46
- return c.exports;
47
- }();
25
+ const c = r.exports;
48
26
  export {
49
- u as default
27
+ c as default
50
28
  };
@@ -1,31 +1,5 @@
1
- import { n as l } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
- var s = function() {
3
- var e = this, t = e.$createElement, r = e._self._c || t;
4
- return r("ElementDialog", e._g(e._b({
5
- attrs: {
6
- "custom-class": "iframe-window",
7
- embed: "",
8
- height: "60vh",
9
- title: e.title,
10
- "show-full-screen": "",
11
- visible: e.visible
12
- },
13
- scopedSlots: e._u([{
14
- key: "default",
15
- fn: function() {
16
- return [r("iframe", {
17
- staticClass: "iframe-window-iframe",
18
- attrs: {
19
- src: e.url,
20
- frameborder: "0"
21
- }
22
- })];
23
- },
24
- proxy: !0
25
- }])
26
- }, "ElementDialog", e.$attrs, !1), e.$listeners));
27
- }, a = [];
28
- const i = {
1
+ import { n as r } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
2
+ const n = {
29
3
  name: "IframeWindow",
30
4
  props: {
31
5
  title: {
@@ -38,24 +12,23 @@ const i = {
38
12
  },
39
13
  visible: Boolean
40
14
  }
41
- }, n = {};
42
- var o = /* @__PURE__ */ l(
43
- i,
44
- s,
15
+ };
16
+ var l = function() {
17
+ var e = this, t = e._self._c;
18
+ return t("ElementDialog", e._g(e._b({ attrs: { "custom-class": "iframe-window", embed: "", height: "60vh", title: e.title, "show-full-screen": "", visible: e.visible }, scopedSlots: e._u([{ key: "default", fn: function() {
19
+ return [t("iframe", { staticClass: "iframe-window-iframe", attrs: { src: e.url, frameborder: "0" } })];
20
+ }, proxy: !0 }]) }, "ElementDialog", e.$attrs, !1), e.$listeners));
21
+ }, a = [], s = /* @__PURE__ */ r(
22
+ n,
23
+ l,
45
24
  a,
46
25
  !1,
47
- _,
26
+ null,
48
27
  null,
49
28
  null,
50
29
  null
51
30
  );
52
- function _(e) {
53
- for (let t in n)
54
- this[t] = n[t];
55
- }
56
- const f = /* @__PURE__ */ function() {
57
- return o.exports;
58
- }();
31
+ const f = s.exports;
59
32
  export {
60
33
  f as default
61
34
  };
@@ -1,154 +1,22 @@
1
- var c = Object.defineProperty;
1
+ var p = Object.defineProperty;
2
2
  var r = Object.getOwnPropertySymbols;
3
- var l = Object.prototype.hasOwnProperty, u = Object.prototype.propertyIsEnumerable;
4
- var a = (e, o, t) => o in e ? c(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, s = (e, o) => {
5
- for (var t in o || (o = {}))
6
- l.call(o, t) && a(e, t, o[t]);
3
+ var l = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
4
+ var a = (t, e, o) => e in t ? p(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, s = (t, e) => {
5
+ for (var o in e || (e = {}))
6
+ l.call(e, o) && a(t, o, e[o]);
7
7
  if (r)
8
- for (var t of r(o))
9
- u.call(o, t) && a(e, t, o[t]);
10
- return e;
8
+ for (var o of r(e))
9
+ c.call(e, o) && a(t, o, e[o]);
10
+ return t;
11
11
  };
12
- import { B as f } from "../chunks/util.ae730cde.mjs";
13
- import { VueCropper as m } from "vue-cropper";
14
- import d from "vue";
15
- import { n as h } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
16
- var v = function() {
17
- var e = this, o = e.$createElement, t = e._self._c || o;
18
- return t("ElementDialog", {
19
- staticClass: "avue-cropper",
20
- attrs: {
21
- visible: e.visible,
22
- "before-close": e.cancel,
23
- title: "图片剪裁",
24
- "close-on-press-escape": !1,
25
- "close-on-click-modal": !1,
26
- "modal-append-to-body": e.$AVUE.modalAppendToBody,
27
- "append-to-body": e.$AVUE.appendToBody,
28
- width: "1000px"
29
- },
30
- on: {
31
- "update:visible": function(i) {
32
- e.visible = i;
33
- }
34
- },
35
- scopedSlots: e._u([{
36
- key: "footer",
37
- fn: function() {
38
- return [t("ElButton", {
39
- attrs: {
40
- size: "small",
41
- type: "primary"
42
- },
43
- on: {
44
- click: e.submit
45
- }
46
- }, [e._v(" 确 定 ")]), t("ElButton", {
47
- attrs: {
48
- size: "small"
49
- },
50
- on: {
51
- click: function(i) {
52
- return e.cancel();
53
- }
54
- }
55
- }, [e._v(" 取 消 ")])];
56
- },
57
- proxy: !0
58
- }])
59
- }, [t("div", {
60
- staticClass: "cropper-content"
61
- }, [t("div", {
62
- staticClass: "cropper-box"
63
- }, [t("div", {
64
- staticClass: "cropper"
65
- }, [t("VueCropper", {
66
- ref: "cropper",
67
- attrs: {
68
- img: e.option.img,
69
- "output-size": e.option.outputSize,
70
- "output-type": e.option.outputType,
71
- info: e.option.info,
72
- "can-scale": e.option.canScale,
73
- "auto-crop": e.option.autoCrop,
74
- "auto-crop-width": e.option.autoCropWidth,
75
- "auto-crop-height": e.option.autoCropHeight,
76
- fixed: e.option.fixed,
77
- "fixed-number": e.option.fixedNumber,
78
- full: e.option.full,
79
- "fixed-box": e.option.fixedBox,
80
- "can-move": e.option.canMove,
81
- "can-move-box": e.option.canMoveBox,
82
- original: e.option.original,
83
- "center-box": e.option.centerBox,
84
- height: e.option.height,
85
- "info-true": e.option.infoTrue,
86
- "max-img-size": e.option.maxImgSize,
87
- enlarge: e.option.enlarge,
88
- mode: e.option.mode
89
- },
90
- on: {
91
- realTime: e.realTime
92
- }
93
- })], 1), t("div", {
94
- staticClass: "footer-btn"
95
- }, [t("ElButton", {
96
- attrs: {
97
- size: "mini",
98
- type: "danger",
99
- icon: "el-icon-zoom-in"
100
- },
101
- on: {
102
- click: function(i) {
103
- return e.changeScale(1);
104
- }
105
- }
106
- }), t("ElButton", {
107
- attrs: {
108
- size: "mini",
109
- type: "danger",
110
- icon: "el-icon-zoom-out"
111
- },
112
- on: {
113
- click: function(i) {
114
- return e.changeScale(-1);
115
- }
116
- }
117
- }), t("ElButton", {
118
- attrs: {
119
- size: "mini",
120
- icon: "el-icon-back",
121
- type: "danger"
122
- },
123
- on: {
124
- click: e.rotateLeft
125
- }
126
- }), t("ElButton", {
127
- attrs: {
128
- size: "mini",
129
- type: "danger",
130
- icon: "el-icon-right"
131
- },
132
- on: {
133
- click: e.rotateRight
134
- }
135
- })], 1)]), t("div", {
136
- staticClass: "show-preview"
137
- }, [t("div", {
138
- staticClass: "preview",
139
- style: e.previews.div
140
- }, [t("img", {
141
- style: e.previews.img,
142
- attrs: {
143
- src: e.previews.url,
144
- alt: ""
145
- }
146
- })])])])]);
147
- }, g = [];
12
+ import { B as u } from "../chunks/util.ae730cde.mjs";
13
+ import { VueCropper as f } from "vue-cropper";
14
+ import m from "vue";
15
+ import { n as d } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
148
16
  const n = {
149
17
  name: "ImageCropper",
150
18
  components: {
151
- VueCropper: m
19
+ VueCropper: f
152
20
  },
153
21
  data() {
154
22
  return {
@@ -162,8 +30,8 @@ const n = {
162
30
  this.visible = !0;
163
31
  },
164
32
  // 图片缩放
165
- changeScale(e) {
166
- e = e || 1, this.$refs.cropper.changeScale(e);
33
+ changeScale(t) {
34
+ t = t || 1, this.$refs.cropper.changeScale(t);
167
35
  },
168
36
  // 向左旋转
169
37
  rotateLeft() {
@@ -174,21 +42,21 @@ const n = {
174
42
  this.$refs.cropper.rotateRight();
175
43
  },
176
44
  // 实时预览函数
177
- realTime(e) {
178
- this.previews = e;
45
+ realTime(t) {
46
+ this.previews = t;
179
47
  },
180
48
  submit() {
181
- this.visible = !1, this.$refs.cropper.getCropData((e) => {
182
- let o = e;
183
- this.option.type === "file" && (o = f(e, `${(/* @__PURE__ */ new Date()).getTime()}.${this.option.outputType}`)), this.option.callback && this.option.callback(o);
49
+ this.visible = !1, this.$refs.cropper.getCropData((t) => {
50
+ let e = t;
51
+ this.option.type === "file" && (e = u(t, `${(/* @__PURE__ */ new Date()).getTime()}.${this.option.outputType}`)), this.option.callback && this.option.callback(e);
184
52
  });
185
53
  },
186
- cancel(e) {
187
- e && e(), this.visible = !1, this.option.cancel && this.option.cancel(), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
54
+ cancel(t) {
55
+ t && t(), this.visible = !1, this.option.cancel && this.option.cancel(), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
188
56
  }
189
57
  }
190
- }, x = (e = {}) => {
191
- const o = d.extend(n), t = s({
58
+ }, h = (t = {}) => {
59
+ const e = m.extend(n), o = s({
192
60
  outputSize: 1,
193
61
  // 裁剪生成图片的质量(可选0.1 - 1)
194
62
  outputType: "jpeg",
@@ -218,32 +86,39 @@ const n = {
218
86
  infoTrue: !1,
219
87
  // true为展示真实输出图片宽高,false展示看到的截图框宽高
220
88
  enlarge: 1
221
- }, e), i = new o({
89
+ }, t), i = new e({
222
90
  data: {
223
- option: t
91
+ option: o
224
92
  }
225
93
  }).$mount();
226
94
  return document.body.appendChild(i.$el), i.show(), i;
227
95
  };
228
- n.imageCropper = x;
229
- const _ = n, p = {};
230
- var b = /* @__PURE__ */ h(
231
- _,
96
+ n.imageCropper = h;
97
+ const v = n;
98
+ var g = function() {
99
+ var e = this, o = e._self._c;
100
+ return e._self._setupProxy, o("ElementDialog", { staticClass: "avue-cropper", attrs: { visible: e.visible, "before-close": e.cancel, title: "图片剪裁", "close-on-press-escape": !1, "close-on-click-modal": !1, "modal-append-to-body": e.$AVUE.modalAppendToBody, "append-to-body": e.$AVUE.appendToBody, width: "1000px" }, on: { "update:visible": function(i) {
101
+ e.visible = i;
102
+ } }, scopedSlots: e._u([{ key: "footer", fn: function() {
103
+ return [o("ElButton", { attrs: { size: "small", type: "primary" }, on: { click: e.submit } }, [e._v(" 确 定 ")]), o("ElButton", { attrs: { size: "small" }, on: { click: function(i) {
104
+ return e.cancel();
105
+ } } }, [e._v(" 取 消 ")])];
106
+ }, proxy: !0 }]) }, [o("div", { staticClass: "cropper-content" }, [o("div", { staticClass: "cropper-box" }, [o("div", { staticClass: "cropper" }, [o("VueCropper", { ref: "cropper", attrs: { img: e.option.img, "output-size": e.option.outputSize, "output-type": e.option.outputType, info: e.option.info, "can-scale": e.option.canScale, "auto-crop": e.option.autoCrop, "auto-crop-width": e.option.autoCropWidth, "auto-crop-height": e.option.autoCropHeight, fixed: e.option.fixed, "fixed-number": e.option.fixedNumber, full: e.option.full, "fixed-box": e.option.fixedBox, "can-move": e.option.canMove, "can-move-box": e.option.canMoveBox, original: e.option.original, "center-box": e.option.centerBox, height: e.option.height, "info-true": e.option.infoTrue, "max-img-size": e.option.maxImgSize, enlarge: e.option.enlarge, mode: e.option.mode }, on: { realTime: e.realTime } })], 1), o("div", { staticClass: "footer-btn" }, [o("ElButton", { attrs: { size: "mini", type: "danger", icon: "el-icon-zoom-in" }, on: { click: function(i) {
107
+ return e.changeScale(1);
108
+ } } }), o("ElButton", { attrs: { size: "mini", type: "danger", icon: "el-icon-zoom-out" }, on: { click: function(i) {
109
+ return e.changeScale(-1);
110
+ } } }), o("ElButton", { attrs: { size: "mini", icon: "el-icon-back", type: "danger" }, on: { click: e.rotateLeft } }), o("ElButton", { attrs: { size: "mini", type: "danger", icon: "el-icon-right" }, on: { click: e.rotateRight } })], 1)]), o("div", { staticClass: "show-preview" }, [o("div", { staticClass: "preview", style: e.previews.div }, [o("img", { style: e.previews.img, attrs: { src: e.previews.url, alt: "" } })])])])]);
111
+ }, x = [], b = /* @__PURE__ */ d(
232
112
  v,
233
113
  g,
114
+ x,
234
115
  !1,
235
- C,
116
+ null,
236
117
  null,
237
118
  null,
238
119
  null
239
120
  );
240
- function C(e) {
241
- for (let o in p)
242
- this[o] = p[o];
243
- }
244
- const k = /* @__PURE__ */ function() {
245
- return b.exports;
246
- }();
121
+ const w = b.exports;
247
122
  export {
248
- k as default
123
+ w as default
249
124
  };