xyvcard-goods 0.0.21 → 0.0.22

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 (33) hide show
  1. package/dist/ImageUpload-Dk6GY6PA.mjs +93 -0
  2. package/dist/{edit-CkR-I5aJ.mjs → edit-Byv9oYAC.mjs} +1 -1
  3. package/dist/{edit-tCGa_9Kt.mjs → edit-Nuaz9WSB.mjs} +170 -171
  4. package/dist/edit-exVf8d8b.mjs +367 -0
  5. package/dist/edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs +24172 -0
  6. package/dist/{goodsList-HmPAwD_C.mjs → goodsList-CZUqc4nm.mjs} +1 -1
  7. package/dist/{goodsList-TX2ZnRR9.mjs → goodsList-IWDAvKOx.mjs} +1 -1
  8. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-f1Fc6pbd.mjs → goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs} +1 -1
  9. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CGV1dm3W.mjs → goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs} +1 -1
  10. package/dist/{index-B0SXNsHW.mjs → index-4i7TnWvV.mjs} +2 -3
  11. package/dist/{index-Dt3PP8dN.mjs → index-BVGn6Q_T.mjs} +2 -2
  12. package/dist/{index-BZw9XfQo.mjs → index-B_U2s9fI.mjs} +2 -2
  13. package/dist/{index-Ctva-XF0.mjs → index-CQIttgns.mjs} +1 -1
  14. package/dist/{index-CqOoZ5xQ.mjs → index-Dvaotk7B.mjs} +88 -68
  15. package/dist/{index-VFsDup14.mjs → index-_xxSoBUe.mjs} +1 -1
  16. package/dist/index.mjs +192 -181
  17. package/dist/{info-CrghLmS4.mjs → info-BH4MW3Sw.mjs} +2 -2
  18. package/dist/{info-BTKv0IRt.mjs → info-BQaaTFry.mjs} +2 -2
  19. package/dist/skuForm-AMIoZkH-.mjs +287 -0
  20. package/dist/{skuForm-D2n8sQJo.mjs → skuForm-CgjMd46J.mjs} +5 -5
  21. package/dist/{skuTable-CEwT-I1Q.mjs → skuTable-CyGQuTvR.mjs} +1 -1
  22. package/dist/{skuTable-D-awlXgj.mjs → skuTable-DDWSmvoz.mjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dts/api/dict.d.ts +3 -0
  25. package/dts/api/goods-spu/index.d.ts +1 -0
  26. package/dts/api/goods-spu/types.d.ts +17 -0
  27. package/dts/api/index.d.ts +2 -1
  28. package/dts/lang/goods/zh-cn.d.ts +5 -1
  29. package/dts/views/goods/goods-combination/skuForm.vue.d.ts +0 -9
  30. package/package.json +3 -2
  31. package/dist/edit-DFc_TNP3.mjs +0 -590
  32. package/dist/edit.vue_vue_type_script_setup_true_lang-BlNwikUO.mjs +0 -234
  33. package/dist/skuForm-C7rF2noo.mjs +0 -475
@@ -0,0 +1,93 @@
1
+ import { defineComponent as b, ref as o, watchEffect as E, computed as P, resolveComponent as n, openBlock as R, createElementBlock as S, Fragment as j, createVNode as i, withCtx as p, createElementVNode as k } from "vue";
2
+ import { ElMessageBox as N } from "element-plus";
3
+ import { fileApi as s } from "jmash-core";
4
+ import { useI18n as M } from "vue-i18n";
5
+ import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
+ const z = ["src"], A = /* @__PURE__ */ b({
7
+ __name: "ImageUpload",
8
+ props: {
9
+ modelValue: {
10
+ type: String,
11
+ default: () => ""
12
+ },
13
+ listType: {
14
+ type: String,
15
+ default: "picture"
16
+ },
17
+ limit: {
18
+ type: Number,
19
+ default: 1e3
20
+ }
21
+ },
22
+ emits: ["update:modelValue"],
23
+ setup(u, { emit: v }) {
24
+ const { t: a } = M(), y = o(s.uploadUrl()), h = o(s.authHeader()), V = o(), c = o(!1), d = o(""), I = u, l = o([]);
25
+ E(() => {
26
+ l.value = I.modelValue.split(",").filter(Boolean);
27
+ });
28
+ const f = P(
29
+ () => l.value.map((e) => ({ url: s.imageUrl(e), status: "success", uid: e }))
30
+ ), T = (e) => {
31
+ d.value = e.url, c.value = !0;
32
+ }, U = (e) => {
33
+ const t = e.size / 1024 / 1024 < 2;
34
+ ["image/jpeg", "image/png", "image/gif", "image/jpg"].includes(e.type) && !t && N.confirm(a("file.imageLtRequired"), a("file.warning"), {
35
+ confirmButtonText: a("common.confirm"),
36
+ cancelButtonText: a("common.cancel"),
37
+ type: "warning"
38
+ }).then(async () => {
39
+ }).catch(() => (l.value.splice(-1, 1), r(), !1));
40
+ }, x = (e) => {
41
+ l.value = l.value.filter((t) => s.imageUrl(t) !== e.url), r();
42
+ }, w = (e) => {
43
+ l.value.push(e.fileSrc), r();
44
+ }, B = v, r = () => {
45
+ B("update:modelValue", l.value.join(","));
46
+ };
47
+ return (e, t) => {
48
+ const g = n("Plus"), _ = n("el-icon"), C = n("el-upload"), L = n("el-dialog");
49
+ return R(), S(j, null, [
50
+ i(C, {
51
+ ref_key: "uploadImageRef",
52
+ ref: V,
53
+ "file-list": f.value,
54
+ "onUpdate:fileList": t[0] || (t[0] = (m) => f.value = m),
55
+ action: y.value,
56
+ headers: h.value,
57
+ limit: u.limit,
58
+ "list-type": u.listType,
59
+ "on-preview": T,
60
+ "before-upload": U,
61
+ "on-success": w,
62
+ "on-remove": x
63
+ }, {
64
+ default: p(() => [
65
+ i(_, null, {
66
+ default: p(() => [
67
+ i(g)
68
+ ]),
69
+ _: 1
70
+ })
71
+ ]),
72
+ _: 1
73
+ }, 8, ["file-list", "action", "headers", "limit", "list-type"]),
74
+ i(L, {
75
+ modelValue: c.value,
76
+ "onUpdate:modelValue": t[1] || (t[1] = (m) => c.value = m),
77
+ fullscreen: !0
78
+ }, {
79
+ default: p(() => [
80
+ k("img", {
81
+ src: d.value,
82
+ alt: ""
83
+ }, null, 8, z)
84
+ ]),
85
+ _: 1
86
+ }, 8, ["modelValue"])
87
+ ], 64);
88
+ };
89
+ }
90
+ }), J = /* @__PURE__ */ q(A, [["__scopeId", "data-v-f10f6f7e"]]);
91
+ export {
92
+ J as _
93
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-BlNwikUO.mjs";
1
+ import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs";
2
2
  export {
3
3
  f as default
4
4
  };