yahee-components 0.0.108 → 0.0.109

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 (63) hide show
  1. package/es/annex-upload/annex-upload.vue.js +51 -154
  2. package/es/annex-upload/annex-upload.vue2.js +119 -2
  3. package/es/annex-upload/index.js +3 -3
  4. package/es/border-wrap/border-wrap.vue.js +64 -95
  5. package/es/border-wrap/border-wrap.vue2.js +46 -2
  6. package/es/common-import/common-import.vue.js +369 -693
  7. package/es/common-import/common-import.vue2.js +364 -2
  8. package/es/common-import/index.js +3 -3
  9. package/es/complex-search/batch-search-dialog.vue.js +116 -4
  10. package/es/complex-search/batch-search-dialog.vue2.js +27 -136
  11. package/es/complex-search/complex-search.vue.js +14 -14
  12. package/es/copy/copy.vue.js +37 -55
  13. package/es/copy/copy.vue2.js +34 -2
  14. package/es/copy/index.js +3 -3
  15. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +114 -213
  16. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +125 -2
  17. package/es/drop-down-condition/drop-down-condition.vue.js +115 -215
  18. package/es/drop-down-condition/drop-down-condition.vue2.js +127 -2
  19. package/es/echart-gauge/echart-gauge.vue.js +12 -140
  20. package/es/echart-gauge/echart-gauge.vue2.js +147 -2
  21. package/es/echart-gauge/index.js +3 -3
  22. package/es/file-download-wrapper/file-download-wrapper.vue.js +143 -244
  23. package/es/file-download-wrapper/file-download-wrapper.vue2.js +113 -2
  24. package/es/file-download-wrapper/index.js +4 -4
  25. package/es/filter-container/filter-container.vue.js +18 -66
  26. package/es/filter-container/filter-container.vue2.js +59 -2
  27. package/es/filter-container/index.js +4 -4
  28. package/es/filter-wrapper/filter-wrapper.vue.js +16 -4
  29. package/es/filter-wrapper/filter-wrapper.vue2.js +40 -45
  30. package/es/height-collapse/height-collapse.vue.js +24 -51
  31. package/es/height-collapse/height-collapse.vue2.js +42 -2
  32. package/es/height-collapse/index.js +4 -4
  33. package/es/help-tag/help-tag.vue.js +44 -78
  34. package/es/help-tag/help-tag.vue2.js +49 -2
  35. package/es/help-tag/index.js +3 -3
  36. package/es/image-upload/image-upload.vue.js +109 -170
  37. package/es/image-upload/image-upload.vue2.js +91 -2
  38. package/es/image-upload/index.js +3 -3
  39. package/es/left-condition/index.js +3 -3
  40. package/es/left-condition/left-condition-sub.vue.js +32 -91
  41. package/es/left-condition/left-condition-sub.vue2.js +76 -2
  42. package/es/left-condition/left-condition.vue.js +70 -218
  43. package/es/left-condition/left-condition.vue2.js +160 -2
  44. package/es/left-condition-enum/index.js +3 -3
  45. package/es/left-condition-enum/left-condition-enum.vue.js +20 -49
  46. package/es/left-condition-enum/left-condition-enum.vue2.js +40 -2
  47. package/es/operation-log/operation-log-content.vue.js +71 -92
  48. package/es/operation-log/operation-log-content.vue2.js +39 -2
  49. package/es/operation-log/operation-log-dialog.vue.js +45 -67
  50. package/es/operation-log/operation-log-dialog.vue2.js +38 -2
  51. package/es/operation-log/operation-log-form.vue.js +108 -183
  52. package/es/operation-log/operation-log-form.vue2.js +104 -2
  53. package/es/operation-log/operation-log.vue.js +119 -228
  54. package/es/operation-log/operation-log.vue2.js +135 -2
  55. package/es/packages/components/api/log-server.js +6 -6
  56. package/es/packages/components/api/upload-server.js +1 -1
  57. package/es/packages/components/hooks/useEcharts.js +19 -19
  58. package/es/packages/components/hooks/useImg.js +8 -8
  59. package/es/scale-screen/index.js +4 -4
  60. package/es/scale-screen/scale-screen.vue.js +19 -126
  61. package/es/scale-screen/scale-screen.vue2.js +125 -2
  62. package/es/yahee-components.css +1 -1
  63. package/package.json +1 -1
