@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.
@@ -5,6 +5,7 @@ var draggable = require("vuedraggable");
5
5
  var index = require("./components/Content/index.js");
6
6
  var index$1 = require("./components/Doc/index.js");
7
7
  var index$2 = require("./components/Records/index.js");
8
+ var index$3 = require("./components/CustomWrp/index.js");
8
9
  function _interopDefaultLegacy(e) {
9
10
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
10
11
  }
@@ -91,12 +92,12 @@ const _sfc_main = vue.defineComponent({
91
92
  onChange: sortChange,
92
93
  onStart: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("dragstart"))
93
94
  }, {
94
- item: vue.withCtx(({ element, index: index$3 }) => [
95
+ item: vue.withCtx(({ element, index: index$4 }) => [
95
96
  vue.createElementVNode("div", _hoisted_2, [
96
97
  props.type === "content" ? (vue.openBlock(), vue.createBlock(index, {
97
- key: index$3,
98
+ key: index$4,
98
99
  item: element,
99
- index: index$3,
100
+ index: index$4,
100
101
  parmas: vue.unref(parmasProps),
101
102
  abttrites: vue.unref(abttritesProps),
102
103
  extraAttrs: _ctx.extraAttrs,
@@ -107,21 +108,20 @@ const _sfc_main = vue.defineComponent({
107
108
  batch: vue.withCtx(() => [
108
109
  vue.renderSlot(_ctx.$slots, "batch", {
109
110
  row: element,
110
- index: index$3
111
+ index: index$4
111
112
  })
112
113
  ]),
113
114
  option: vue.withCtx(() => [
114
115
  vue.renderSlot(_ctx.$slots, "option", {
115
116
  row: element,
116
- index: index$3
117
+ index: index$4
117
118
  })
118
119
  ]),
119
120
  _: 2
120
- }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : vue.createCommentVNode("v-if", true),
121
- props.type === "doc" ? (vue.openBlock(), vue.createBlock(index$1, {
122
- key: index$3,
121
+ }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : props.type === "doc" ? (vue.openBlock(), vue.createBlock(index$1, {
122
+ key: index$4,
123
123
  item: element,
124
- index: index$3,
124
+ index: index$4,
125
125
  abttrites: vue.unref(abttritesProps),
126
126
  extraAttrs: _ctx.extraAttrs,
127
127
  onClickTitle: clickTitle,
@@ -131,27 +131,26 @@ const _sfc_main = vue.defineComponent({
131
131
  tip: vue.withCtx(() => [
132
132
  vue.renderSlot(_ctx.$slots, "tip", {
133
133
  row: element,
134
- index: index$3
134
+ index: index$4
135
135
  })
136
136
  ]),
137
137
  batch: vue.withCtx(() => [
138
138
  vue.renderSlot(_ctx.$slots, "batch", {
139
139
  row: element,
140
- index: index$3
140
+ index: index$4
141
141
  })
142
142
  ]),
143
143
  option: vue.withCtx(() => [
144
144
  vue.renderSlot(_ctx.$slots, "option", {
145
145
  row: element,
146
- index: index$3
146
+ index: index$4
147
147
  })
148
148
  ]),
149
149
  _: 2
150
- }, 1032, ["item", "index", "abttrites", "extraAttrs"])) : vue.createCommentVNode("v-if", true),
151
- props.type === "record" ? (vue.openBlock(), vue.createBlock(index$2, {
152
- key: index$3,
150
+ }, 1032, ["item", "index", "abttrites", "extraAttrs"])) : props.type === "record" ? (vue.openBlock(), vue.createBlock(index$2, {
151
+ key: index$4,
153
152
  item: element,
154
- index: index$3,
153
+ index: index$4,
155
154
  parmas: vue.unref(parmasProps),
156
155
  abttrites: vue.unref(abttritesProps),
157
156
  extraAttrs: _ctx.extraAttrs,
@@ -162,26 +161,55 @@ const _sfc_main = vue.defineComponent({
162
161
  batch: vue.withCtx(() => [
163
162
  vue.renderSlot(_ctx.$slots, "batch", {
164
163
  row: element,
165
- index: index$3
164
+ index: index$4
166
165
  })
167
166
  ]),
168
167
  option: vue.withCtx(() => [
169
168
  vue.renderSlot(_ctx.$slots, "option", {
170
169
  row: element,
171
- index: index$3
170
+ index: index$4
172
171
  })
173
172
  ]),
174
173
  _: 2
175
- }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : vue.createCommentVNode("v-if", true)
174
+ }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : (vue.openBlock(), vue.createBlock(index$3, {
175
+ key: 3,
176
+ item: element,
177
+ index: index$4,
178
+ abttrites: vue.unref(abttritesProps),
179
+ extraAttrs: _ctx.extraAttrs,
180
+ onClickTitle: clickTitle,
181
+ onCellMouseEnter: tableCellMouseEnter,
182
+ onCellMouseLeave: tableCellMouseLeave
183
+ }, {
184
+ tip: vue.withCtx(() => [
185
+ vue.renderSlot(_ctx.$slots, "tip", {
186
+ row: element,
187
+ index: index$4
188
+ })
189
+ ]),
190
+ batch: vue.withCtx(() => [
191
+ vue.renderSlot(_ctx.$slots, "batch", {
192
+ row: element,
193
+ index: index$4
194
+ })
195
+ ]),
196
+ option: vue.withCtx(() => [
197
+ vue.renderSlot(_ctx.$slots, "option", {
198
+ row: element,
199
+ index: index$4
200
+ })
201
+ ]),
202
+ _: 2
203
+ }, 1032, ["item", "index", "abttrites", "extraAttrs"]))
176
204
  ])
177
205
  ]),
178
206
  _: 3
179
- }, 8, ["modelValue", "sort"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(dataList.value, (item, index$3) => {
180
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index$3 }, [
207
+ }, 8, ["modelValue", "sort"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(dataList.value, (item, index$4) => {
208
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index$4 }, [
181
209
  props.type === "content" ? (vue.openBlock(), vue.createBlock(index, {
182
- key: index$3,
210
+ key: index$4,
183
211
  item,
184
- index: index$3,
212
+ index: index$4,
185
213
  parmas: vue.unref(parmasProps),
186
214
  abttrites: vue.unref(abttritesProps),
187
215
  extraAttrs: _ctx.extraAttrs,
@@ -192,21 +220,20 @@ const _sfc_main = vue.defineComponent({
192
220
  batch: vue.withCtx(() => [
193
221
  vue.renderSlot(_ctx.$slots, "batch", {
194
222
  row: item,
195
- index: index$3
223
+ index: index$4
196
224
  })
197
225
  ]),
198
226
  option: vue.withCtx(() => [
199
227
  vue.renderSlot(_ctx.$slots, "option", {
200
228
  row: item,
201
- index: index$3
229
+ index: index$4
202
230
  })
203
231
  ]),
204
232
  _: 2
205
- }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : vue.createCommentVNode("v-if", true),
206
- props.type === "doc" ? (vue.openBlock(), vue.createBlock(index$1, {
207
- key: index$3,
233
+ }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : props.type === "doc" ? (vue.openBlock(), vue.createBlock(index$1, {
234
+ key: index$4,
208
235
  item,
209
- index: index$3,
236
+ index: index$4,
210
237
  abttrites: vue.unref(abttritesProps),
211
238
  extraAttrs: _ctx.extraAttrs,
212
239
  onClickTitle: clickTitle,
@@ -216,27 +243,26 @@ const _sfc_main = vue.defineComponent({
216
243
  tip: vue.withCtx(() => [
217
244
  vue.renderSlot(_ctx.$slots, "tip", {
218
245
  row: item,
219
- index: index$3
246
+ index: index$4
220
247
  })
221
248
  ]),
222
249
  batch: vue.withCtx(() => [
223
250
  vue.renderSlot(_ctx.$slots, "batch", {
224
251
  row: item,
225
- index: index$3
252
+ index: index$4
226
253
  })
227
254
  ]),
228
255
  option: vue.withCtx(() => [
229
256
  vue.renderSlot(_ctx.$slots, "option", {
230
257
  row: item,
231
- index: index$3
258
+ index: index$4
232
259
  })
233
260
  ]),
234
261
  _: 2
235
- }, 1032, ["item", "index", "abttrites", "extraAttrs"])) : vue.createCommentVNode("v-if", true),
236
- props.type === "record" ? (vue.openBlock(), vue.createBlock(index$2, {
237
- key: index$3,
262
+ }, 1032, ["item", "index", "abttrites", "extraAttrs"])) : props.type === "record" ? (vue.openBlock(), vue.createBlock(index$2, {
263
+ key: index$4,
238
264
  item,
239
- index: index$3,
265
+ index: index$4,
240
266
  parmas: vue.unref(parmasProps),
241
267
  abttrites: vue.unref(abttritesProps),
242
268
  extraAttrs: _ctx.extraAttrs,
@@ -247,17 +273,46 @@ const _sfc_main = vue.defineComponent({
247
273
  batch: vue.withCtx(() => [
248
274
  vue.renderSlot(_ctx.$slots, "batch", {
249
275
  row: item,
250
- index: index$3
276
+ index: index$4
277
+ })
278
+ ]),
279
+ option: vue.withCtx(() => [
280
+ vue.renderSlot(_ctx.$slots, "option", {
281
+ row: item,
282
+ index: index$4
283
+ })
284
+ ]),
285
+ _: 2
286
+ }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : (vue.openBlock(), vue.createBlock(index$3, {
287
+ key: 3,
288
+ item,
289
+ index: index$4,
290
+ abttrites: vue.unref(abttritesProps),
291
+ extraAttrs: _ctx.extraAttrs,
292
+ onClickTitle: clickTitle,
293
+ onCellMouseEnter: tableCellMouseEnter,
294
+ onCellMouseLeave: tableCellMouseLeave
295
+ }, {
296
+ tip: vue.withCtx(() => [
297
+ vue.renderSlot(_ctx.$slots, "tip", {
298
+ row: item,
299
+ index: index$4
300
+ })
301
+ ]),
302
+ batch: vue.withCtx(() => [
303
+ vue.renderSlot(_ctx.$slots, "batch", {
304
+ row: item,
305
+ index: index$4
251
306
  })
252
307
  ]),
253
308
  option: vue.withCtx(() => [
254
309
  vue.renderSlot(_ctx.$slots, "option", {
255
310
  row: item,
256
- index: index$3
311
+ index: index$4
257
312
  })
258
313
  ]),
259
314
  _: 2
260
- }, 1032, ["item", "index", "parmas", "abttrites", "extraAttrs"])) : vue.createCommentVNode("v-if", true)
315
+ }, 1032, ["item", "index", "abttrites", "extraAttrs"]))
261
316
  ], 64);
262
317
  }), 128))
263
318
  ])
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var doc = require("../../../utils/doc.js");
5
+ var index = require("../../../utils/index.js");
6
+ const _hoisted_1 = { class: "cover-view" };
7
+ const _hoisted_2 = {
8
+ key: 1,
9
+ class: "no-img"
10
+ };
11
+ const _hoisted_3 = { class: "batch-select" };
12
+ const _hoisted_4 = { class: "info-view" };
13
+ const _hoisted_5 = { class: "abttrite-v" };
14
+ const _hoisted_6 = { class: "left" };
15
+ const _hoisted_7 = { class: "right" };
16
+ const _sfc_main = vue.defineComponent({
17
+ __name: "CustomItem",
18
+ props: {
19
+ item: {},
20
+ showAttrs: {},
21
+ thumbKey: {}
22
+ },
23
+ emits: ["clickTitle", "cellMouseEnter", "cellMouseLeave"],
24
+ setup(__props, { emit: __emit }) {
25
+ const props = __props;
26
+ const emit = __emit;
27
+ const title = vue.computed(() => {
28
+ const { alias, title: title2 } = props.item;
29
+ return alias || title2;
30
+ });
31
+ const thumb = vue.computed(() => {
32
+ if (!props.item)
33
+ return null;
34
+ if (!props.thumbKey) {
35
+ return doc.getDocThumb(props.item);
36
+ }
37
+ return props.item[props.thumbKey];
38
+ });
39
+ const noImgText = vue.computed(() => {
40
+ if (title.value)
41
+ return "\u65E0\u56FE";
42
+ return index.noCoverText(props.item);
43
+ });
44
+ const hide = vue.computed(() => {
45
+ const { hide: hide2 } = props.item;
46
+ return hide2 === 7 || hide2 === 6;
47
+ });
48
+ const silent = vue.computed(() => {
49
+ return props.item && props.item.mourn_style === 1;
50
+ });
51
+ const attributes = vue.ref([]);
52
+ function initAttributes() {
53
+ if (!props.showAttrs)
54
+ return;
55
+ attributes.value = props.showAttrs.map((item) => {
56
+ let value = "--";
57
+ if (item.key)
58
+ value = props.item[item.key] || "--";
59
+ else if (item.getValue)
60
+ value = item.getValue(props.item) || "--";
61
+ return {
62
+ value,
63
+ ...item
64
+ };
65
+ });
66
+ }
67
+ const mouseEnterFun = (event, row) => {
68
+ emit("cellMouseEnter", { row, event });
69
+ };
70
+ const mouseLeaveFun = (event, row) => {
71
+ emit("cellMouseLeave", { row, event });
72
+ };
73
+ const clickTitle = () => {
74
+ emit("clickTitle", props.item);
75
+ };
76
+ vue.onMounted(() => {
77
+ initAttributes();
78
+ });
79
+ return (_ctx, _cache) => {
80
+ return vue.openBlock(), vue.createElementBlock("div", {
81
+ class: vue.normalizeClass(["medialist-doc-item-view", { "gray-forbidden": hide.value, "gray-for-state-hide": silent.value }]),
82
+ onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseEnterFun($event, _ctx.item)),
83
+ onMouseleave: _cache[1] || (_cache[1] = ($event) => mouseLeaveFun($event, _ctx.item))
84
+ }, [
85
+ vue.createElementVNode("div", _hoisted_1, [
86
+ vue.createCommentVNode(" \u5C01\u9762 "),
87
+ thumb.value ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Image), {
88
+ key: 0,
89
+ class: "image",
90
+ src: thumb.value,
91
+ preview: false,
92
+ fit: "cover"
93
+ }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(noImgText.value), 1)),
94
+ vue.createElementVNode("div", _hoisted_3, [
95
+ vue.renderSlot(_ctx.$slots, "batch", { row: _ctx.item })
96
+ ])
97
+ ]),
98
+ vue.createCommentVNode(" \u4FE1\u606F "),
99
+ vue.createElementVNode("div", _hoisted_4, [
100
+ vue.createCommentVNode(" \u6807\u9898 "),
101
+ vue.createElementVNode("div", {
102
+ class: "title",
103
+ onClick: clickTitle
104
+ }, [
105
+ vue.renderSlot(_ctx.$slots, "index"),
106
+ vue.createTextVNode(" " + vue.toDisplayString(title.value || "\u2014\u2014"), 1)
107
+ ]),
108
+ vue.createCommentVNode(" \u5143\u4FE1\u606F "),
109
+ vue.createElementVNode("div", _hoisted_5, [
110
+ vue.createElementVNode("div", _hoisted_6, [
111
+ vue.createCommentVNode(" \u524D\u7F00 "),
112
+ vue.renderSlot(_ctx.$slots, "tip"),
113
+ vue.createCommentVNode(" \u5C5E\u6027 "),
114
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(attributes.value, (attr, index2) => {
115
+ return vue.openBlock(), vue.createElementBlock("span", {
116
+ key: index2,
117
+ class: "abttr"
118
+ }, [
119
+ vue.createVNode(vue.unref(webVue.Tooltip), {
120
+ content: `${attr.label}: ${attr.value}`,
121
+ placement: "top"
122
+ }, {
123
+ default: vue.withCtx(() => [
124
+ vue.createElementVNode("span", null, vue.toDisplayString(attr.value || "--"), 1)
125
+ ]),
126
+ _: 2
127
+ }, 1032, ["content"])
128
+ ]);
129
+ }), 128))
130
+ ]),
131
+ vue.createElementVNode("div", _hoisted_7, [
132
+ vue.createCommentVNode(" \u540E\u7F00 "),
133
+ vue.renderSlot(_ctx.$slots, "option", { row: _ctx.item })
134
+ ])
135
+ ])
136
+ ])
137
+ ], 34);
138
+ };
139
+ }
140
+ });
141
+ module.exports = _sfc_main;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var CustomItem = require("./CustomItem.js");
4
+ const _sfc_main = vue.defineComponent({
5
+ __name: "index",
6
+ props: {
7
+ abttrites: {},
8
+ extraAttrs: {},
9
+ item: {},
10
+ index: {}
11
+ },
12
+ emits: ["cellMouseEnter", "cellMouseLeave", "clickTitle"],
13
+ setup(__props, { emit: __emit }) {
14
+ const props = __props;
15
+ const emit = __emit;
16
+ const customMeta = vue.computed(() => {
17
+ return props.extraAttrs.custom || {};
18
+ });
19
+ const cellMouseEnter = (params) => {
20
+ emit("cellMouseEnter", params);
21
+ };
22
+ const cellMouseLeave = (params) => {
23
+ emit("cellMouseLeave", params);
24
+ };
25
+ const clickTitle = (item) => {
26
+ emit("clickTitle", item);
27
+ };
28
+ return (_ctx, _cache) => {
29
+ return vue.openBlock(), vue.createBlock(CustomItem, {
30
+ item: _ctx.item,
31
+ abttrites: _ctx.abttrites,
32
+ "thumb-key": customMeta.value.thumbKey,
33
+ "show-attrs": customMeta.value.showAttrs,
34
+ onCellMouseEnter: cellMouseEnter,
35
+ onCellMouseLeave: cellMouseLeave,
36
+ onClickTitle: clickTitle
37
+ }, {
38
+ tip: vue.withCtx(() => [
39
+ vue.renderSlot(_ctx.$slots, "tip", {
40
+ row: _ctx.item,
41
+ index: _ctx.index
42
+ })
43
+ ]),
44
+ batch: vue.withCtx(() => [
45
+ vue.renderSlot(_ctx.$slots, "batch", {
46
+ row: _ctx.item,
47
+ index: _ctx.index
48
+ })
49
+ ]),
50
+ option: vue.withCtx(() => [
51
+ vue.renderSlot(_ctx.$slots, "option", {
52
+ row: _ctx.item,
53
+ index: _ctx.index
54
+ })
55
+ ]),
56
+ _: 3
57
+ }, 8, ["item", "abttrites", "thumb-key", "show-attrs"]);
58
+ };
59
+ }
60
+ });
61
+ module.exports = _sfc_main;