@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
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, renderSlot,
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, renderSlot, createElementBlock, Fragment, renderList } from "vue";
|
|
2
2
|
import { Scrollbar } from "@arco-design/web-vue";
|
|
3
3
|
import draggable from "vuedraggable";
|
|
4
4
|
import _sfc_main$1 from "./components/Content/index.js";
|
|
5
5
|
import _sfc_main$2 from "./components/Doc/index.js";
|
|
6
6
|
import _sfc_main$3 from "./components/Records/index.js";
|
|
7
|
+
import _sfc_main$4 from "./components/CustomWrp/index.js";
|
|
7
8
|
const _hoisted_1 = { class: "content-detail-list-container" };
|
|
8
9
|
const _hoisted_2 = { class: "drag-item" };
|
|
9
10
|
const _sfc_main = defineComponent({
|
|
@@ -112,8 +113,7 @@ const _sfc_main = defineComponent({
|
|
|
112
113
|
})
|
|
113
114
|
]),
|
|
114
115
|
_: 2
|
|
115
|
-
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) :
|
|
116
|
-
props.type === "doc" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
116
|
+
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : props.type === "doc" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
117
117
|
key: index,
|
|
118
118
|
item: element,
|
|
119
119
|
index,
|
|
@@ -142,8 +142,7 @@ const _sfc_main = defineComponent({
|
|
|
142
142
|
})
|
|
143
143
|
]),
|
|
144
144
|
_: 2
|
|
145
|
-
}, 1032, ["item", "index", "abttrites", "extraAttrs"])) :
|
|
146
|
-
props.type === "record" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
145
|
+
}, 1032, ["item", "index", "abttrites", "extraAttrs"])) : props.type === "record" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
147
146
|
key: index,
|
|
148
147
|
item: element,
|
|
149
148
|
index,
|
|
@@ -167,7 +166,36 @@ const _sfc_main = defineComponent({
|
|
|
167
166
|
})
|
|
168
167
|
]),
|
|
169
168
|
_: 2
|
|
170
|
-
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) :
|
|
169
|
+
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : (openBlock(), createBlock(_sfc_main$4, {
|
|
170
|
+
key: 3,
|
|
171
|
+
item: element,
|
|
172
|
+
index,
|
|
173
|
+
abttrites: unref(abttritesProps),
|
|
174
|
+
extraAttrs: _ctx.extraAttrs,
|
|
175
|
+
onClickTitle: clickTitle,
|
|
176
|
+
onCellMouseEnter: tableCellMouseEnter,
|
|
177
|
+
onCellMouseLeave: tableCellMouseLeave
|
|
178
|
+
}, {
|
|
179
|
+
tip: withCtx(() => [
|
|
180
|
+
renderSlot(_ctx.$slots, "tip", {
|
|
181
|
+
row: element,
|
|
182
|
+
index
|
|
183
|
+
})
|
|
184
|
+
]),
|
|
185
|
+
batch: withCtx(() => [
|
|
186
|
+
renderSlot(_ctx.$slots, "batch", {
|
|
187
|
+
row: element,
|
|
188
|
+
index
|
|
189
|
+
})
|
|
190
|
+
]),
|
|
191
|
+
option: withCtx(() => [
|
|
192
|
+
renderSlot(_ctx.$slots, "option", {
|
|
193
|
+
row: element,
|
|
194
|
+
index
|
|
195
|
+
})
|
|
196
|
+
]),
|
|
197
|
+
_: 2
|
|
198
|
+
}, 1032, ["item", "index", "abttrites", "extraAttrs"]))
|
|
171
199
|
])
|
|
172
200
|
]),
|
|
173
201
|
_: 3
|
|
@@ -197,8 +225,7 @@ const _sfc_main = defineComponent({
|
|
|
197
225
|
})
|
|
198
226
|
]),
|
|
199
227
|
_: 2
|
|
200
|
-
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) :
|
|
201
|
-
props.type === "doc" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
228
|
+
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : props.type === "doc" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
202
229
|
key: index,
|
|
203
230
|
item,
|
|
204
231
|
index,
|
|
@@ -227,8 +254,7 @@ const _sfc_main = defineComponent({
|
|
|
227
254
|
})
|
|
228
255
|
]),
|
|
229
256
|
_: 2
|
|
230
|
-
}, 1032, ["item", "index", "abttrites", "extraAttrs"])) :
|
|
231
|
-
props.type === "record" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
257
|
+
}, 1032, ["item", "index", "abttrites", "extraAttrs"])) : props.type === "record" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
232
258
|
key: index,
|
|
233
259
|
item,
|
|
234
260
|
index,
|
|
@@ -252,7 +278,36 @@ const _sfc_main = defineComponent({
|
|
|
252
278
|
})
|
|
253
279
|
]),
|
|
254
280
|
_: 2
|
|
255
|
-
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) :
|
|
281
|
+
}, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : (openBlock(), createBlock(_sfc_main$4, {
|
|
282
|
+
key: 3,
|
|
283
|
+
item,
|
|
284
|
+
index,
|
|
285
|
+
abttrites: unref(abttritesProps),
|
|
286
|
+
extraAttrs: _ctx.extraAttrs,
|
|
287
|
+
onClickTitle: clickTitle,
|
|
288
|
+
onCellMouseEnter: tableCellMouseEnter,
|
|
289
|
+
onCellMouseLeave: tableCellMouseLeave
|
|
290
|
+
}, {
|
|
291
|
+
tip: withCtx(() => [
|
|
292
|
+
renderSlot(_ctx.$slots, "tip", {
|
|
293
|
+
row: item,
|
|
294
|
+
index
|
|
295
|
+
})
|
|
296
|
+
]),
|
|
297
|
+
batch: withCtx(() => [
|
|
298
|
+
renderSlot(_ctx.$slots, "batch", {
|
|
299
|
+
row: item,
|
|
300
|
+
index
|
|
301
|
+
})
|
|
302
|
+
]),
|
|
303
|
+
option: withCtx(() => [
|
|
304
|
+
renderSlot(_ctx.$slots, "option", {
|
|
305
|
+
row: item,
|
|
306
|
+
index
|
|
307
|
+
})
|
|
308
|
+
]),
|
|
309
|
+
_: 2
|
|
310
|
+
}, 1032, ["item", "index", "abttrites", "extraAttrs"]))
|
|
256
311
|
], 64);
|
|
257
312
|
}), 128))
|
|
258
313
|
])
|
|
File without changes
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, onMounted, openBlock, createElementBlock, normalizeClass, createElementVNode, createCommentVNode, createBlock, unref, toDisplayString, renderSlot, createTextVNode, Fragment, renderList, createVNode, withCtx } from "vue";
|
|
2
|
+
import { Image, Tooltip } from "@arco-design/web-vue";
|
|
3
|
+
import { getDocThumb } from "../../../utils/doc.js";
|
|
4
|
+
import { noCoverText } from "../../../utils/index.js";
|
|
5
|
+
const _hoisted_1 = { class: "cover-view" };
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "no-img"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = { class: "batch-select" };
|
|
11
|
+
const _hoisted_4 = { class: "info-view" };
|
|
12
|
+
const _hoisted_5 = { class: "abttrite-v" };
|
|
13
|
+
const _hoisted_6 = { class: "left" };
|
|
14
|
+
const _hoisted_7 = { class: "right" };
|
|
15
|
+
const _sfc_main = defineComponent({
|
|
16
|
+
__name: "CustomItem",
|
|
17
|
+
props: {
|
|
18
|
+
item: {},
|
|
19
|
+
showAttrs: {},
|
|
20
|
+
thumbKey: {}
|
|
21
|
+
},
|
|
22
|
+
emits: ["clickTitle", "cellMouseEnter", "cellMouseLeave"],
|
|
23
|
+
setup(__props, { emit: __emit }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const emit = __emit;
|
|
26
|
+
const title = computed(() => {
|
|
27
|
+
const { alias, title: title2 } = props.item;
|
|
28
|
+
return alias || title2;
|
|
29
|
+
});
|
|
30
|
+
const thumb = computed(() => {
|
|
31
|
+
if (!props.item)
|
|
32
|
+
return null;
|
|
33
|
+
if (!props.thumbKey) {
|
|
34
|
+
return getDocThumb(props.item);
|
|
35
|
+
}
|
|
36
|
+
return props.item[props.thumbKey];
|
|
37
|
+
});
|
|
38
|
+
const noImgText = computed(() => {
|
|
39
|
+
if (title.value)
|
|
40
|
+
return "\u65E0\u56FE";
|
|
41
|
+
return noCoverText(props.item);
|
|
42
|
+
});
|
|
43
|
+
const hide = computed(() => {
|
|
44
|
+
const { hide: hide2 } = props.item;
|
|
45
|
+
return hide2 === 7 || hide2 === 6;
|
|
46
|
+
});
|
|
47
|
+
const silent = computed(() => {
|
|
48
|
+
return props.item && props.item.mourn_style === 1;
|
|
49
|
+
});
|
|
50
|
+
const attributes = ref([]);
|
|
51
|
+
function initAttributes() {
|
|
52
|
+
if (!props.showAttrs)
|
|
53
|
+
return;
|
|
54
|
+
attributes.value = props.showAttrs.map((item) => {
|
|
55
|
+
let value = "--";
|
|
56
|
+
if (item.key)
|
|
57
|
+
value = props.item[item.key] || "--";
|
|
58
|
+
else if (item.getValue)
|
|
59
|
+
value = item.getValue(props.item) || "--";
|
|
60
|
+
return {
|
|
61
|
+
value,
|
|
62
|
+
...item
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const mouseEnterFun = (event, row) => {
|
|
67
|
+
emit("cellMouseEnter", { row, event });
|
|
68
|
+
};
|
|
69
|
+
const mouseLeaveFun = (event, row) => {
|
|
70
|
+
emit("cellMouseLeave", { row, event });
|
|
71
|
+
};
|
|
72
|
+
const clickTitle = () => {
|
|
73
|
+
emit("clickTitle", props.item);
|
|
74
|
+
};
|
|
75
|
+
onMounted(() => {
|
|
76
|
+
initAttributes();
|
|
77
|
+
});
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
return openBlock(), createElementBlock("div", {
|
|
80
|
+
class: normalizeClass(["medialist-doc-item-view", { "gray-forbidden": hide.value, "gray-for-state-hide": silent.value }]),
|
|
81
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseEnterFun($event, _ctx.item)),
|
|
82
|
+
onMouseleave: _cache[1] || (_cache[1] = ($event) => mouseLeaveFun($event, _ctx.item))
|
|
83
|
+
}, [
|
|
84
|
+
createElementVNode("div", _hoisted_1, [
|
|
85
|
+
createCommentVNode(" \u5C01\u9762 "),
|
|
86
|
+
thumb.value ? (openBlock(), createBlock(unref(Image), {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: "image",
|
|
89
|
+
src: thumb.value,
|
|
90
|
+
preview: false,
|
|
91
|
+
fit: "cover"
|
|
92
|
+
}, null, 8, ["src"])) : (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(noImgText.value), 1)),
|
|
93
|
+
createElementVNode("div", _hoisted_3, [
|
|
94
|
+
renderSlot(_ctx.$slots, "batch", { row: _ctx.item })
|
|
95
|
+
])
|
|
96
|
+
]),
|
|
97
|
+
createCommentVNode(" \u4FE1\u606F "),
|
|
98
|
+
createElementVNode("div", _hoisted_4, [
|
|
99
|
+
createCommentVNode(" \u6807\u9898 "),
|
|
100
|
+
createElementVNode("div", {
|
|
101
|
+
class: "title",
|
|
102
|
+
onClick: clickTitle
|
|
103
|
+
}, [
|
|
104
|
+
renderSlot(_ctx.$slots, "index"),
|
|
105
|
+
createTextVNode(" " + toDisplayString(title.value || "\u2014\u2014"), 1)
|
|
106
|
+
]),
|
|
107
|
+
createCommentVNode(" \u5143\u4FE1\u606F "),
|
|
108
|
+
createElementVNode("div", _hoisted_5, [
|
|
109
|
+
createElementVNode("div", _hoisted_6, [
|
|
110
|
+
createCommentVNode(" \u524D\u7F00 "),
|
|
111
|
+
renderSlot(_ctx.$slots, "tip"),
|
|
112
|
+
createCommentVNode(" \u5C5E\u6027 "),
|
|
113
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(attributes.value, (attr, index) => {
|
|
114
|
+
return openBlock(), createElementBlock("span", {
|
|
115
|
+
key: index,
|
|
116
|
+
class: "abttr"
|
|
117
|
+
}, [
|
|
118
|
+
createVNode(unref(Tooltip), {
|
|
119
|
+
content: `${attr.label}: ${attr.value}`,
|
|
120
|
+
placement: "top"
|
|
121
|
+
}, {
|
|
122
|
+
default: withCtx(() => [
|
|
123
|
+
createElementVNode("span", null, toDisplayString(attr.value || "--"), 1)
|
|
124
|
+
]),
|
|
125
|
+
_: 2
|
|
126
|
+
}, 1032, ["content"])
|
|
127
|
+
]);
|
|
128
|
+
}), 128))
|
|
129
|
+
]),
|
|
130
|
+
createElementVNode("div", _hoisted_7, [
|
|
131
|
+
createCommentVNode(" \u540E\u7F00 "),
|
|
132
|
+
renderSlot(_ctx.$slots, "option", { row: _ctx.item })
|
|
133
|
+
])
|
|
134
|
+
])
|
|
135
|
+
])
|
|
136
|
+
], 34);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, withCtx, renderSlot } from "vue";
|
|
2
|
+
import _sfc_main$1 from "./CustomItem.js";
|
|
3
|
+
const _sfc_main = defineComponent({
|
|
4
|
+
__name: "index",
|
|
5
|
+
props: {
|
|
6
|
+
abttrites: {},
|
|
7
|
+
extraAttrs: {},
|
|
8
|
+
item: {},
|
|
9
|
+
index: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["cellMouseEnter", "cellMouseLeave", "clickTitle"],
|
|
12
|
+
setup(__props, { emit: __emit }) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const emit = __emit;
|
|
15
|
+
const customMeta = computed(() => {
|
|
16
|
+
return props.extraAttrs.custom || {};
|
|
17
|
+
});
|
|
18
|
+
const cellMouseEnter = (params) => {
|
|
19
|
+
emit("cellMouseEnter", params);
|
|
20
|
+
};
|
|
21
|
+
const cellMouseLeave = (params) => {
|
|
22
|
+
emit("cellMouseLeave", params);
|
|
23
|
+
};
|
|
24
|
+
const clickTitle = (item) => {
|
|
25
|
+
emit("clickTitle", item);
|
|
26
|
+
};
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
29
|
+
item: _ctx.item,
|
|
30
|
+
abttrites: _ctx.abttrites,
|
|
31
|
+
"thumb-key": customMeta.value.thumbKey,
|
|
32
|
+
"show-attrs": customMeta.value.showAttrs,
|
|
33
|
+
onCellMouseEnter: cellMouseEnter,
|
|
34
|
+
onCellMouseLeave: cellMouseLeave,
|
|
35
|
+
onClickTitle: clickTitle
|
|
36
|
+
}, {
|
|
37
|
+
tip: withCtx(() => [
|
|
38
|
+
renderSlot(_ctx.$slots, "tip", {
|
|
39
|
+
row: _ctx.item,
|
|
40
|
+
index: _ctx.index
|
|
41
|
+
})
|
|
42
|
+
]),
|
|
43
|
+
batch: withCtx(() => [
|
|
44
|
+
renderSlot(_ctx.$slots, "batch", {
|
|
45
|
+
row: _ctx.item,
|
|
46
|
+
index: _ctx.index
|
|
47
|
+
})
|
|
48
|
+
]),
|
|
49
|
+
option: withCtx(() => [
|
|
50
|
+
renderSlot(_ctx.$slots, "option", {
|
|
51
|
+
row: _ctx.item,
|
|
52
|
+
index: _ctx.index
|
|
53
|
+
})
|
|
54
|
+
]),
|
|
55
|
+
_: 3
|
|
56
|
+
}, 8, ["item", "abttrites", "thumb-key", "show-attrs"]);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export { _sfc_main as default };
|
|
@@ -21,44 +21,45 @@ const _hoisted_5 = {
|
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "thumb-list-view"
|
|
23
23
|
};
|
|
24
|
-
const _hoisted_6 = {
|
|
25
|
-
const _hoisted_7 = {
|
|
24
|
+
const _hoisted_6 = { class: "thumb-list-view" };
|
|
25
|
+
const _hoisted_7 = { style: { "margin-top": "-10px" } };
|
|
26
|
+
const _hoisted_8 = {
|
|
26
27
|
key: 0,
|
|
27
28
|
class: "tip"
|
|
28
29
|
};
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
30
|
+
const _hoisted_9 = /* @__PURE__ */ createElementVNode("span", { style: { "margin-right": "10px" } }, "\u72EC\u7ACB\u8F6E\u64AD\u56FE", -1);
|
|
31
|
+
const _hoisted_10 = { class: "thumbbox" };
|
|
32
|
+
const _hoisted_11 = {
|
|
32
33
|
key: 2,
|
|
33
34
|
class: "title"
|
|
34
35
|
};
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode("span", null, "\u72EC\u7ACB\u8F6E\u64AD\u56FE\u80CC\u666F\u989C\u8272", -1);
|
|
37
|
+
const _hoisted_13 = [
|
|
38
|
+
_hoisted_12
|
|
38
39
|
];
|
|
39
|
-
const
|
|
40
|
-
const
|
|
40
|
+
const _hoisted_14 = { key: 0 };
|
|
41
|
+
const _hoisted_15 = {
|
|
41
42
|
key: 0,
|
|
42
43
|
class: "star"
|
|
43
44
|
};
|
|
44
|
-
const
|
|
45
|
-
const
|
|
45
|
+
const _hoisted_16 = { key: 1 };
|
|
46
|
+
const _hoisted_17 = {
|
|
46
47
|
key: 2,
|
|
47
48
|
class: "tip",
|
|
48
49
|
style: { "margin-left": "10px" }
|
|
49
50
|
};
|
|
50
|
-
const
|
|
51
|
-
const
|
|
51
|
+
const _hoisted_18 = { class: "thumbbox" };
|
|
52
|
+
const _hoisted_19 = {
|
|
52
53
|
key: 0,
|
|
53
54
|
class: "tip"
|
|
54
55
|
};
|
|
55
|
-
const
|
|
56
|
+
const _hoisted_20 = {
|
|
56
57
|
key: 1,
|
|
57
58
|
class: "title"
|
|
58
59
|
};
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
const _hoisted_21 = /* @__PURE__ */ createElementVNode("span", null, "\u56FE\u7247\u80CC\u666F\u989C\u8272", -1);
|
|
61
|
+
const _hoisted_22 = [
|
|
62
|
+
_hoisted_21
|
|
62
63
|
];
|
|
63
64
|
const _sfc_main = defineComponent({
|
|
64
65
|
...{ name: "selectThumb" },
|
|
@@ -147,6 +148,14 @@ const _sfc_main = defineComponent({
|
|
|
147
148
|
},
|
|
148
149
|
{ immediate: true }
|
|
149
150
|
);
|
|
151
|
+
const thumbsModeList = computed({
|
|
152
|
+
get() {
|
|
153
|
+
return props.dataValue;
|
|
154
|
+
},
|
|
155
|
+
set(value) {
|
|
156
|
+
emit("update:dataValue", value);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
150
159
|
const callback = (value) => {
|
|
151
160
|
var _a;
|
|
152
161
|
const temp = JSON.parse(JSON.stringify(value));
|
|
@@ -161,18 +170,16 @@ const _sfc_main = defineComponent({
|
|
|
161
170
|
if (!temp.data) {
|
|
162
171
|
temp.data = [];
|
|
163
172
|
}
|
|
164
|
-
if (props.mode === "
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
JSON.parse(JSON.stringify(temp.data.map((item) => item.url)))
|
|
168
|
-
);
|
|
173
|
+
if (props.mode === "thumbs") {
|
|
174
|
+
console.log(temp);
|
|
175
|
+
thumbsModeList.value[thumbOptionIndex.value] = temp.data[0].url;
|
|
169
176
|
} else {
|
|
170
177
|
emit("update:dataValue", JSON.stringify(temp));
|
|
171
178
|
}
|
|
172
179
|
}
|
|
173
180
|
};
|
|
174
181
|
const curtemplate = computed(() => {
|
|
175
|
-
if (!["doc", "
|
|
182
|
+
if (!["doc", "thumbs"].includes(props.mode)) {
|
|
176
183
|
return docThumbObjMap[3];
|
|
177
184
|
}
|
|
178
185
|
return docThumbObjMap[parseInt(model.value, 10)];
|
|
@@ -236,7 +243,7 @@ const _sfc_main = defineComponent({
|
|
|
236
243
|
var _a;
|
|
237
244
|
const isPcBaner = props.mode === "doc" && thumbBannerModel.value === "pcBanner" && !docSeriesShowTopThemeColor.value;
|
|
238
245
|
const _useCropper = props.mode === "doc" ? true : useCropper.value;
|
|
239
|
-
if (["smiple", "
|
|
246
|
+
if (["smiple", "thumbs"].includes(props.mode)) {
|
|
240
247
|
dialogMediaSelectionShow.value = false;
|
|
241
248
|
const medias = data.map((media) => {
|
|
242
249
|
return { url: media.url, thumb: media.url };
|
|
@@ -366,7 +373,7 @@ const _sfc_main = defineComponent({
|
|
|
366
373
|
createElementVNode("div", {
|
|
367
374
|
class: normalizeClass(["banner-view", { flex: _ctx.flex }])
|
|
368
375
|
}, [
|
|
369
|
-
_ctx.mode !== "smiple" ? (openBlock(), createElementBlock("div", {
|
|
376
|
+
_ctx.mode !== "smiple" && _ctx.showTitle ? (openBlock(), createElementBlock("div", {
|
|
370
377
|
key: 0,
|
|
371
378
|
class: "title",
|
|
372
379
|
style: normalizeStyle({ width: _ctx.offset })
|
|
@@ -377,25 +384,38 @@ const _sfc_main = defineComponent({
|
|
|
377
384
|
((_a = curtemplate.value) == null ? void 0 : _a.value) !== "4" && !_ctx.flex ? (openBlock(), createElementBlock("span", _hoisted_3, " (" + toDisplayString((_b = curtemplate.value) == null ? void 0 : _b.alias) + "\u6BD4\u4F8B\uFF1A" + toDisplayString((_c = curtemplate.value) == null ? void 0 : _c.ratioStr) + ") ", 1)) : createCommentVNode("v-if", true)
|
|
378
385
|
], 4)) : createCommentVNode("v-if", true),
|
|
379
386
|
createElementVNode("div", _hoisted_4, [
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(currentModel.value.maxLength, (item, index) => {
|
|
387
|
+
["thumbs"].includes(_ctx.mode) ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
388
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(thumbsModeList.value, (item, index) => {
|
|
383
389
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
384
390
|
key: index,
|
|
385
391
|
id: `thumb-card-${index}`,
|
|
386
|
-
data:
|
|
387
|
-
model: model.value,
|
|
392
|
+
data: { url: item },
|
|
388
393
|
"preview-list": previewList.value,
|
|
389
394
|
"thumb-model": "thumb",
|
|
390
395
|
onOpen: ($event) => openDialogMediaSelection($event, index)
|
|
391
|
-
}, null, 8, ["id", "data", "
|
|
396
|
+
}, null, 8, ["id", "data", "preview-list", "onOpen"]);
|
|
392
397
|
}), 128))
|
|
393
|
-
])) :
|
|
398
|
+
])) : currentModel.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
399
|
+
createCommentVNode(" \u5C01\u9762\u56FEcard "),
|
|
400
|
+
createElementVNode("div", _hoisted_6, [
|
|
401
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(currentModel.value.maxLength, (item, index) => {
|
|
402
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
403
|
+
key: index,
|
|
404
|
+
id: `thumb-card-${index}`,
|
|
405
|
+
data: thumbList.value[index],
|
|
406
|
+
model: model.value,
|
|
407
|
+
"preview-list": previewList.value,
|
|
408
|
+
"thumb-model": "thumb",
|
|
409
|
+
onOpen: ($event) => openDialogMediaSelection($event, index)
|
|
410
|
+
}, null, 8, ["id", "data", "model", "preview-list", "onOpen"]);
|
|
411
|
+
}), 128))
|
|
412
|
+
])
|
|
413
|
+
], 2112)) : createCommentVNode("v-if", true),
|
|
394
414
|
createCommentVNode(" \u5DE6\u53F3\u5E03\u5C40\u663E\u793Atip "),
|
|
395
|
-
createElementVNode("div",
|
|
396
|
-
((_d = curtemplate.value) == null ? void 0 : _d.value) !== "4" && _ctx.flex ? (openBlock(), createElementBlock("span",
|
|
415
|
+
createElementVNode("div", _hoisted_7, [
|
|
416
|
+
((_d = curtemplate.value) == null ? void 0 : _d.value) !== "4" && _ctx.flex ? (openBlock(), createElementBlock("span", _hoisted_8, " (" + toDisplayString((_e = curtemplate.value) == null ? void 0 : _e.alias) + "\u6BD4\u4F8B\uFF1A" + toDisplayString((_f = curtemplate.value) == null ? void 0 : _f.ratioStr) + ") ", 1)) : createCommentVNode("v-if", true)
|
|
397
417
|
]),
|
|
398
|
-
["
|
|
418
|
+
["doc"].includes(_ctx.mode) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
399
419
|
createCommentVNode(" \u9009\u62E9\u5927\u56FE\u3001\u4E09\u56FE\u3001\u5355\u56FE...\u7B49\u6A21\u5F0F "),
|
|
400
420
|
createVNode(unref(RadioGroup), {
|
|
401
421
|
modelValue: model.value,
|
|
@@ -432,7 +452,7 @@ const _sfc_main = defineComponent({
|
|
|
432
452
|
class: "title",
|
|
433
453
|
style: normalizeStyle({ width: _ctx.offset })
|
|
434
454
|
}, [
|
|
435
|
-
|
|
455
|
+
_hoisted_9,
|
|
436
456
|
createCommentVNode(" \u4E0A\u4E0B\u5E03\u5C40\u5F00\u5173\u5728\u6807\u9898\u540E "),
|
|
437
457
|
!_ctx.flex ? (openBlock(), createBlock(unref(Switch), {
|
|
438
458
|
key: 0,
|
|
@@ -441,7 +461,7 @@ const _sfc_main = defineComponent({
|
|
|
441
461
|
size: "small"
|
|
442
462
|
}, null, 8, ["modelValue"])) : createCommentVNode("v-if", true)
|
|
443
463
|
], 4),
|
|
444
|
-
createElementVNode("div",
|
|
464
|
+
createElementVNode("div", _hoisted_10, [
|
|
445
465
|
createCommentVNode(" \u5DE6\u53F3\u5E03\u5C40\u5F00\u5173\u663E\u793A "),
|
|
446
466
|
_ctx.flex ? (openBlock(), createBlock(unref(Switch), {
|
|
447
467
|
key: 0,
|
|
@@ -458,7 +478,7 @@ const _sfc_main = defineComponent({
|
|
|
458
478
|
"thumb-model": "banner",
|
|
459
479
|
onOpen: openDialogMediaSelection
|
|
460
480
|
}, null, 8, ["data", "preview-list"])) : createCommentVNode("v-if", true),
|
|
461
|
-
hasBanner.value && styleData.value.banner_theme_color ? (openBlock(), createElementBlock("div",
|
|
481
|
+
hasBanner.value && styleData.value.banner_theme_color ? (openBlock(), createElementBlock("div", _hoisted_11, _hoisted_13)) : createCommentVNode("v-if", true),
|
|
462
482
|
createCommentVNode(" banner\u8C03\u8272\u677F "),
|
|
463
483
|
hasBanner.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
464
484
|
key: 3,
|
|
@@ -476,13 +496,13 @@ const _sfc_main = defineComponent({
|
|
|
476
496
|
class: "title",
|
|
477
497
|
style: normalizeStyle({ width: _ctx.offset })
|
|
478
498
|
}, [
|
|
479
|
-
docSeriesShowTopThemeColor.value ? (openBlock(), createElementBlock("span",
|
|
480
|
-
_ctx.topImageTitleValid ? (openBlock(), createElementBlock("span",
|
|
499
|
+
docSeriesShowTopThemeColor.value ? (openBlock(), createElementBlock("span", _hoisted_14, [
|
|
500
|
+
_ctx.topImageTitleValid ? (openBlock(), createElementBlock("span", _hoisted_15, "*")) : createCommentVNode("v-if", true),
|
|
481
501
|
createElementVNode("span", null, toDisplayString(_ctx.topImageTitle || "\u5C01\u9762\u5934\u56FE"), 1)
|
|
482
|
-
])) : (openBlock(), createElementBlock("span",
|
|
483
|
-
!_ctx.flex ? (openBlock(), createElementBlock("span",
|
|
502
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_16, "PC\u5C01\u9762\u56FE")),
|
|
503
|
+
!_ctx.flex ? (openBlock(), createElementBlock("span", _hoisted_17, " (\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px) ")) : createCommentVNode("v-if", true)
|
|
484
504
|
], 4),
|
|
485
|
-
createElementVNode("div",
|
|
505
|
+
createElementVNode("div", _hoisted_18, [
|
|
486
506
|
createVNode(_sfc_main$1, {
|
|
487
507
|
id: `pc-banner-card`,
|
|
488
508
|
data: pcBanner.value,
|
|
@@ -490,8 +510,8 @@ const _sfc_main = defineComponent({
|
|
|
490
510
|
thumbModel: "pcBanner",
|
|
491
511
|
onOpen: openDialogMediaSelection
|
|
492
512
|
}, null, 8, ["data", "previewList"]),
|
|
493
|
-
_ctx.flex ? (openBlock(), createElementBlock("span",
|
|
494
|
-
docSeriesShowTopThemeColor.value && styleData.value.top_theme_color ? (openBlock(), createElementBlock("div",
|
|
513
|
+
_ctx.flex ? (openBlock(), createElementBlock("span", _hoisted_19, "(\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px)")) : createCommentVNode("v-if", true),
|
|
514
|
+
docSeriesShowTopThemeColor.value && styleData.value.top_theme_color ? (openBlock(), createElementBlock("div", _hoisted_20, _hoisted_22)) : createCommentVNode("v-if", true),
|
|
495
515
|
docSeriesShowTopThemeColor.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
496
516
|
key: 2,
|
|
497
517
|
model: "top",
|
package/es/utils/doc.d.ts
CHANGED
package/es/utils/doc.js
CHANGED
|
@@ -101,4 +101,18 @@ const approvalItem = (item) => {
|
|
|
101
101
|
}
|
|
102
102
|
return item.approval_status;
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
function getDocThumb(item) {
|
|
105
|
+
if (item.preview_url) {
|
|
106
|
+
return item.preview_url;
|
|
107
|
+
}
|
|
108
|
+
if (item.style) {
|
|
109
|
+
let { style } = item;
|
|
110
|
+
if (typeof style === "string") {
|
|
111
|
+
style = JSON.parse(style);
|
|
112
|
+
return style.data && style.data[0] && style.data[0].thumb;
|
|
113
|
+
}
|
|
114
|
+
return style.data && style.data[0] && style.data[0].thumb;
|
|
115
|
+
}
|
|
116
|
+
return item.cover && item.cover.data && item.cover.data[0] && item.cover.data[0].thumb;
|
|
117
|
+
}
|
|
118
|
+
export { approvalItem, docPubStateMap, docSeries, docStateMap, docThumbArrMap, docThumbMap, docThumbObjMap, docThumbRatioMap, docThumbTypeMap, getDocThumb, stateOptions, typeOptions };
|
package/es/utils/typeMap.js
CHANGED
|
@@ -134,7 +134,7 @@ const local_live_doc_type = {
|
|
|
134
134
|
const local_live_doc_status = [
|
|
135
135
|
{ value: 0, label: "\u672A\u5F00\u59CB", bgColor: "#FF8000" },
|
|
136
136
|
{ value: 1, label: "\u76F4\u64AD\u4E2D", bgColor: "#FF192D" },
|
|
137
|
-
{ value: 2, label: "\u5DF2\u7ED3\u675F", bgColor: "
|
|
137
|
+
{ value: 2, label: "\u5DF2\u7ED3\u675F", bgColor: "rgba(0, 0, 0, 0.6)" }
|
|
138
138
|
];
|
|
139
139
|
const matrixPublishStateMap = {
|
|
140
140
|
0: "\u5F85\u53D1\u5E03",
|