@cmstops/pro-compo 0.1.69 → 0.1.71
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/es/contentDetailList/component.js +66 -11
- package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/CustomItem.js +140 -0
- package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/index.js +60 -0
- package/es/selectThumb/component.js +66 -46
- package/es/utils/doc.d.ts +1 -0
- package/es/utils/doc.js +15 -1
- package/es/utils/typeMap.js +1 -1
- package/lib/contentDetailList/component.js +94 -39
- package/lib/contentDetailList/components/CustomWrp/CustomItem.js +141 -0
- package/lib/contentDetailList/components/CustomWrp/index.js +61 -0
- package/lib/selectThumb/component.js +66 -46
- package/lib/utils/doc.js +15 -0
- package/lib/utils/typeMap.js +1 -1
- package/package.json +1 -1
|
@@ -22,44 +22,45 @@ const _hoisted_5 = {
|
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "thumb-list-view"
|
|
24
24
|
};
|
|
25
|
-
const _hoisted_6 = {
|
|
26
|
-
const _hoisted_7 = {
|
|
25
|
+
const _hoisted_6 = { class: "thumb-list-view" };
|
|
26
|
+
const _hoisted_7 = { style: { "margin-top": "-10px" } };
|
|
27
|
+
const _hoisted_8 = {
|
|
27
28
|
key: 0,
|
|
28
29
|
class: "tip"
|
|
29
30
|
};
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
31
|
+
const _hoisted_9 = /* @__PURE__ */ vue.createElementVNode("span", { style: { "margin-right": "10px" } }, "\u72EC\u7ACB\u8F6E\u64AD\u56FE", -1);
|
|
32
|
+
const _hoisted_10 = { class: "thumbbox" };
|
|
33
|
+
const _hoisted_11 = {
|
|
33
34
|
key: 2,
|
|
34
35
|
class: "title"
|
|
35
36
|
};
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const _hoisted_12 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u72EC\u7ACB\u8F6E\u64AD\u56FE\u80CC\u666F\u989C\u8272", -1);
|
|
38
|
+
const _hoisted_13 = [
|
|
39
|
+
_hoisted_12
|
|
39
40
|
];
|
|
40
|
-
const
|
|
41
|
-
const
|
|
41
|
+
const _hoisted_14 = { key: 0 };
|
|
42
|
+
const _hoisted_15 = {
|
|
42
43
|
key: 0,
|
|
43
44
|
class: "star"
|
|
44
45
|
};
|
|
45
|
-
const
|
|
46
|
-
const
|
|
46
|
+
const _hoisted_16 = { key: 1 };
|
|
47
|
+
const _hoisted_17 = {
|
|
47
48
|
key: 2,
|
|
48
49
|
class: "tip",
|
|
49
50
|
style: { "margin-left": "10px" }
|
|
50
51
|
};
|
|
51
|
-
const
|
|
52
|
-
const
|
|
52
|
+
const _hoisted_18 = { class: "thumbbox" };
|
|
53
|
+
const _hoisted_19 = {
|
|
53
54
|
key: 0,
|
|
54
55
|
class: "tip"
|
|
55
56
|
};
|
|
56
|
-
const
|
|
57
|
+
const _hoisted_20 = {
|
|
57
58
|
key: 1,
|
|
58
59
|
class: "title"
|
|
59
60
|
};
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const _hoisted_21 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u56FE\u7247\u80CC\u666F\u989C\u8272", -1);
|
|
62
|
+
const _hoisted_22 = [
|
|
63
|
+
_hoisted_21
|
|
63
64
|
];
|
|
64
65
|
const _sfc_main = vue.defineComponent({
|
|
65
66
|
...{ name: "selectThumb" },
|
|
@@ -148,6 +149,14 @@ const _sfc_main = vue.defineComponent({
|
|
|
148
149
|
},
|
|
149
150
|
{ immediate: true }
|
|
150
151
|
);
|
|
152
|
+
const thumbsModeList = vue.computed({
|
|
153
|
+
get() {
|
|
154
|
+
return props.dataValue;
|
|
155
|
+
},
|
|
156
|
+
set(value) {
|
|
157
|
+
emit("update:dataValue", value);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
151
160
|
const callback = (value) => {
|
|
152
161
|
var _a;
|
|
153
162
|
const temp = JSON.parse(JSON.stringify(value));
|
|
@@ -162,18 +171,16 @@ const _sfc_main = vue.defineComponent({
|
|
|
162
171
|
if (!temp.data) {
|
|
163
172
|
temp.data = [];
|
|
164
173
|
}
|
|
165
|
-
if (props.mode === "
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
JSON.parse(JSON.stringify(temp.data.map((item) => item.url)))
|
|
169
|
-
);
|
|
174
|
+
if (props.mode === "thumbs") {
|
|
175
|
+
console.log(temp);
|
|
176
|
+
thumbsModeList.value[thumbOptionIndex.value] = temp.data[0].url;
|
|
170
177
|
} else {
|
|
171
178
|
emit("update:dataValue", JSON.stringify(temp));
|
|
172
179
|
}
|
|
173
180
|
}
|
|
174
181
|
};
|
|
175
182
|
const curtemplate = vue.computed(() => {
|
|
176
|
-
if (!["doc", "
|
|
183
|
+
if (!["doc", "thumbs"].includes(props.mode)) {
|
|
177
184
|
return doc.docThumbObjMap[3];
|
|
178
185
|
}
|
|
179
186
|
return doc.docThumbObjMap[parseInt(model.value, 10)];
|
|
@@ -237,7 +244,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
237
244
|
var _a;
|
|
238
245
|
const isPcBaner = props.mode === "doc" && thumbBannerModel.value === "pcBanner" && !docSeriesShowTopThemeColor.value;
|
|
239
246
|
const _useCropper = props.mode === "doc" ? true : useCropper.value;
|
|
240
|
-
if (["smiple", "
|
|
247
|
+
if (["smiple", "thumbs"].includes(props.mode)) {
|
|
241
248
|
dialogMediaSelectionShow.value = false;
|
|
242
249
|
const medias = data.map((media) => {
|
|
243
250
|
return { url: media.url, thumb: media.url };
|
|
@@ -367,7 +374,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
367
374
|
vue.createElementVNode("div", {
|
|
368
375
|
class: vue.normalizeClass(["banner-view", { flex: _ctx.flex }])
|
|
369
376
|
}, [
|
|
370
|
-
_ctx.mode !== "smiple" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
377
|
+
_ctx.mode !== "smiple" && _ctx.showTitle ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
371
378
|
key: 0,
|
|
372
379
|
class: "title",
|
|
373
380
|
style: vue.normalizeStyle({ width: _ctx.offset })
|
|
@@ -378,25 +385,38 @@ const _sfc_main = vue.defineComponent({
|
|
|
378
385
|
((_a = curtemplate.value) == null ? void 0 : _a.value) !== "4" && !_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, " (" + vue.toDisplayString((_b = curtemplate.value) == null ? void 0 : _b.alias) + "\u6BD4\u4F8B\uFF1A" + vue.toDisplayString((_c = curtemplate.value) == null ? void 0 : _c.ratioStr) + ") ", 1)) : vue.createCommentVNode("v-if", true)
|
|
379
386
|
], 4)) : vue.createCommentVNode("v-if", true),
|
|
380
387
|
vue.createElementVNode("div", _hoisted_4, [
|
|
381
|
-
vue.
|
|
382
|
-
|
|
383
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(currentModel.value.maxLength, (item, index) => {
|
|
388
|
+
["thumbs"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
389
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(thumbsModeList.value, (item, index) => {
|
|
384
390
|
return vue.openBlock(), vue.createBlock(card, {
|
|
385
391
|
key: index,
|
|
386
392
|
id: `thumb-card-${index}`,
|
|
387
|
-
data:
|
|
388
|
-
model: model.value,
|
|
393
|
+
data: { url: item },
|
|
389
394
|
"preview-list": previewList.value,
|
|
390
395
|
"thumb-model": "thumb",
|
|
391
396
|
onOpen: ($event) => openDialogMediaSelection($event, index)
|
|
392
|
-
}, null, 8, ["id", "data", "
|
|
397
|
+
}, null, 8, ["id", "data", "preview-list", "onOpen"]);
|
|
393
398
|
}), 128))
|
|
394
|
-
])) : vue.
|
|
399
|
+
])) : currentModel.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
400
|
+
vue.createCommentVNode(" \u5C01\u9762\u56FEcard "),
|
|
401
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
402
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(currentModel.value.maxLength, (item, index) => {
|
|
403
|
+
return vue.openBlock(), vue.createBlock(card, {
|
|
404
|
+
key: index,
|
|
405
|
+
id: `thumb-card-${index}`,
|
|
406
|
+
data: thumbList.value[index],
|
|
407
|
+
model: model.value,
|
|
408
|
+
"preview-list": previewList.value,
|
|
409
|
+
"thumb-model": "thumb",
|
|
410
|
+
onOpen: ($event) => openDialogMediaSelection($event, index)
|
|
411
|
+
}, null, 8, ["id", "data", "model", "preview-list", "onOpen"]);
|
|
412
|
+
}), 128))
|
|
413
|
+
])
|
|
414
|
+
], 2112)) : vue.createCommentVNode("v-if", true),
|
|
395
415
|
vue.createCommentVNode(" \u5DE6\u53F3\u5E03\u5C40\u663E\u793Atip "),
|
|
396
|
-
vue.createElementVNode("div",
|
|
397
|
-
((_d = curtemplate.value) == null ? void 0 : _d.value) !== "4" && _ctx.flex ? (vue.openBlock(), vue.createElementBlock("span",
|
|
416
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
417
|
+
((_d = curtemplate.value) == null ? void 0 : _d.value) !== "4" && _ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, " (" + vue.toDisplayString((_e = curtemplate.value) == null ? void 0 : _e.alias) + "\u6BD4\u4F8B\uFF1A" + vue.toDisplayString((_f = curtemplate.value) == null ? void 0 : _f.ratioStr) + ") ", 1)) : vue.createCommentVNode("v-if", true)
|
|
398
418
|
]),
|
|
399
|
-
["
|
|
419
|
+
["doc"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
400
420
|
vue.createCommentVNode(" \u9009\u62E9\u5927\u56FE\u3001\u4E09\u56FE\u3001\u5355\u56FE...\u7B49\u6A21\u5F0F "),
|
|
401
421
|
vue.createVNode(vue.unref(webVue.RadioGroup), {
|
|
402
422
|
modelValue: model.value,
|
|
@@ -433,7 +453,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
433
453
|
class: "title",
|
|
434
454
|
style: vue.normalizeStyle({ width: _ctx.offset })
|
|
435
455
|
}, [
|
|
436
|
-
|
|
456
|
+
_hoisted_9,
|
|
437
457
|
vue.createCommentVNode(" \u4E0A\u4E0B\u5E03\u5C40\u5F00\u5173\u5728\u6807\u9898\u540E "),
|
|
438
458
|
!_ctx.flex ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Switch), {
|
|
439
459
|
key: 0,
|
|
@@ -442,7 +462,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
442
462
|
size: "small"
|
|
443
463
|
}, null, 8, ["modelValue"])) : vue.createCommentVNode("v-if", true)
|
|
444
464
|
], 4),
|
|
445
|
-
vue.createElementVNode("div",
|
|
465
|
+
vue.createElementVNode("div", _hoisted_10, [
|
|
446
466
|
vue.createCommentVNode(" \u5DE6\u53F3\u5E03\u5C40\u5F00\u5173\u663E\u793A "),
|
|
447
467
|
_ctx.flex ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Switch), {
|
|
448
468
|
key: 0,
|
|
@@ -459,7 +479,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
459
479
|
"thumb-model": "banner",
|
|
460
480
|
onOpen: openDialogMediaSelection
|
|
461
481
|
}, null, 8, ["data", "preview-list"])) : vue.createCommentVNode("v-if", true),
|
|
462
|
-
hasBanner.value && styleData.value.banner_theme_color ? (vue.openBlock(), vue.createElementBlock("div",
|
|
482
|
+
hasBanner.value && styleData.value.banner_theme_color ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, _hoisted_13)) : vue.createCommentVNode("v-if", true),
|
|
463
483
|
vue.createCommentVNode(" banner\u8C03\u8272\u677F "),
|
|
464
484
|
hasBanner.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
|
|
465
485
|
key: 3,
|
|
@@ -477,13 +497,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
477
497
|
class: "title",
|
|
478
498
|
style: vue.normalizeStyle({ width: _ctx.offset })
|
|
479
499
|
}, [
|
|
480
|
-
docSeriesShowTopThemeColor.value ? (vue.openBlock(), vue.createElementBlock("span",
|
|
481
|
-
_ctx.topImageTitleValid ? (vue.openBlock(), vue.createElementBlock("span",
|
|
500
|
+
docSeriesShowTopThemeColor.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14, [
|
|
501
|
+
_ctx.topImageTitleValid ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_15, "*")) : vue.createCommentVNode("v-if", true),
|
|
482
502
|
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.topImageTitle || "\u5C01\u9762\u5934\u56FE"), 1)
|
|
483
|
-
])) : (vue.openBlock(), vue.createElementBlock("span",
|
|
484
|
-
!_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span",
|
|
503
|
+
])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_16, "PC\u5C01\u9762\u56FE")),
|
|
504
|
+
!_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_17, " (\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px) ")) : vue.createCommentVNode("v-if", true)
|
|
485
505
|
], 4),
|
|
486
|
-
vue.createElementVNode("div",
|
|
506
|
+
vue.createElementVNode("div", _hoisted_18, [
|
|
487
507
|
vue.createVNode(card, {
|
|
488
508
|
id: `pc-banner-card`,
|
|
489
509
|
data: pcBanner.value,
|
|
@@ -491,8 +511,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
491
511
|
thumbModel: "pcBanner",
|
|
492
512
|
onOpen: openDialogMediaSelection
|
|
493
513
|
}, null, 8, ["data", "previewList"]),
|
|
494
|
-
_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span",
|
|
495
|
-
docSeriesShowTopThemeColor.value && styleData.value.top_theme_color ? (vue.openBlock(), vue.createElementBlock("div",
|
|
514
|
+
_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_19, "(\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px)")) : vue.createCommentVNode("v-if", true),
|
|
515
|
+
docSeriesShowTopThemeColor.value && styleData.value.top_theme_color ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, _hoisted_22)) : vue.createCommentVNode("v-if", true),
|
|
496
516
|
docSeriesShowTopThemeColor.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
|
|
497
517
|
key: 2,
|
|
498
518
|
model: "top",
|
package/lib/utils/doc.js
CHANGED
|
@@ -103,6 +103,20 @@ const approvalItem = (item) => {
|
|
|
103
103
|
}
|
|
104
104
|
return item.approval_status;
|
|
105
105
|
};
|
|
106
|
+
function getDocThumb(item) {
|
|
107
|
+
if (item.preview_url) {
|
|
108
|
+
return item.preview_url;
|
|
109
|
+
}
|
|
110
|
+
if (item.style) {
|
|
111
|
+
let { style } = item;
|
|
112
|
+
if (typeof style === "string") {
|
|
113
|
+
style = JSON.parse(style);
|
|
114
|
+
return style.data && style.data[0] && style.data[0].thumb;
|
|
115
|
+
}
|
|
116
|
+
return style.data && style.data[0] && style.data[0].thumb;
|
|
117
|
+
}
|
|
118
|
+
return item.cover && item.cover.data && item.cover.data[0] && item.cover.data[0].thumb;
|
|
119
|
+
}
|
|
106
120
|
exports.approvalItem = approvalItem;
|
|
107
121
|
exports.docPubStateMap = docPubStateMap;
|
|
108
122
|
exports.docSeries = docSeries;
|
|
@@ -112,5 +126,6 @@ exports.docThumbMap = docThumbMap;
|
|
|
112
126
|
exports.docThumbObjMap = docThumbObjMap;
|
|
113
127
|
exports.docThumbRatioMap = docThumbRatioMap;
|
|
114
128
|
exports.docThumbTypeMap = docThumbTypeMap;
|
|
129
|
+
exports.getDocThumb = getDocThumb;
|
|
115
130
|
exports.stateOptions = stateOptions;
|
|
116
131
|
exports.typeOptions = typeOptions;
|
package/lib/utils/typeMap.js
CHANGED
|
@@ -136,7 +136,7 @@ const local_live_doc_type = {
|
|
|
136
136
|
const local_live_doc_status = [
|
|
137
137
|
{ value: 0, label: "\u672A\u5F00\u59CB", bgColor: "#FF8000" },
|
|
138
138
|
{ value: 1, label: "\u76F4\u64AD\u4E2D", bgColor: "#FF192D" },
|
|
139
|
-
{ value: 2, label: "\u5DF2\u7ED3\u675F", bgColor: "
|
|
139
|
+
{ value: 2, label: "\u5DF2\u7ED3\u675F", bgColor: "rgba(0, 0, 0, 0.6)" }
|
|
140
140
|
];
|
|
141
141
|
const matrixPublishStateMap = {
|
|
142
142
|
0: "\u5F85\u53D1\u5E03",
|