@@ -1,80 +1,46 @@
1
- import { defineComponent as d, ref as e, nextTick as h, createElementBlock as m, openBlock as v, createVNode as r, unref as n, withCtx as a, withDirectives as g, createElementVNode as y, withModifiers as C } from "vue";
2
- import { GetHelpTag as _ } from "../packages/components/api/log/index.js";
3
- import { InfoFilled as k } from "@element-plus/icons-vue";
4
- import { ElPopover as T, vLoading as w, ElIcon as x } from "element-plus";
5
- import "element-plus/theme-chalk/src/base.scss";
6
- import "element-plus/theme-chalk/src/popper.scss";
7
- import "element-plus/theme-chalk/src/popover.scss";
8
- const H = ["innerHTML"], b = /* @__PURE__ */ d({
9
- __name: "help-tag",
10
- props: {
11
- tipsId: {
12
- type: String,
13
- default: ""
14
- },
15
- tipsContentSize: {
16
- type: Object,
17
- default: () => ({ width: 80, height: 80 }),
18
- required: !1
19
- }
20
- },
21
- setup(c) {
22
- const i = e(), f = e(null), t = e(null), l = e(null), p = e(!1), s = c;
23
- h(() => {
24
- l.value && (l.value.style.height = `${s.tipsContentSize.height}px`), t.value && typeof t.value.updatePopper == "function" && t.value.updatePopper();
25
- });
26
- const u = () => {
27
- p.value = !0, setTimeout(() => {
28
- _({ Id: s.tipsId }).then((o) => {
29
- o && o.Content && (i.value = o.Content.Content);
30
- }).catch(() => {
31
- i.value = "加载失败,请重试";
32
- }).finally(() => {
33
- p.value = !1;
34
- });
35
- }, 3e3);
36
- };
37
- return (o, I) => (v(), m("div", {
38
- class: "yahee-help-tag",
39
- ref_key: "yaheeHelpTag",
40
- ref: f
41
- }, [
42
- r(n(T), {
43
- ref_key: "popoverRef",
44
- ref: t,
45
- placement: "bottom",
46
- width: c.tipsContentSize.width,
47
- "append-to": f.value,
48
- trigger: "click"
49
- }, {
50
- reference: a(() => [
51
- r(n(x), {
52
- size: "18",
53
- color: "#ccc",
54
- onClick: C(u, ["stop"]),
55
- style: { cursor: "pointer" }
56
- }, {
57
- default: a(() => [
58
- r(n(k))
59
- ]),
60
- _: 1
61
- })
62
- ]),
63
- default: a(() => [
64
- g(y("div", {
65
- class: "tips-content",
66
- ref_key: "contentRef",
67
- ref: l,
68
- innerHTML: i.value
69
- }, null, 8, H), [
70
- [n(w), p.value]
71
- ])
72
- ]),
73
- _: 1
74
- }, 8, ["width", "append-to"])
75
- ], 512));
76
- }
77
- });
1
+ import c from "./help-tag.vue2.js";
2
+ import { createElementBlock as i, openBlock as r, createVNode as t, withCtx as o, withDirectives as a, createElementVNode as l, withModifiers as p } from "vue";
3
+ import d from "../_virtual/_plugin-vue_export-helper.js";
4
+ const s = {
5
+ class: "yahee-help-tag",
6
+ ref: "yaheeHelpTag"
7
+ }, f = ["innerHTML"];
8
+ function _(h, m, n, e, g, v) {
9
+ return r(), i("div", s, [
10
+ t(e.ElPopover, {
11
+ ref: "popoverRef",
12
+ placement: "bottom",
13
+ width: n.tipsContentSize.width,
14
+ "append-to": e.yaheeHelpTag,
15
+ trigger: "click"
16
+ }, {
17
+ reference: o(() => [
18
+ t(e.ElIcon, {
19
+ size: "18",
20
+ color: "#ccc",
21
+ onClick: p(e.getTipsContent, ["stop"]),
22
+ style: { cursor: "pointer" }
23
+ }, {
24
+ default: o(() => [
25
+ t(e.InfoFilled)
26
+ ]),
27
+ _: 1
28
+ })
29
+ ]),
30
+ default: o(() => [
31
+ a(l("div", {
32
+ class: "tips-content",
33
+ ref: "contentRef",
34
+ innerHTML: e.tipsContent
35
+ }, null, 8, f), [
36
+ [e.vLoading, e.loading]
37
+ ])
38
+ ]),
39
+ _: 1
40
+ }, 8, ["width", "append-to"])
41
+ ], 512);
42
+ }
43
+ const C = /* @__PURE__ */ d(c, [["render", _], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/help-tag/help-tag.vue"]]);
78
44
  export {
79
- b as default
45
+ C as default
80
46
  };
@@ -1,4 +1,51 @@
1
- import f from "./help-tag.vue.js";
1
+ import { defineComponent as f, ref as e, nextTick as c } from "vue";
2
+ import { GetHelpTag as d } from "../packages/components/api/log/index.js";
3
+ import { InfoFilled as g } from "@element-plus/icons-vue";
4
+ import { vLoading as m, ElIcon as v, ElPopover as h } from "element-plus";
5
+ import "element-plus/theme-chalk/src/base.scss";
6
+ import "element-plus/theme-chalk/src/popper.scss";
7
+ import "element-plus/theme-chalk/src/popover.scss";
8
+ const E = /* @__PURE__ */ f({
9
+ __name: "help-tag",
10
+ props: {
11
+ tipsId: {
12
+ type: String,
13
+ default: ""
14
+ },
15
+ tipsContentSize: {
16
+ type: Object,
17
+ default: () => ({ width: 80, height: 80 }),
18
+ required: !1
19
+ }
20
+ },
21
+ setup(a, { expose: u }) {
22
+ u();
23
+ const n = e(), s = e(null), t = e(null), o = e(null), p = e(!1), i = a;
24
+ c(() => {
25
+ o.value && (o.value.style.height = `${i.tipsContentSize.height}px`), t.value && typeof t.value.updatePopper == "function" && t.value.updatePopper();
26
+ });
27
+ const r = { tipsContent: n, yaheeHelpTag: s, popoverRef: t, contentRef: o, loading: p, props: i, getTipsContent: () => {
28
+ p.value = !0, setTimeout(() => {
29
+ d({ Id: i.tipsId }).then((l) => {
30
+ l && l.Content && (n.value = l.Content.Content);
31
+ }).catch(() => {
32
+ n.value = "加载失败,请重试";
33
+ }).finally(() => {
34
+ p.value = !1;
35
+ });
36
+ }, 3e3);
37
+ }, get InfoFilled() {
38
+ return g;
39
+ }, get ElPopover() {
40
+ return h;
41
+ }, get ElIcon() {
42
+ return v;
43
+ }, get vLoading() {
44
+ return m;
45
+ } };
46
+ return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
47
+ }
48
+ });
2
49
  export {
3
- f as default
50
+ E as default
4
51
  };
@@ -1,7 +1,7 @@
1
1
  import { withInstall as t } from "../utils/install.js";
2
2
  import a from "./help-tag.vue.js";
3
- const m = t(a);
3
+ const l = t(a);
4
4
  export {
5
- m as YaheeHelpTag,
6
- m as default
5
+ l as YaheeHelpTag,
6
+ l as default
7
7
  };
@@ -1,177 +1,116 @@
1
- import { defineComponent as U, ref as g, onMounted as B, getCurrentInstance as N, createElementBlock as p, openBlock as d, Fragment as F, withDirectives as D, createVNode as a, unref as t, normalizeStyle as L, withCtx as o, renderSlot as M, createBlock as $, createElementVNode as n, createTextVNode as b, withModifiers as I, createCommentVNode as P } from "vue";
2
- import w from "../packages/components/hooks/useImg.js";
3
- import { useIsImg as T, useUpload as j } from "../packages/components/hooks/useUpload.js";
4
- import { vLoading as S, ElUpload as A, ElImage as G, ElIcon as c, ElDialog as x, ElMessage as h } from "element-plus";
5
- import "element-plus/theme-chalk/src/base.scss";
6
- import "element-plus/theme-chalk/src/upload.scss";
7
- import "element-plus/theme-chalk/src/progress.scss";
8
- import "element-plus/theme-chalk/src/dialog.scss";
9
- import "element-plus/theme-chalk/src/overlay.scss";
10
- import "element-plus/theme-chalk/src/image.scss";
11
- import "element-plus/theme-chalk/src/image-viewer.scss";
12
- import "element-plus/theme-chalk/src/badge.scss";
13
- import "element-plus/theme-chalk/src/message.scss";
14
- import { Delete as R, Plus as Y, CircleCloseFilled as _ } from "@element-plus/icons-vue";
15
- const q = { class: "yahee-image-upload" }, H = {
1
+ import f from "./image-upload.vue2.js";
2
+ import { createElementBlock as s, openBlock as t, Fragment as h, withDirectives as u, createVNode as o, normalizeStyle as _, withCtx as i, renderSlot as w, createBlock as V, createElementVNode as n, createTextVNode as v, withModifiers as c, createCommentVNode as y } from "vue";
3
+ import I from "../_virtual/_plugin-vue_export-helper.js";
4
+ const k = { class: "yahee-image-upload" }, E = {
16
5
  key: 0,
17
6
  style: { width: "100%", height: "100%" }
18
- }, J = ["src"], de = /* @__PURE__ */ U({
19
- name: "YaheeImageUpload",
20
- __name: "image-upload",
21
- props: {
22
- modelValue: { default: () => ({ index: 0, fileId: "", fileName: "" }) },
23
- showDelete: { type: Boolean, default: !0 },
24
- zoom: { default: 1 },
25
- imgSize: { default: () => ({ width: 80, height: 80 }) },
26
- limitImgSize: { type: Boolean, default: !0 },
27
- limitFileSize: { type: Boolean, default: !0 },
28
- fileSize: { default: 50 },
29
- fileSizeUnit: { default: "kb" },
30
- fileType: { default: "105" }
31
- },
32
- emits: ["update:modelValue", "change"],
33
- setup(y, { emit: V }) {
34
- const s = y, f = V, u = g(!1), C = (e) => {
35
- if (!T(e.raw)) {
36
- h.error("只能选择图片格式文件!");
37
- return;
38
- }
39
- if (s.limitFileSize) {
40
- let l = e.size;
41
- if (s.fileSizeUnit.toLowerCase() == "kb" ? l = e.size / 1024 : l = e.size / 1024 / 1024, !(l < s.fileSize)) {
42
- h.error(`图片大小不能超过 ${s.fileSize}${s.fileSizeUnit}!`);
43
- return;
44
- }
45
- }
46
- u.value = !0, j(s.fileType, e.raw).then((l) => {
47
- const r = {
48
- fileName: e.name,
49
- fileId: l[0],
50
- index: 0
51
- };
52
- f("update:modelValue", r), f("change", {
53
- fileName: e.name,
54
- fileId: l[0],
55
- index: 0
56
- }), u.value = !1;
57
- }).catch((l) => {
58
- h.error("update image error", l), u.value = !1;
59
- });
60
- }, k = () => {
61
- f("update:modelValue", "");
62
- }, z = g(""), m = g(!1), E = () => {
63
- var e;
64
- z.value = w((e = s.modelValue) == null ? void 0 : e.fileId, !0), m.value = !0;
65
- };
66
- return B(() => {
67
- var i;
68
- const e = (i = N()) == null ? void 0 : i.appContext.app;
69
- e && e.directive("loading", S);
70
- }), (e, i) => (d(), p(F, null, [
71
- D((d(), p("div", q, [
72
- a(t(A), {
73
- class: "picture-uploader",
74
- action: "#",
75
- style: L({ width: e.imgSize.width * e.zoom + "px", height: e.imgSize.height * e.zoom + "px" }),
76
- "show-file-list": !1,
77
- multiple: !1,
78
- "auto-upload": !1,
79
- accept: "image/jpeg,image/jpg,image/gif,image/png",
80
- "on-change": C
81
- }, {
82
- default: o(() => {
83
- var l;
84
- return [
85
- M(e.$slots, "default", {
86
- value: (l = e.modelValue) == null ? void 0 : l.fileId
87
- }, () => {
88
- var r, v;
89
- return [
90
- (r = e.modelValue) != null && r.fileId ? (d(), p("div", H, [
91
- a(t(G), {
92
- class: "picture",
93
- src: t(w)((v = e.modelValue) == null ? void 0 : v.fileId)
94
- }, {
95
- error: o(() => i[2] || (i[2] = [
96
- n("div", { style: { display: "none" } }, null, -1)
97
- ])),
98
- placeholder: o(() => i[3] || (i[3] = [
99
- n("div", { class: "image-slot" }, [
100
- b("Loading"),
101
- n("span", { class: "dot" }, "...")
102
- ], -1)
103
- ])),
104
- _: 1
105
- }, 8, ["src"]),
106
- n("span", {
107
- class: "upload-actions",
108
- onClick: I(E, ["stop"])
109
- }, [
110
- e.showDelete ? (d(), p("span", {
111
- key: 0,
112
- class: "upload-delete",
113
- onClick: I(k, ["stop"])
114
- }, [
115
- a(t(c), {
116
- size: 20,
117
- color: "#ff1e1e"
118
- }, {
119
- default: o(() => [
120
- a(t(R))
121
- ]),
122
- _: 1
123
- })
124
- ])) : P("", !0)
125
- ])
126
- ])) : (d(), $(t(c), {
127
- key: 1,
128
- class: "picture-uploader-icon",
129
- size: 20
7
+ }, p = ["src"];
8
+ function z(g, l, a, e, C, x) {
9
+ return t(), s(h, null, [
10
+ u((t(), s("div", k, [
11
+ o(e.ElUpload, {
12
+ class: "picture-uploader",
13
+ action: "#",
14
+ style: _({ width: a.imgSize.width * a.zoom + "px", height: a.imgSize.height * a.zoom + "px" }),
15
+ "show-file-list": !1,
16
+ multiple: !1,
17
+ "auto-upload": !1,
18
+ accept: "image/jpeg,image/jpg,image/gif,image/png",
19
+ "on-change": e.handleUploadChange
20
+ }, {
21
+ default: i(() => {
22
+ var d;
23
+ return [
24
+ w(g.$slots, "default", {
25
+ value: (d = a.modelValue) == null ? void 0 : d.fileId
26
+ }, () => {
27
+ var m, r;
28
+ return [
29
+ (m = a.modelValue) != null && m.fileId ? (t(), s("div", E, [
30
+ o(e.ElImage, {
31
+ class: "picture",
32
+ src: e.useImage((r = a.modelValue) == null ? void 0 : r.fileId)
130
33
  }, {
131
- default: o(() => [
132
- a(t(Y))
133
- ]),
34
+ error: i(() => l[2] || (l[2] = [
35
+ n("div", { style: { display: "none" } }, null, -1)
36
+ ])),
37
+ placeholder: i(() => l[3] || (l[3] = [
38
+ n("div", { class: "image-slot" }, [
39
+ v("Loading"),
40
+ n("span", { class: "dot" }, "...")
41
+ ], -1)
42
+ ])),
134
43
  _: 1
135
- }))
136
- ];
137
- })
138
- ];
139
- }),
140
- _: 3
141
- }, 8, ["style"])
142
- ])), [
143
- [t(S), u.value]
44
+ }, 8, ["src"]),
45
+ n("span", {
46
+ class: "upload-actions",
47
+ onClick: c(e.handleFilePreview, ["stop"])
48
+ }, [
49
+ a.showDelete ? (t(), s("span", {
50
+ key: 0,
51
+ class: "upload-delete",
52
+ onClick: c(e.handleFileRemove, ["stop"])
53
+ }, [
54
+ o(e.ElIcon, {
55
+ size: 20,
56
+ color: "#ff1e1e"
57
+ }, {
58
+ default: i(() => [
59
+ o(e.Delete)
60
+ ]),
61
+ _: 1
62
+ })
63
+ ])) : y("", !0)
64
+ ])
65
+ ])) : (t(), V(e.ElIcon, {
66
+ key: 1,
67
+ class: "picture-uploader-icon",
68
+ size: 20
69
+ }, {
70
+ default: i(() => [
71
+ o(e.Plus)
72
+ ]),
73
+ _: 1
74
+ }))
75
+ ];
76
+ })
77
+ ];
78
+ }),
79
+ _: 3
80
+ }, 8, ["style"])
81
+ ])), [
82
+ [e.vLoading, e.loading]
83
+ ]),
84
+ o(e.ElDialog, {
85
+ modelValue: e.dialogVisible,
86
+ "onUpdate:modelValue": l[1] || (l[1] = (d) => e.dialogVisible = d),
87
+ "show-close": !1
88
+ }, {
89
+ header: i(() => [
90
+ o(e.ElIcon, {
91
+ size: 40,
92
+ color: "#a4a4a4",
93
+ class: "pull-right marginB6",
94
+ onClick: l[0] || (l[0] = (d) => e.dialogVisible = !1)
95
+ }, {
96
+ default: i(() => [
97
+ o(e.CircleCloseFilled)
98
+ ]),
99
+ _: 1
100
+ })
144
101
  ]),
145
- a(t(x), {
146
- modelValue: m.value,
147
- "onUpdate:modelValue": i[1] || (i[1] = (l) => m.value = l),
148
- "show-close": !1
149
- }, {
150
- header: o(() => [
151
- a(t(c), {
152
- size: 40,
153
- color: "#a4a4a4",
154
- class: "pull-right marginB6",
155
- onClick: i[0] || (i[0] = (l) => m.value = !1)
156
- }, {
157
- default: o(() => [
158
- a(t(_))
159
- ]),
160
- _: 1
161
- })
162
- ]),
163
- default: o(() => [
164
- n("img", {
165
- style: { width: "100%" },
166
- src: z.value,
167
- alt: "Preview Image"
168
- }, null, 8, J)
169
- ]),
170
- _: 1
171
- }, 8, ["modelValue"])
172
- ], 64));
173
- }
174
- });
102
+ default: i(() => [
103
+ n("img", {
104
+ style: { width: "100%" },
105
+ src: e.dialogImageUrl,
106
+ alt: "Preview Image"
107
+ }, null, 8, p)
108
+ ]),
109
+ _: 1
110
+ }, 8, ["modelValue"])
111
+ ], 64);
112
+ }
113
+ const D = /* @__PURE__ */ I(f, [["render", z], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/image-upload/image-upload.vue"]]);
175
114
  export {
176
- de as default
115
+ D as default
177
116
  };
@@ -1,4 +1,93 @@
1
- import f from "./image-upload.vue.js";
1
+ import { defineComponent as y, ref as o, onMounted as v, getCurrentInstance as E } from "vue";
2
+ import p from "../packages/components/hooks/useImg.js";
3
+ import { useIsImg as _, useUpload as b } from "../packages/components/hooks/useUpload.js";
4
+ import { vLoading as f, ElMessage as u, ElImage as q, ElIcon as C, ElDialog as U, ElUpload as w } from "element-plus";
5
+ import "element-plus/theme-chalk/src/base.scss";
6
+ import "element-plus/theme-chalk/src/upload.scss";
7
+ import "element-plus/theme-chalk/src/progress.scss";
8
+ import "element-plus/theme-chalk/src/dialog.scss";
9
+ import "element-plus/theme-chalk/src/overlay.scss";
10
+ import "element-plus/theme-chalk/src/image.scss";
11
+ import "element-plus/theme-chalk/src/image-viewer.scss";
12
+ import "element-plus/theme-chalk/src/badge.scss";
13
+ import "element-plus/theme-chalk/src/message.scss";
14
+ import { CircleCloseFilled as x, Plus as F, Delete as V } from "@element-plus/icons-vue";
15
+ const Y = /* @__PURE__ */ y({
16
+ name: "YaheeImageUpload",
17
+ __name: "image-upload",
18
+ props: {
19
+ modelValue: { type: Object, required: !0, default: () => ({ index: 0, fileId: "", fileName: "" }) },
20
+ showDelete: { type: Boolean, required: !1, default: !0 },
21
+ zoom: { type: Number, required: !1, default: 1 },
22
+ imgSize: { type: Object, required: !1, default: () => ({ width: 80, height: 80 }) },
23
+ limitImgSize: { type: Boolean, required: !1, default: !0 },
24
+ limitFileSize: { type: Boolean, required: !1, default: !0 },
25
+ fileSize: { type: Number, required: !1, default: 50 },
26
+ fileSizeUnit: { type: String, required: !1, default: "kb" },
27
+ fileType: { type: String, required: !1, default: "105" }
28
+ },
29
+ emits: ["update:modelValue", "change"],
30
+ setup(g, { expose: c, emit: I }) {
31
+ c();
32
+ const t = g, r = I, l = o(!1), z = (e) => {
33
+ if (!_(e.raw)) {
34
+ u.error("只能选择图片格式文件!");
35
+ return;
36
+ }
37
+ if (t.limitFileSize) {
38
+ let i = e.size;
39
+ if (t.fileSizeUnit.toLowerCase() == "kb" ? i = e.size / 1024 : i = e.size / 1024 / 1024, !(i < t.fileSize)) {
40
+ u.error(`图片大小不能超过 ${t.fileSize}${t.fileSizeUnit}!`);
41
+ return;
42
+ }
43
+ }
44
+ l.value = !0, b(t.fileType, e.raw).then((i) => {
45
+ const m = {
46
+ fileName: e.name,
47
+ fileId: i[0],
48
+ index: 0
49
+ };
50
+ r("update:modelValue", m), r("change", {
51
+ fileName: e.name,
52
+ fileId: i[0],
53
+ index: 0
54
+ }), l.value = !1;
55
+ }).catch((i) => {
56
+ u.error("update image error", i), l.value = !1;
57
+ });
58
+ }, S = () => {
59
+ r("update:modelValue", "");
60
+ }, n = o(""), s = o(!1), h = () => {
61
+ var e;
62
+ n.value = p((e = t.modelValue) == null ? void 0 : e.fileId, !0), s.value = !0;
63
+ };
64
+ v(() => {
65
+ var a;
66
+ const e = (a = E()) == null ? void 0 : a.appContext.app;
67
+ e && e.directive("loading", f);
68
+ });
69
+ const d = { props: t, emits: r, loading: l, handleUploadChange: z, handleFileRemove: S, dialogImageUrl: n, dialogVisible: s, handleFilePreview: h, get useImage() {
70
+ return p;
71
+ }, get ElUpload() {
72
+ return w;
73
+ }, get ElDialog() {
74
+ return U;
75
+ }, get ElIcon() {
76
+ return C;
77
+ }, get ElImage() {
78
+ return q;
79
+ }, get vLoading() {
80
+ return f;
81
+ }, get Delete() {
82
+ return V;
83
+ }, get Plus() {
84
+ return F;
85
+ }, get CircleCloseFilled() {
86
+ return x;
87
+ } };
88
+ return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
89
+ }
90
+ });
2
91
  export {
3
- f as default
92
+ Y as default
4
93
  };
@@ -1,7 +1,7 @@
1
1
  import { withInstall as a } from "../utils/install.js";
2
2
  import o from "./image-upload.vue.js";
3
- const e = a(o);
3
+ const m = a(o);
4
4
  export {
5
- e as YaheeImageUpload,
6
- e as default
5
+ m as YaheeImageUpload,
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { withInstall as t } from "../utils/install.js";
2
2
  import o from "./left-condition.vue.js";
3
- const e = t(o);
3
+ const n = t(o);
4
4
  export {
5
- e as YaheeLeftCondition,
6
- e as default
5
+ n as YaheeLeftCondition,
6
+ n as default
7
7
  };