xyvcard-goods 0.0.21 → 0.0.23

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 (44) hide show
  1. package/dist/ImageUpload-Dk6GY6PA.mjs +93 -0
  2. package/dist/{edit-DFc_TNP3.mjs → edit-9jPSycsG.mjs} +148 -212
  3. package/dist/edit-CJpoa4Ck.mjs +368 -0
  4. package/dist/{edit-DxnsmaXV.mjs → edit-CWQMgvVP.mjs} +38 -38
  5. package/dist/{edit-CkR-I5aJ.mjs → edit-DU-BEAcq.mjs} +1 -1
  6. package/dist/{edit-BcokSKfN.mjs → edit-Ziwv43v0.mjs} +27 -27
  7. package/dist/edit.vue_vue_type_script_setup_true_lang-BP0C4d2-.mjs +24173 -0
  8. package/dist/{goodsList-HmPAwD_C.mjs → goodsList-2AwsJVoO.mjs} +1 -1
  9. package/dist/{goodsList-TX2ZnRR9.mjs → goodsList-CyWliLjg.mjs} +1 -1
  10. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CGV1dm3W.mjs → goodsList.vue_vue_type_script_setup_true_lang-Bq06GIMe.mjs} +2 -2
  11. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-f1Fc6pbd.mjs → goodsList.vue_vue_type_script_setup_true_lang-DjKzEAB7.mjs} +136 -147
  12. package/dist/{index-B0SXNsHW.mjs → index-8E7BciYp.mjs} +7 -7
  13. package/dist/{index-Dt3PP8dN.mjs → index-B1H5hqEi.mjs} +2 -2
  14. package/dist/{index-BZw9XfQo.mjs → index-B88acg0Q.mjs} +2 -2
  15. package/dist/{index-VFsDup14.mjs → index-BdP_dXBK.mjs} +3 -3
  16. package/dist/index-C7oatDPl.mjs +4432 -0
  17. package/dist/{index-Ctva-XF0.mjs → index-DPjR32Kv.mjs} +3 -3
  18. package/dist/{index-r0u-27m7.mjs → index-DR3Gk44r.mjs} +1 -1
  19. package/dist/index-jCpYt-EU.mjs +221 -0
  20. package/dist/index.mjs +6 -2864
  21. package/dist/info-BEMxnD6-.mjs +325 -0
  22. package/dist/{info-BTKv0IRt.mjs → info-DFIeVs66.mjs} +3 -3
  23. package/dist/{skuForm-C7rF2noo.mjs → skuForm-BhAbf2AG.mjs} +2 -2
  24. package/dist/skuForm-C2aQcL90.mjs +314 -0
  25. package/dist/{skuTable-CEwT-I1Q.mjs → skuTable-9JJqGeRx.mjs} +255 -208
  26. package/dist/style.css +1 -1
  27. package/dts/api/dict.d.ts +3 -0
  28. package/dts/api/goods-spu/index.d.ts +4 -1
  29. package/dts/api/goods-spu/types.d.ts +28 -0
  30. package/dts/api/index.d.ts +2 -1
  31. package/dts/index.d.ts +4 -0
  32. package/dts/lang/goods/zh-cn.d.ts +5 -1
  33. package/dts/router/index.d.ts +1 -0
  34. package/dts/views/goods/goods-combination/skuForm.vue.d.ts +0 -9
  35. package/package.json +3 -2
  36. package/dist/edit-tCGa_9Kt.mjs +0 -507
  37. package/dist/edit.vue_vue_type_script_setup_true_lang-BlNwikUO.mjs +0 -234
  38. package/dist/index-CqOoZ5xQ.mjs +0 -305
  39. package/dist/index-DR7GlHNd.mjs +0 -1288
  40. package/dist/index-jTDhsbYM.mjs +0 -141
  41. package/dist/info-CrghLmS4.mjs +0 -365
  42. package/dist/sku-B-IzfYLq.mjs +0 -52
  43. package/dist/skuForm-D2n8sQJo.mjs +0 -475
  44. package/dist/skuTable-D-awlXgj.mjs +0 -592
@@ -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
+ };