xyvcard-goods 0.0.20 → 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 (40) hide show
  1. package/dist/ImageUpload-Dk6GY6PA.mjs +93 -0
  2. package/dist/{edit-Cj13W2TC.mjs → edit-Byv9oYAC.mjs} +1 -1
  3. package/dist/{edit-Bb2XgE0h.mjs → edit-Nuaz9WSB.mjs} +160 -244
  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-DOXK1EwK.mjs → goodsList-CZUqc4nm.mjs} +1 -1
  7. package/dist/goodsList-IWDAvKOx.mjs +4 -0
  8. package/dist/goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs +576 -0
  9. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs → goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs} +51 -50
  10. package/dist/{index-CGAoZY87.mjs → index-4i7TnWvV.mjs} +2 -3
  11. package/dist/index-BVGn6Q_T.mjs +53 -0
  12. package/dist/{index-DAJiqOCh.mjs → index-B_U2s9fI.mjs} +2 -2
  13. package/dist/{index-C3FT_Oe7.mjs → index-CQIttgns.mjs} +1 -1
  14. package/dist/{index-D3w33Nba.mjs → index-Dvaotk7B.mjs} +92 -68
  15. package/dist/{index-BmOxm1P2.mjs → index-_xxSoBUe.mjs} +1 -1
  16. package/dist/index.mjs +561 -538
  17. package/dist/{info-DImlMNq0.mjs → info-BH4MW3Sw.mjs} +2 -2
  18. package/dist/info-BQaaTFry.mjs +365 -0
  19. package/dist/sku-B-IzfYLq.mjs +52 -0
  20. package/dist/skuForm-AMIoZkH-.mjs +287 -0
  21. package/dist/{skuForm-Bt3arW0s.mjs → skuForm-CgjMd46J.mjs} +16 -16
  22. package/dist/{skuTable-Ahc3WlPp.mjs → skuTable-CyGQuTvR.mjs} +208 -255
  23. package/dist/skuTable-DDWSmvoz.mjs +592 -0
  24. package/dist/style.css +1 -1
  25. package/dts/api/dict.d.ts +3 -0
  26. package/dts/api/goods-sku/types.d.ts +2 -2
  27. package/dts/api/goods-spu/index.d.ts +1 -0
  28. package/dts/api/goods-spu/types.d.ts +18 -1
  29. package/dts/api/index.d.ts +2 -1
  30. package/dts/constant.d.ts +4 -0
  31. package/dts/lang/goods/zh-cn.d.ts +6 -1
  32. package/dts/router/index.d.ts +1 -0
  33. package/dts/views/goods/goods-combination/edit.vue.d.ts +2 -0
  34. package/dts/views/goods/goods-combination/goodsList.vue.d.ts +14 -0
  35. package/dts/views/goods/goods-combination/index.vue.d.ts +2 -0
  36. package/dts/views/goods/goods-combination/info.vue.d.ts +2 -0
  37. package/dts/views/goods/goods-combination/skuForm.vue.d.ts +20 -0
  38. package/dts/views/goods/goods-combination/skuTable.vue.d.ts +40 -0
  39. package/package.json +62 -61
  40. package/dist/edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs +0 -234
@@ -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-D2w1583D.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
  };