@cmstops/pro-compo 0.1.90 → 0.1.92
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/components/Records/MatrixItem/index.js +9 -4
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -4
- package/es/selectThumb/component.js +10 -6
- package/lib/contentDetailList/components/Records/MatrixItem/index.js +9 -4
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -4
- package/lib/selectThumb/component.js +10 -6
- package/package.json +1 -1
|
@@ -40,15 +40,20 @@ const _sfc_main = defineComponent({
|
|
|
40
40
|
const { matrix } = props.extraAttrs || {};
|
|
41
41
|
const { getPlatformInfoById } = matrix || {};
|
|
42
42
|
const cover = computed(() => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
let covers = [];
|
|
44
|
+
try {
|
|
45
|
+
covers = JSON.parse(props.item.cover || "[]");
|
|
46
|
+
} catch (error) {
|
|
47
|
+
}
|
|
48
|
+
if (covers == null ? void 0 : covers.length) {
|
|
49
|
+
return covers[0];
|
|
46
50
|
}
|
|
47
51
|
if (props.item.payload) {
|
|
48
52
|
const _payload = JSON.parse(props.item.payload);
|
|
49
|
-
if (_payload
|
|
53
|
+
if (_payload && Array.isArray(_payload)) {
|
|
50
54
|
return _payload[0].covers[0];
|
|
51
55
|
}
|
|
56
|
+
return (_payload == null ? void 0 : _payload.covers[0]) || "";
|
|
52
57
|
}
|
|
53
58
|
return "";
|
|
54
59
|
});
|
|
@@ -4,6 +4,7 @@ import { IconRefresh } from "@arco-design/web-vue/es/icon";
|
|
|
4
4
|
import { docSeries, docThumbMap } from "../../../../utils/doc.js";
|
|
5
5
|
import _sfc_main$1 from "../columnTree/index.js";
|
|
6
6
|
const _hoisted_1 = { class: "media-filter-container" };
|
|
7
|
+
const _hoisted_2 = { class: "sort-button" };
|
|
7
8
|
const _sfc_main = defineComponent({
|
|
8
9
|
...{ name: "MediaFilter" },
|
|
9
10
|
__name: "index",
|
|
@@ -228,10 +229,7 @@ const _sfc_main = defineComponent({
|
|
|
228
229
|
]),
|
|
229
230
|
_: 1
|
|
230
231
|
}),
|
|
231
|
-
createElementVNode("div",
|
|
232
|
-
class: "sort-button",
|
|
233
|
-
onClick: reset
|
|
234
|
-
}, [
|
|
232
|
+
createElementVNode("div", _hoisted_2, [
|
|
235
233
|
createVNode(unref(Select), {
|
|
236
234
|
modelValue: filter.value.order,
|
|
237
235
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.order = $event),
|
|
@@ -76,6 +76,7 @@ const _sfc_main = defineComponent({
|
|
|
76
76
|
topImageTitleValid: {},
|
|
77
77
|
showTitle: { type: Boolean },
|
|
78
78
|
cropper: { type: Boolean },
|
|
79
|
+
cropperRatios: {},
|
|
79
80
|
aiImages: {},
|
|
80
81
|
series: {},
|
|
81
82
|
thumbsMax: {},
|
|
@@ -241,9 +242,9 @@ const _sfc_main = defineComponent({
|
|
|
241
242
|
].includes(series);
|
|
242
243
|
});
|
|
243
244
|
const submitCallback = (data) => {
|
|
244
|
-
var _a;
|
|
245
|
+
var _a, _b, _c, _d;
|
|
245
246
|
const isPcBaner = props.mode === "doc" && thumbBannerModel.value === "pcBanner" && !docSeriesShowTopThemeColor.value;
|
|
246
|
-
const _useCropper =
|
|
247
|
+
const _useCropper = ["thumb", "doc"].includes(props.mode) ? true : useCropper.value;
|
|
247
248
|
if (["smiple", "thumbs"].includes(props.mode)) {
|
|
248
249
|
dialogMediaSelectionShow.value = false;
|
|
249
250
|
const media = data[0];
|
|
@@ -262,15 +263,18 @@ const _sfc_main = defineComponent({
|
|
|
262
263
|
});
|
|
263
264
|
} else {
|
|
264
265
|
cropperData.value = [].concat(data);
|
|
265
|
-
if (thumbBannerModel.value === "banner"
|
|
266
|
-
aspectRatioProp.value = docThumbRatioMap()[2];
|
|
266
|
+
if (thumbBannerModel.value === "banner") {
|
|
267
|
+
aspectRatioProp.value = ((_a = props.cropperRatios) == null ? void 0 : _a[1]) || docThumbRatioMap()[2];
|
|
268
|
+
}
|
|
269
|
+
if (thumbBannerModel.value === "pcBanner" && docSeriesShowTopThemeColor.value) {
|
|
270
|
+
aspectRatioProp.value = ((_b = props.cropperRatios) == null ? void 0 : _b[2]) || docThumbRatioMap()[2];
|
|
267
271
|
}
|
|
268
272
|
if (thumbBannerModel.value === "thumb") {
|
|
269
|
-
aspectRatioProp.value = docThumbRatioMap()[model.value];
|
|
273
|
+
aspectRatioProp.value = ((_c = props.cropperRatios) == null ? void 0 : _c[0]) || docThumbRatioMap()[model.value];
|
|
270
274
|
if (data.length) {
|
|
271
275
|
const media = data[0];
|
|
272
276
|
const wh = [];
|
|
273
|
-
(
|
|
277
|
+
(_d = media.metas) == null ? void 0 : _d.map((item) => {
|
|
274
278
|
if (item.key === "width")
|
|
275
279
|
wh.unshift(parseInt(item.value, 10));
|
|
276
280
|
if (item.key === "height")
|
|
@@ -41,15 +41,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
41
41
|
const { matrix } = props.extraAttrs || {};
|
|
42
42
|
const { getPlatformInfoById } = matrix || {};
|
|
43
43
|
const cover = vue.computed(() => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
let covers = [];
|
|
45
|
+
try {
|
|
46
|
+
covers = JSON.parse(props.item.cover || "[]");
|
|
47
|
+
} catch (error) {
|
|
48
|
+
}
|
|
49
|
+
if (covers == null ? void 0 : covers.length) {
|
|
50
|
+
return covers[0];
|
|
47
51
|
}
|
|
48
52
|
if (props.item.payload) {
|
|
49
53
|
const _payload = JSON.parse(props.item.payload);
|
|
50
|
-
if (_payload
|
|
54
|
+
if (_payload && Array.isArray(_payload)) {
|
|
51
55
|
return _payload[0].covers[0];
|
|
52
56
|
}
|
|
57
|
+
return (_payload == null ? void 0 : _payload.covers[0]) || "";
|
|
53
58
|
}
|
|
54
59
|
return "";
|
|
55
60
|
});
|
|
@@ -5,6 +5,7 @@ var icon = require("@arco-design/web-vue/es/icon");
|
|
|
5
5
|
var doc = require("../../../../utils/doc.js");
|
|
6
6
|
var index = require("../columnTree/index.js");
|
|
7
7
|
const _hoisted_1 = { class: "media-filter-container" };
|
|
8
|
+
const _hoisted_2 = { class: "sort-button" };
|
|
8
9
|
const _sfc_main = vue.defineComponent({
|
|
9
10
|
...{ name: "MediaFilter" },
|
|
10
11
|
__name: "index",
|
|
@@ -229,10 +230,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
229
230
|
]),
|
|
230
231
|
_: 1
|
|
231
232
|
}),
|
|
232
|
-
vue.createElementVNode("div",
|
|
233
|
-
class: "sort-button",
|
|
234
|
-
onClick: reset
|
|
235
|
-
}, [
|
|
233
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
236
234
|
vue.createVNode(vue.unref(webVue.Select), {
|
|
237
235
|
modelValue: filter.value.order,
|
|
238
236
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.order = $event),
|
|
@@ -77,6 +77,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
77
77
|
topImageTitleValid: {},
|
|
78
78
|
showTitle: { type: Boolean },
|
|
79
79
|
cropper: { type: Boolean },
|
|
80
|
+
cropperRatios: {},
|
|
80
81
|
aiImages: {},
|
|
81
82
|
series: {},
|
|
82
83
|
thumbsMax: {},
|
|
@@ -242,9 +243,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
242
243
|
].includes(series);
|
|
243
244
|
});
|
|
244
245
|
const submitCallback = (data) => {
|
|
245
|
-
var _a;
|
|
246
|
+
var _a, _b, _c, _d;
|
|
246
247
|
const isPcBaner = props.mode === "doc" && thumbBannerModel.value === "pcBanner" && !docSeriesShowTopThemeColor.value;
|
|
247
|
-
const _useCropper =
|
|
248
|
+
const _useCropper = ["thumb", "doc"].includes(props.mode) ? true : useCropper.value;
|
|
248
249
|
if (["smiple", "thumbs"].includes(props.mode)) {
|
|
249
250
|
dialogMediaSelectionShow.value = false;
|
|
250
251
|
const media = data[0];
|
|
@@ -263,15 +264,18 @@ const _sfc_main = vue.defineComponent({
|
|
|
263
264
|
});
|
|
264
265
|
} else {
|
|
265
266
|
cropperData.value = [].concat(data);
|
|
266
|
-
if (thumbBannerModel.value === "banner"
|
|
267
|
-
aspectRatioProp.value = doc.docThumbRatioMap()[2];
|
|
267
|
+
if (thumbBannerModel.value === "banner") {
|
|
268
|
+
aspectRatioProp.value = ((_a = props.cropperRatios) == null ? void 0 : _a[1]) || doc.docThumbRatioMap()[2];
|
|
269
|
+
}
|
|
270
|
+
if (thumbBannerModel.value === "pcBanner" && docSeriesShowTopThemeColor.value) {
|
|
271
|
+
aspectRatioProp.value = ((_b = props.cropperRatios) == null ? void 0 : _b[2]) || doc.docThumbRatioMap()[2];
|
|
268
272
|
}
|
|
269
273
|
if (thumbBannerModel.value === "thumb") {
|
|
270
|
-
aspectRatioProp.value = doc.docThumbRatioMap()[model.value];
|
|
274
|
+
aspectRatioProp.value = ((_c = props.cropperRatios) == null ? void 0 : _c[0]) || doc.docThumbRatioMap()[model.value];
|
|
271
275
|
if (data.length) {
|
|
272
276
|
const media = data[0];
|
|
273
277
|
const wh = [];
|
|
274
|
-
(
|
|
278
|
+
(_d = media.metas) == null ? void 0 : _d.map((item) => {
|
|
275
279
|
if (item.key === "width")
|
|
276
280
|
wh.unshift(parseInt(item.value, 10));
|
|
277
281
|
if (item.key === "height")
|