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.
- package/dist/ImageUpload-Dk6GY6PA.mjs +93 -0
- package/dist/{edit-Cj13W2TC.mjs → edit-Byv9oYAC.mjs} +1 -1
- package/dist/{edit-Bb2XgE0h.mjs → edit-Nuaz9WSB.mjs} +160 -244
- package/dist/edit-exVf8d8b.mjs +367 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs +24172 -0
- package/dist/{goodsList-DOXK1EwK.mjs → goodsList-CZUqc4nm.mjs} +1 -1
- package/dist/goodsList-IWDAvKOx.mjs +4 -0
- package/dist/goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs +576 -0
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs → goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs} +51 -50
- package/dist/{index-CGAoZY87.mjs → index-4i7TnWvV.mjs} +2 -3
- package/dist/index-BVGn6Q_T.mjs +53 -0
- package/dist/{index-DAJiqOCh.mjs → index-B_U2s9fI.mjs} +2 -2
- package/dist/{index-C3FT_Oe7.mjs → index-CQIttgns.mjs} +1 -1
- package/dist/{index-D3w33Nba.mjs → index-Dvaotk7B.mjs} +92 -68
- package/dist/{index-BmOxm1P2.mjs → index-_xxSoBUe.mjs} +1 -1
- package/dist/index.mjs +561 -538
- package/dist/{info-DImlMNq0.mjs → info-BH4MW3Sw.mjs} +2 -2
- package/dist/info-BQaaTFry.mjs +365 -0
- package/dist/sku-B-IzfYLq.mjs +52 -0
- package/dist/skuForm-AMIoZkH-.mjs +287 -0
- package/dist/{skuForm-Bt3arW0s.mjs → skuForm-CgjMd46J.mjs} +16 -16
- package/dist/{skuTable-Ahc3WlPp.mjs → skuTable-CyGQuTvR.mjs} +208 -255
- package/dist/skuTable-DDWSmvoz.mjs +592 -0
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +3 -0
- package/dts/api/goods-sku/types.d.ts +2 -2
- package/dts/api/goods-spu/index.d.ts +1 -0
- package/dts/api/goods-spu/types.d.ts +18 -1
- package/dts/api/index.d.ts +2 -1
- package/dts/constant.d.ts +4 -0
- package/dts/lang/goods/zh-cn.d.ts +6 -1
- package/dts/router/index.d.ts +1 -0
- package/dts/views/goods/goods-combination/edit.vue.d.ts +2 -0
- package/dts/views/goods/goods-combination/goodsList.vue.d.ts +14 -0
- package/dts/views/goods/goods-combination/index.vue.d.ts +2 -0
- package/dts/views/goods/goods-combination/info.vue.d.ts +2 -0
- package/dts/views/goods/goods-combination/skuForm.vue.d.ts +20 -0
- package/dts/views/goods/goods-combination/skuTable.vue.d.ts +40 -0
- package/package.json +62 -61
- package/dist/edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs +0 -234
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b, openBlock as r, createElementBlock as k, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as s, createElementVNode as a, Fragment as L, renderList as I, createBlock as S, unref as _, createCommentVNode as B } from "vue";
|
|
2
2
|
import { fileApi as w, routerUtil as F } from "jmash-core";
|
|
3
3
|
import { useRouter as H, useRoute as O } from "vue-router";
|
|
4
|
-
import { D as d, C as N, S as R } from "./index-
|
|
5
|
-
import Y from "./skuTable-
|
|
4
|
+
import { D as d, C as N, S as R } from "./index-Dvaotk7B.mjs";
|
|
5
|
+
import Y from "./skuTable-CyGQuTvR.mjs";
|
|
6
6
|
import { goodsSpuApi as G } from "./index.mjs";
|
|
7
7
|
import { g as J } from "./index-BHmGYIuc.mjs";
|
|
8
8
|
const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "cell-item" }, ie = { class: "title-content" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = { class: "cell-item" }, _e = { class: "cell-item" }, fe = { class: "cell-item" }, ge = ["innerHTML"], Ie = /* @__PURE__ */ M({
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b, openBlock as r, createElementBlock as k, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as s, createElementVNode as a, Fragment as L, renderList as I, createBlock as S, unref as _, createCommentVNode as B } from "vue";
|
|
2
|
+
import { fileApi as w, routerUtil as F } from "jmash-core";
|
|
3
|
+
import { useRouter as H, useRoute as O } from "vue-router";
|
|
4
|
+
import { D as d, C as N, S as R } from "./index-Dvaotk7B.mjs";
|
|
5
|
+
import Y from "./skuTable-DDWSmvoz.mjs";
|
|
6
|
+
import { goodsSpuApi as G } from "./index.mjs";
|
|
7
|
+
import { g as J } from "./index-BHmGYIuc.mjs";
|
|
8
|
+
const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "cell-item" }, ie = { class: "title-content" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = { class: "cell-item" }, _e = { class: "cell-item" }, fe = { class: "cell-item" }, ge = ["innerHTML"], Ie = /* @__PURE__ */ M({
|
|
9
|
+
__name: "info",
|
|
10
|
+
setup(ve) {
|
|
11
|
+
d.brandListBizDict.useValues(), d.labelListBizDict.useValues();
|
|
12
|
+
const U = H(), V = O(), u = y({}), $ = y([]), g = y([]), P = y([]), E = y([]), T = q(() => g.value.filter(
|
|
13
|
+
(t) => t.name && t.specValueList != null && t.specValueList.length
|
|
14
|
+
));
|
|
15
|
+
j(
|
|
16
|
+
T,
|
|
17
|
+
(t) => t,
|
|
18
|
+
{
|
|
19
|
+
deep: !0,
|
|
20
|
+
immediate: !0
|
|
21
|
+
}
|
|
22
|
+
), d.shopInfoBizDict.useValues(), d.goodsCategoryListBizLayDict.useValues(), V.query.spuId && G.findById({ spuId: V.query.spuId }).then(({ data: t }) => {
|
|
23
|
+
var c, v, o;
|
|
24
|
+
u.value = Object.assign(u, t), $.value = (c = t.picUrls) == null ? void 0 : c.split(","), J.findById({ spuId: V.query.spuId }).then(({ data: p }) => {
|
|
25
|
+
u.value.ensureIds = p.ensures;
|
|
26
|
+
}), t.specType === N.SPEC_TYPE.MULTI_SPEC && (P.value = (v = t.skuList) == null ? void 0 : v.results, (o = t.skuList) == null || o.results.forEach((p) => {
|
|
27
|
+
var m;
|
|
28
|
+
(m = p.specValues) == null || m.map((h) => {
|
|
29
|
+
d.specInfoDict.useValues().then((D) => {
|
|
30
|
+
const l = D.find((f) => h.specId === f.key);
|
|
31
|
+
if (l) {
|
|
32
|
+
let f = {
|
|
33
|
+
id: h.specId,
|
|
34
|
+
name: l.value,
|
|
35
|
+
specValueList: []
|
|
36
|
+
};
|
|
37
|
+
g.value.push(f);
|
|
38
|
+
}
|
|
39
|
+
const C = /* @__PURE__ */ new Map();
|
|
40
|
+
g.value = g.value.filter(
|
|
41
|
+
(f) => !C.has(f.id) && C.set(f.id, f)
|
|
42
|
+
), z(h.specValueId);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
function z(t) {
|
|
48
|
+
g.value.forEach((c) => {
|
|
49
|
+
E.value = new R({ specId: c.id }), E.value.useValues().then((v) => {
|
|
50
|
+
v.forEach((o) => {
|
|
51
|
+
if (o.key === t) {
|
|
52
|
+
let m = {
|
|
53
|
+
id: t,
|
|
54
|
+
name: o.value
|
|
55
|
+
};
|
|
56
|
+
c.specValueList.push(m);
|
|
57
|
+
}
|
|
58
|
+
const p = /* @__PURE__ */ new Map();
|
|
59
|
+
c.specValueList = c.specValueList.filter(
|
|
60
|
+
(m) => !p.has(m.id) && p.set(m.id, m)
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function A() {
|
|
67
|
+
F.closeTagView(V.fullPath, U, !1);
|
|
68
|
+
}
|
|
69
|
+
return (t, c) => {
|
|
70
|
+
const v = b("el-button"), o = b("el-descriptions-item"), p = b("el-tag"), m = b("el-image"), h = b("el-descriptions"), D = b("el-card");
|
|
71
|
+
return r(), k("div", K, [
|
|
72
|
+
i(D, { shadow: "never" }, {
|
|
73
|
+
header: e(() => [
|
|
74
|
+
i(v, {
|
|
75
|
+
type: "primary",
|
|
76
|
+
onClick: A
|
|
77
|
+
}, {
|
|
78
|
+
default: e(() => [
|
|
79
|
+
n(s(t.$t("common.back")), 1)
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
})
|
|
83
|
+
]),
|
|
84
|
+
default: e(() => [
|
|
85
|
+
c[0] || (c[0] = a("div", { class: "title-content" }, "基本信息", -1)),
|
|
86
|
+
i(h, {
|
|
87
|
+
class: "margin-top",
|
|
88
|
+
column: 2,
|
|
89
|
+
border: ""
|
|
90
|
+
}, {
|
|
91
|
+
default: e(() => [
|
|
92
|
+
i(o, null, {
|
|
93
|
+
label: e(() => [
|
|
94
|
+
a("div", Q, s(t.$t("goodsSpu.spuName")), 1)
|
|
95
|
+
]),
|
|
96
|
+
default: e(() => [
|
|
97
|
+
n(" " + s(u.value.spuName), 1)
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
}),
|
|
101
|
+
i(o, null, {
|
|
102
|
+
label: e(() => [
|
|
103
|
+
a("div", W, s(t.$t("goodsSpu.spuCode")), 1)
|
|
104
|
+
]),
|
|
105
|
+
default: e(() => [
|
|
106
|
+
n(" " + s(u.value.spuCode), 1)
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}),
|
|
110
|
+
i(o, null, {
|
|
111
|
+
label: e(() => [
|
|
112
|
+
a("div", X, s(t.$t("goodsSpu.categoryId")), 1)
|
|
113
|
+
]),
|
|
114
|
+
default: e(() => [
|
|
115
|
+
(r(!0), k(L, null, I(u.value.categoryIds, (l) => (r(), S(p, {
|
|
116
|
+
type: "info",
|
|
117
|
+
key: l,
|
|
118
|
+
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
119
|
+
}, {
|
|
120
|
+
default: e(() => [
|
|
121
|
+
n(s(_(d).goodsCategoryListBizLayDict.getValue(l) || l), 1)
|
|
122
|
+
]),
|
|
123
|
+
_: 2
|
|
124
|
+
}, 1024))), 128))
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}),
|
|
128
|
+
i(o, null, {
|
|
129
|
+
label: e(() => [
|
|
130
|
+
a("div", Z, s(t.$t("goodsSpu.brandId")), 1)
|
|
131
|
+
]),
|
|
132
|
+
default: e(() => [
|
|
133
|
+
n(" " + s(_(d).brandListBizDict.getValue(u.value.brandId)), 1)
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
}),
|
|
137
|
+
i(o, null, {
|
|
138
|
+
label: e(() => [
|
|
139
|
+
a("div", x, s(t.$t("goodsSpu.labelIds")), 1)
|
|
140
|
+
]),
|
|
141
|
+
default: e(() => [
|
|
142
|
+
(r(!0), k(L, null, I(u.value.labelIds, (l) => (r(), S(p, {
|
|
143
|
+
type: "info",
|
|
144
|
+
key: l,
|
|
145
|
+
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
146
|
+
}, {
|
|
147
|
+
default: e(() => [
|
|
148
|
+
n(s(_(d).labelListBizDict.getValue(l) || l), 1)
|
|
149
|
+
]),
|
|
150
|
+
_: 2
|
|
151
|
+
}, 1024))), 128))
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}),
|
|
155
|
+
i(o, null, {
|
|
156
|
+
label: e(() => [
|
|
157
|
+
a("div", ee, s(t.$t("goodsSpu.picUrls")), 1)
|
|
158
|
+
]),
|
|
159
|
+
default: e(() => [
|
|
160
|
+
(r(!0), k(L, null, I($.value, (l) => (r(), S(m, {
|
|
161
|
+
key: l,
|
|
162
|
+
src: _(w).imageUrl(l, 80, 80),
|
|
163
|
+
"preview-src-list": [_(w).imageUrl(l)],
|
|
164
|
+
"preview-teleported": "",
|
|
165
|
+
"hide-on-click-modal": "",
|
|
166
|
+
fit: "contain"
|
|
167
|
+
}, null, 8, ["src", "preview-src-list"]))), 128))
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}),
|
|
171
|
+
i(o, null, {
|
|
172
|
+
label: e(() => [
|
|
173
|
+
a("div", le, s(t.$t("goodsSpu.freightType")), 1)
|
|
174
|
+
]),
|
|
175
|
+
default: e(() => [
|
|
176
|
+
n(" " + s(_(d).freightTypeEnum.getEnumValue(
|
|
177
|
+
u.value.freightType
|
|
178
|
+
)), 1)
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
}),
|
|
182
|
+
i(o, null, {
|
|
183
|
+
label: e(() => [
|
|
184
|
+
a("div", se, s(t.$t("goodsSpu.freightAmount")), 1)
|
|
185
|
+
]),
|
|
186
|
+
default: e(() => [
|
|
187
|
+
n(" " + s(u.value.freightAmount), 1)
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
}),
|
|
191
|
+
i(o, null, {
|
|
192
|
+
label: e(() => [
|
|
193
|
+
a("div", te, s(t.$t("goodsSpu.shelf")), 1)
|
|
194
|
+
]),
|
|
195
|
+
default: e(() => [
|
|
196
|
+
n(" " + s(_(d).shelfDict.getValue(u.value.shelf)), 1)
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
}),
|
|
200
|
+
i(o, null, {
|
|
201
|
+
label: e(() => [
|
|
202
|
+
a("div", oe, s(t.$t("goodsSpu.saleNum")), 1)
|
|
203
|
+
]),
|
|
204
|
+
default: e(() => [
|
|
205
|
+
n(" " + s(u.value.saleNum), 1)
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
}),
|
|
209
|
+
i(o, null, {
|
|
210
|
+
label: e(() => [
|
|
211
|
+
a("div", ue, s(t.$t("goodsSpu.sellPoint")), 1)
|
|
212
|
+
]),
|
|
213
|
+
default: e(() => [
|
|
214
|
+
n(" " + s(u.value.sellPoint), 1)
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}),
|
|
218
|
+
i(o, null, {
|
|
219
|
+
label: e(() => [
|
|
220
|
+
a("div", ae, s(t.$t("goodsSpu.ensureIds")), 1)
|
|
221
|
+
]),
|
|
222
|
+
default: e(() => [
|
|
223
|
+
(r(!0), k(L, null, I(u.value.ensureIds, (l) => (r(), S(p, {
|
|
224
|
+
type: "info",
|
|
225
|
+
key: l
|
|
226
|
+
}, {
|
|
227
|
+
default: e(() => [
|
|
228
|
+
n(s(_(d).goodsEnsureDict.getDictValue(l)), 1)
|
|
229
|
+
]),
|
|
230
|
+
_: 2
|
|
231
|
+
}, 1024))), 128))
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
})
|
|
235
|
+
]),
|
|
236
|
+
_: 1
|
|
237
|
+
}),
|
|
238
|
+
a("div", ie, " 商品规格(" + s(_(d).specTypeEnum.getEnumValue(u.value.specType)) + ") ", 1),
|
|
239
|
+
u.value.specType == _(N).SPEC_TYPE.UNIFIED_SPEC ? (r(), S(h, {
|
|
240
|
+
key: 0,
|
|
241
|
+
class: "margin-top",
|
|
242
|
+
column: 2,
|
|
243
|
+
border: ""
|
|
244
|
+
}, {
|
|
245
|
+
default: e(() => [
|
|
246
|
+
i(o, null, {
|
|
247
|
+
label: e(() => [
|
|
248
|
+
a("div", ne, s(t.$t("goodsSpu.salePrice")), 1)
|
|
249
|
+
]),
|
|
250
|
+
default: e(() => {
|
|
251
|
+
var l;
|
|
252
|
+
return [
|
|
253
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].salePrice) + "元 ", 1)
|
|
254
|
+
];
|
|
255
|
+
}),
|
|
256
|
+
_: 1
|
|
257
|
+
}),
|
|
258
|
+
i(o, null, {
|
|
259
|
+
label: e(() => [
|
|
260
|
+
a("div", ce, s(t.$t("goodsSpu.salePriceV2")), 1)
|
|
261
|
+
]),
|
|
262
|
+
default: e(() => {
|
|
263
|
+
var l;
|
|
264
|
+
return [
|
|
265
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].salePriceV2) + "元 ", 1)
|
|
266
|
+
];
|
|
267
|
+
}),
|
|
268
|
+
_: 1
|
|
269
|
+
}),
|
|
270
|
+
i(o, null, {
|
|
271
|
+
label: e(() => [
|
|
272
|
+
a("div", de, s(t.$t("goodsSpu.salePriceV3")), 1)
|
|
273
|
+
]),
|
|
274
|
+
default: e(() => {
|
|
275
|
+
var l;
|
|
276
|
+
return [
|
|
277
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].salePriceV3) + "元 ", 1)
|
|
278
|
+
];
|
|
279
|
+
}),
|
|
280
|
+
_: 1
|
|
281
|
+
}),
|
|
282
|
+
i(o, null, {
|
|
283
|
+
label: e(() => [
|
|
284
|
+
a("div", re, s(t.$t("goodsSpu.marketPrice")), 1)
|
|
285
|
+
]),
|
|
286
|
+
default: e(() => {
|
|
287
|
+
var l;
|
|
288
|
+
return [
|
|
289
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].marketPrice) + "元 ", 1)
|
|
290
|
+
];
|
|
291
|
+
}),
|
|
292
|
+
_: 1
|
|
293
|
+
}),
|
|
294
|
+
i(o, null, {
|
|
295
|
+
label: e(() => [
|
|
296
|
+
a("div", pe, s(t.$t("goodsSpu.costPrice")), 1)
|
|
297
|
+
]),
|
|
298
|
+
default: e(() => {
|
|
299
|
+
var l;
|
|
300
|
+
return [
|
|
301
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].costPrice) + "元 ", 1)
|
|
302
|
+
];
|
|
303
|
+
}),
|
|
304
|
+
_: 1
|
|
305
|
+
}),
|
|
306
|
+
i(o, null, {
|
|
307
|
+
label: e(() => [
|
|
308
|
+
a("div", me, s(t.$t("goodsSpu.stock")), 1)
|
|
309
|
+
]),
|
|
310
|
+
default: e(() => {
|
|
311
|
+
var l;
|
|
312
|
+
return [
|
|
313
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].stock), 1)
|
|
314
|
+
];
|
|
315
|
+
}),
|
|
316
|
+
_: 1
|
|
317
|
+
}),
|
|
318
|
+
i(o, null, {
|
|
319
|
+
label: e(() => [
|
|
320
|
+
a("div", _e, s(t.$t("goodsSpu.weight")), 1)
|
|
321
|
+
]),
|
|
322
|
+
default: e(() => {
|
|
323
|
+
var l;
|
|
324
|
+
return [
|
|
325
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].weight), 1)
|
|
326
|
+
];
|
|
327
|
+
}),
|
|
328
|
+
_: 1
|
|
329
|
+
}),
|
|
330
|
+
i(o, null, {
|
|
331
|
+
label: e(() => [
|
|
332
|
+
a("div", fe, s(t.$t("goodsSpu.volume")), 1)
|
|
333
|
+
]),
|
|
334
|
+
default: e(() => {
|
|
335
|
+
var l;
|
|
336
|
+
return [
|
|
337
|
+
n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].volume), 1)
|
|
338
|
+
];
|
|
339
|
+
}),
|
|
340
|
+
_: 1
|
|
341
|
+
})
|
|
342
|
+
]),
|
|
343
|
+
_: 1
|
|
344
|
+
})) : B("", !0),
|
|
345
|
+
g.value.length > 0 ? (r(), S(Y, {
|
|
346
|
+
key: 1,
|
|
347
|
+
specData: T.value,
|
|
348
|
+
goodsSku: P.value,
|
|
349
|
+
isSettingShow: !1
|
|
350
|
+
}, null, 8, ["specData", "goodsSku"])) : B("", !0),
|
|
351
|
+
c[1] || (c[1] = a("div", { class: "title-content" }, "商品描述", -1)),
|
|
352
|
+
a("div", {
|
|
353
|
+
innerHTML: u.value.description
|
|
354
|
+
}, null, 8, ge)
|
|
355
|
+
]),
|
|
356
|
+
_: 1,
|
|
357
|
+
__: [0, 1]
|
|
358
|
+
})
|
|
359
|
+
]);
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
export {
|
|
364
|
+
Ie as default
|
|
365
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
function $(e, n = [], t) {
|
|
2
|
+
const { optionValue: l = "id", optionText: d = "name" } = t || {}, f = [];
|
|
3
|
+
let h = 0;
|
|
4
|
+
const V = {}, L = I(e);
|
|
5
|
+
if (e.length === 0) return f;
|
|
6
|
+
e.forEach((c) => {
|
|
7
|
+
const { specValueList: s } = c;
|
|
8
|
+
if (!s || s.length === 0) return !0;
|
|
9
|
+
h = (h || 1) * s.length;
|
|
10
|
+
}), n.forEach((c) => {
|
|
11
|
+
const { specs: s, ...u } = c;
|
|
12
|
+
V[s.map((p) => `${p.specId}_${p.specValueId}`).join("|")] = u;
|
|
13
|
+
});
|
|
14
|
+
for (let c = 0; c < h; c++) {
|
|
15
|
+
const s = [], u = [];
|
|
16
|
+
e.forEach((i, r) => {
|
|
17
|
+
const { specValueList: a } = i;
|
|
18
|
+
let o = {};
|
|
19
|
+
if (!a || a.length === 0) return !0;
|
|
20
|
+
if (a.length > 1) {
|
|
21
|
+
const m = Math.floor(c / L[r]) % a.length;
|
|
22
|
+
o = e[r].specValueList[m];
|
|
23
|
+
} else
|
|
24
|
+
o = e[r].specValueList[0];
|
|
25
|
+
!i[l] || !o[l] || (u.push(`${i[l]}_${o[l]}`), s.push({
|
|
26
|
+
specId: i[l],
|
|
27
|
+
specName: i[d],
|
|
28
|
+
specValueId: o[l],
|
|
29
|
+
specValueName: o[d]
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
const { ...p } = V[u.join("|")] || {};
|
|
33
|
+
f.push({ ...p, specs: s });
|
|
34
|
+
}
|
|
35
|
+
return f;
|
|
36
|
+
}
|
|
37
|
+
function I(e) {
|
|
38
|
+
const n = [];
|
|
39
|
+
for (let t = e.length - 1; t >= 0; t--)
|
|
40
|
+
e[t + 1] && e[t + 1].specValueList ? n[t] = e[t + 1].specValueList.length * n[t + 1] || 1 : n[t] = 1;
|
|
41
|
+
return n;
|
|
42
|
+
}
|
|
43
|
+
function g(e) {
|
|
44
|
+
return Array.from(new Set(e));
|
|
45
|
+
}
|
|
46
|
+
function v(e, n) {
|
|
47
|
+
return e = g(e), n = g(n), e.concat(n).filter((t) => !(e.includes(t) && n.includes(t)));
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
v as d,
|
|
51
|
+
$ as f
|
|
52
|
+
};
|