@cmstops/pro-compo 0.3.9 → 0.3.11

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.
@@ -7,60 +7,59 @@ var component$1 = require("../imageCrop/component.js");
7
7
  var card = require("./components/card.js");
8
8
  var colorPalette = require("./components/colorPalette.js");
9
9
  var config = require("../config.js");
10
- const _hoisted_1 = { class: "select-thumb-container" };
11
- const _hoisted_2 = {
10
+ const _hoisted_1 = {
12
11
  key: 0,
13
12
  class: "star"
14
13
  };
15
- const _hoisted_3 = {
14
+ const _hoisted_2 = {
16
15
  key: 1,
17
16
  style: { "margin-left": "10px" },
18
17
  class: "tip"
19
18
  };
20
- const _hoisted_4 = { class: "thumbbox" };
21
- const _hoisted_5 = {
19
+ const _hoisted_3 = { class: "thumbbox" };
20
+ const _hoisted_4 = {
22
21
  key: 0,
23
22
  class: "thumb-list-view"
24
23
  };
25
- const _hoisted_6 = { class: "thumb-list-view" };
26
- const _hoisted_7 = { style: { "margin-top": "-10px" } };
27
- const _hoisted_8 = {
24
+ const _hoisted_5 = { class: "thumb-list-view" };
25
+ const _hoisted_6 = { style: { "margin-top": "-10px" } };
26
+ const _hoisted_7 = {
28
27
  key: 0,
29
28
  class: "tip"
30
29
  };
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 = {
30
+ const _hoisted_8 = /* @__PURE__ */ vue.createElementVNode("span", { style: { "margin-right": "10px" } }, "\u72EC\u7ACB\u8F6E\u64AD\u56FE", -1);
31
+ const _hoisted_9 = { class: "thumbbox" };
32
+ const _hoisted_10 = {
34
33
  key: 2,
35
34
  class: "title"
36
35
  };
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
36
+ const _hoisted_11 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u72EC\u7ACB\u8F6E\u64AD\u56FE\u80CC\u666F\u989C\u8272", -1);
37
+ const _hoisted_12 = [
38
+ _hoisted_11
40
39
  ];
41
- const _hoisted_14 = { key: 0 };
42
- const _hoisted_15 = {
40
+ const _hoisted_13 = { key: 0 };
41
+ const _hoisted_14 = {
43
42
  key: 0,
44
43
  class: "star"
45
44
  };
46
- const _hoisted_16 = { key: 1 };
47
- const _hoisted_17 = {
45
+ const _hoisted_15 = { key: 1 };
46
+ const _hoisted_16 = {
48
47
  key: 2,
49
48
  class: "tip",
50
49
  style: { "margin-left": "10px" }
51
50
  };
52
- const _hoisted_18 = { class: "thumbbox" };
53
- const _hoisted_19 = {
51
+ const _hoisted_17 = { class: "thumbbox" };
52
+ const _hoisted_18 = {
54
53
  key: 0,
55
54
  class: "tip"
56
55
  };
57
- const _hoisted_20 = {
56
+ const _hoisted_19 = {
58
57
  key: 1,
59
58
  class: "title"
60
59
  };
61
- const _hoisted_21 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u56FE\u7247\u80CC\u666F\u989C\u8272", -1);
62
- const _hoisted_22 = [
63
- _hoisted_21
60
+ const _hoisted_20 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u56FE\u7247\u80CC\u666F\u989C\u8272", -1);
61
+ const _hoisted_21 = [
62
+ _hoisted_20
64
63
  ];
65
64
  const _sfc_main = vue.defineComponent({
66
65
  ...{ name: "selectThumb" },
@@ -88,6 +87,7 @@ const _sfc_main = vue.defineComponent({
88
87
  const emit = __emit;
89
88
  const props = __props;
90
89
  const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
90
+ const selectThumbRef = vue.ref();
91
91
  const oldData = vue.ref(null);
92
92
  const styleData = vue.ref({});
93
93
  const thumbBannerModel = vue.ref("banner");
@@ -96,6 +96,7 @@ const _sfc_main = vue.defineComponent({
96
96
  const thumbOptionIndex = vue.ref(0);
97
97
  const aspectRatioProp = vue.ref(16 / 9);
98
98
  const cropperData = vue.ref([]);
99
+ const tempThumbFiles = vue.ref([]);
99
100
  if (props.mediaUseType) {
100
101
  vue.provide("mediaUseType", props.mediaUseType);
101
102
  }
@@ -219,13 +220,27 @@ const _sfc_main = vue.defineComponent({
219
220
  }
220
221
  return modelList.value.find((item) => item.value === model.value);
221
222
  });
222
- const thumbList = vue.computed(() => {
223
- var _a;
224
- return ((_a = styleData.value) == null ? void 0 : _a.data) || [];
223
+ const thumbList = vue.computed({
224
+ get() {
225
+ var _a;
226
+ return ((_a = styleData.value) == null ? void 0 : _a.data) || [];
227
+ },
228
+ set(value) {
229
+ styleData.value.data = value || [];
230
+ }
225
231
  });
226
232
  const previewList = vue.computed(() => {
227
233
  return thumbList.value.map((item) => item.url);
228
234
  });
235
+ const fileForShowThumb = (data) => {
236
+ tempThumbFiles.value.push(data);
237
+ submitCallback(tempThumbFiles.value);
238
+ };
239
+ const changeThumbType = (type, index) => {
240
+ tempThumbFiles.value = [];
241
+ thumbBannerModel.value = type;
242
+ thumbOptionIndex.value = index;
243
+ };
229
244
  const openDialogMediaSelection = (type, index) => {
230
245
  thumbBannerModel.value = type || "thumb";
231
246
  thumbOptionIndex.value = index || 0;
@@ -251,8 +266,14 @@ const _sfc_main = vue.defineComponent({
251
266
  } else if (thumbBannerModel.value === "thumb") {
252
267
  let temp = [];
253
268
  if (model.value === "1") {
269
+ let idx = 0;
254
270
  temp = JSON.parse(JSON.stringify(styleData.value.data));
255
- temp[thumbOptionIndex.value] = { url: data[0].url, thumb: data[0].url };
271
+ for (let i = thumbOptionIndex.value; i < thumbOptionIndex.value + data.length; i++) {
272
+ if (i >= 3)
273
+ return;
274
+ temp[i] = { url: data[idx].url, thumb: data[idx].url };
275
+ idx++;
276
+ }
256
277
  } else {
257
278
  temp = [{ url: data[0].url, thumb: data[0].url }];
258
279
  }
@@ -315,9 +336,14 @@ const _sfc_main = vue.defineComponent({
315
336
  }
316
337
  callback(styleData.value);
317
338
  };
318
- const banner = vue.computed(() => {
319
- const { banner: banner2, banner_theme_color, banner_url } = styleData.value;
320
- return { banner: banner2, banner_theme_color, url: banner_url };
339
+ const banner = vue.computed({
340
+ get() {
341
+ const { banner: banner2, banner_theme_color, banner_url } = styleData.value;
342
+ return { banner: banner2, banner_theme_color, url: banner_url };
343
+ },
344
+ set(value) {
345
+ styleData.value.banner_url = value.url;
346
+ }
321
347
  });
322
348
  const hasBanner = vue.computed({
323
349
  get() {
@@ -329,16 +355,25 @@ const _sfc_main = vue.defineComponent({
329
355
  callback(styleData.value);
330
356
  }
331
357
  });
332
- const pcBanner = vue.computed(() => {
333
- const { pc_banner_url_info, pc_banner_url } = styleData.value;
334
- return { pc_banner_url_info, url: pc_banner_url };
358
+ const pcBanner = vue.computed({
359
+ get() {
360
+ const { pc_banner_url_info, pc_banner_url } = styleData.value;
361
+ return { pc_banner_url_info, url: pc_banner_url };
362
+ },
363
+ set(value) {
364
+ styleData.value.pc_banner_url = value.url;
365
+ }
335
366
  });
336
367
  const colorChange = (styleData2) => {
337
368
  callback(styleData2);
338
369
  };
339
370
  return (_ctx, _cache) => {
340
371
  var _a, _b, _c, _d, _e, _f;
341
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
372
+ return vue.openBlock(), vue.createElementBlock("div", {
373
+ ref_key: "selectThumbRef",
374
+ ref: selectThumbRef,
375
+ class: "select-thumb-container"
376
+ }, [
342
377
  vue.createCommentVNode(" \u5C01\u9762\u6807\u9898"),
343
378
  vue.createElementVNode("div", {
344
379
  class: vue.normalizeClass(["banner-view", { flex: _ctx.flex }])
@@ -348,46 +383,54 @@ const _sfc_main = vue.defineComponent({
348
383
  class: "title",
349
384
  style: vue.normalizeStyle({ width: _ctx.offset })
350
385
  }, [
351
- _ctx.titleValid ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, "*")) : vue.createCommentVNode("v-if", true),
386
+ _ctx.titleValid ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, "*")) : vue.createCommentVNode("v-if", true),
352
387
  vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title ? _ctx.title : "\u5C01\u9762"), 1),
353
388
  vue.createCommentVNode(" \u4E0A\u4E0B\u5E03\u5C40\u663E\u793A tip"),
354
- ((_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)
389
+ ((_a = curtemplate.value) == null ? void 0 : _a.value) !== "4" && !_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, " (" + 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)
355
390
  ], 4)) : vue.createCommentVNode("v-if", true),
356
- vue.createElementVNode("div", _hoisted_4, [
357
- ["thumbs"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
391
+ vue.createElementVNode("div", _hoisted_3, [
392
+ ["thumbs"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
358
393
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(thumbsLengthList.value, (item, index) => {
359
394
  return vue.openBlock(), vue.createBlock(card, {
360
395
  key: index,
361
396
  id: `thumb-card-${index}`,
362
397
  data: thumbList.value[index],
363
398
  "onUpdate:data": ($event) => thumbList.value[index] = $event,
399
+ parentRef: selectThumbRef.value,
400
+ idx: index,
364
401
  "preview-list": previewList.value,
365
402
  "thumb-model": "thumb",
403
+ onFileForShowThumb: fileForShowThumb,
404
+ onChangeThumbType: changeThumbType,
366
405
  onUploadLocal: _cache[0] || (_cache[0] = (cb) => _ctx.$emit("upload", cb)),
367
406
  onOpen: ($event) => openDialogMediaSelection($event, index)
368
- }, null, 8, ["id", "data", "onUpdate:data", "preview-list", "onOpen"]);
407
+ }, null, 8, ["id", "data", "onUpdate:data", "parentRef", "idx", "preview-list", "onOpen"]);
369
408
  }), 128))
370
409
  ])) : currentModel.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
371
410
  vue.createCommentVNode(" \u5C01\u9762\u56FEcard "),
372
- vue.createElementVNode("div", _hoisted_6, [
411
+ vue.createElementVNode("div", _hoisted_5, [
373
412
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(currentModel.value.maxLength, (item, index) => {
374
413
  return vue.openBlock(), vue.createBlock(card, {
375
414
  key: index,
376
415
  id: `thumb-card-${index}`,
377
416
  data: thumbList.value[index],
378
417
  "onUpdate:data": ($event) => thumbList.value[index] = $event,
418
+ parentRef: selectThumbRef.value,
379
419
  model: model.value,
420
+ idx: index,
380
421
  "preview-list": previewList.value,
381
422
  "thumb-model": "thumb",
423
+ onFileForShowThumb: fileForShowThumb,
424
+ onChangeThumbType: changeThumbType,
382
425
  onUploadLocal: _cache[1] || (_cache[1] = (cb) => _ctx.$emit("upload", cb)),
383
426
  onOpen: ($event) => openDialogMediaSelection($event, index)
384
- }, null, 8, ["id", "data", "onUpdate:data", "model", "preview-list", "onOpen"]);
427
+ }, null, 8, ["id", "data", "onUpdate:data", "parentRef", "model", "idx", "preview-list", "onOpen"]);
385
428
  }), 128))
386
429
  ])
387
430
  ], 2112)) : vue.createCommentVNode("v-if", true),
388
431
  vue.createCommentVNode(" \u5DE6\u53F3\u5E03\u5C40\u663E\u793Atip "),
389
- vue.createElementVNode("div", _hoisted_7, [
390
- ((_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)
432
+ vue.createElementVNode("div", _hoisted_6, [
433
+ ((_d = curtemplate.value) == null ? void 0 : _d.value) !== "4" && _ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7, " (" + 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)
391
434
  ]),
392
435
  ["doc"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
393
436
  vue.createCommentVNode(" \u9009\u62E9\u5927\u56FE\u3001\u4E09\u56FE\u3001\u5355\u56FE...\u7B49\u6A21\u5F0F "),
@@ -426,7 +469,7 @@ const _sfc_main = vue.defineComponent({
426
469
  class: "title",
427
470
  style: vue.normalizeStyle({ width: _ctx.offset })
428
471
  }, [
429
- _hoisted_9,
472
+ _hoisted_8,
430
473
  vue.createCommentVNode(" \u4E0A\u4E0B\u5E03\u5C40\u5F00\u5173\u5728\u6807\u9898\u540E "),
431
474
  !_ctx.flex ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Switch), {
432
475
  key: 0,
@@ -435,7 +478,7 @@ const _sfc_main = vue.defineComponent({
435
478
  size: "small"
436
479
  }, null, 8, ["modelValue"])) : vue.createCommentVNode("v-if", true)
437
480
  ], 4),
438
- vue.createElementVNode("div", _hoisted_10, [
481
+ vue.createElementVNode("div", _hoisted_9, [
439
482
  vue.createCommentVNode(" \u5DE6\u53F3\u5E03\u5C40\u5F00\u5173\u663E\u793A "),
440
483
  _ctx.flex ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Switch), {
441
484
  key: 0,
@@ -449,12 +492,15 @@ const _sfc_main = vue.defineComponent({
449
492
  id: `banner-card`,
450
493
  data: banner.value,
451
494
  "onUpdate:data": _cache[5] || (_cache[5] = ($event) => banner.value = $event),
495
+ parentRef: selectThumbRef.value,
452
496
  "preview-list": previewList.value,
453
497
  "thumb-model": "banner",
498
+ onFileForShowThumb: fileForShowThumb,
499
+ onChangeThumbType: changeThumbType,
454
500
  onUploadLocal: _cache[6] || (_cache[6] = (cb) => _ctx.$emit("upload", cb)),
455
501
  onOpen: openDialogMediaSelection
456
- }, null, 8, ["data", "preview-list"])) : vue.createCommentVNode("v-if", true),
457
- hasBanner.value && styleData.value.banner_theme_color ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, _hoisted_13)) : vue.createCommentVNode("v-if", true),
502
+ }, null, 8, ["data", "parentRef", "preview-list"])) : vue.createCommentVNode("v-if", true),
503
+ hasBanner.value && styleData.value.banner_theme_color ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, _hoisted_12)) : vue.createCommentVNode("v-if", true),
458
504
  vue.createCommentVNode(" banner\u8C03\u8272\u677F "),
459
505
  hasBanner.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
460
506
  key: 3,
@@ -472,24 +518,27 @@ const _sfc_main = vue.defineComponent({
472
518
  class: "title",
473
519
  style: vue.normalizeStyle({ width: _ctx.offset })
474
520
  }, [
475
- docSeriesShowTopThemeColor.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14, [
476
- _ctx.topImageTitleValid ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_15, "*")) : vue.createCommentVNode("v-if", true),
521
+ docSeriesShowTopThemeColor.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_13, [
522
+ _ctx.topImageTitleValid ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14, "*")) : vue.createCommentVNode("v-if", true),
477
523
  vue.createElementVNode("span", null, vue.toDisplayString(_ctx.topImageTitle || "\u5C01\u9762\u5934\u56FE"), 1)
478
- ])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_16, "PC\u5C01\u9762\u56FE")),
479
- !_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_17, " (\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px) ")) : vue.createCommentVNode("v-if", true)
524
+ ])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_15, "PC\u5C01\u9762\u56FE")),
525
+ !_ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_16, " (\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px) ")) : vue.createCommentVNode("v-if", true)
480
526
  ], 4),
481
- vue.createElementVNode("div", _hoisted_18, [
527
+ vue.createElementVNode("div", _hoisted_17, [
482
528
  vue.createVNode(card, {
483
529
  id: `pc-banner-card`,
484
530
  data: pcBanner.value,
485
531
  "onUpdate:data": _cache[7] || (_cache[7] = ($event) => pcBanner.value = $event),
532
+ parentRef: selectThumbRef.value,
486
533
  previewList: previewList.value,
487
534
  thumbModel: "pcBanner",
535
+ onFileForShowThumb: fileForShowThumb,
536
+ onChangeThumbType: changeThumbType,
488
537
  onUploadLocal: _cache[8] || (_cache[8] = (cb) => _ctx.$emit("upload", cb)),
489
538
  onOpen: openDialogMediaSelection
490
- }, null, 8, ["data", "previewList"]),
491
- _ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_19, "(\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px)")) : vue.createCommentVNode("v-if", true),
492
- docSeriesShowTopThemeColor.value && styleData.value.top_theme_color ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, _hoisted_22)) : vue.createCommentVNode("v-if", true),
539
+ }, null, 8, ["data", "parentRef", "previewList"]),
540
+ _ctx.flex ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_18, "(\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A1242px*662px)")) : vue.createCommentVNode("v-if", true),
541
+ docSeriesShowTopThemeColor.value && styleData.value.top_theme_color ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, _hoisted_21)) : vue.createCommentVNode("v-if", true),
493
542
  docSeriesShowTopThemeColor.value ? (vue.openBlock(), vue.createBlock(colorPalette, {
494
543
  key: 2,
495
544
  model: "top",
@@ -519,7 +568,7 @@ const _sfc_main = vue.defineComponent({
519
568
  "generate-assets": false,
520
569
  onConfirm: cropConfirm
521
570
  }, null, 8, ["visible", "aspect-ratio-prop", "BASE_API", "corp-data"])) : vue.createCommentVNode("v-if", true)
522
- ]);
571
+ ], 512);
523
572
  };
524
573
  }
525
574
  });
@@ -14,11 +14,20 @@ const _sfc_main = vue.defineComponent({
14
14
  data: {},
15
15
  previewList: {},
16
16
  thumbModel: {},
17
+ parentRef: {},
18
+ idx: {},
17
19
  along: { type: Boolean },
18
- model: {},
19
- changeThumbModel: { type: Function }
20
+ model: {}
20
21
  },
21
- emits: ["open", "remove", "uploadLocal", "update:data"],
22
+ emits: [
23
+ "open",
24
+ "remove",
25
+ "change",
26
+ "changeThumbType",
27
+ "fileForShowThumb",
28
+ "uploadLocal",
29
+ "update:data"
30
+ ],
22
31
  setup(__props, { emit: __emit }) {
23
32
  const waterBg = `${config.DEFAULT_BASE_API}/static/images/waterBg.png`;
24
33
  const props = __props;
@@ -31,22 +40,20 @@ const _sfc_main = vue.defineComponent({
31
40
  [`model-${props.model}`]: ((_a = props.data) == null ? void 0 : _a.url) && props.model
32
41
  };
33
42
  });
34
- const btnStyle = vue.computed(() => {
35
- return {
36
- padding: "5px 10px",
37
- cursor: "pointer"
38
- };
39
- });
40
43
  const clickMask = () => {
41
44
  props.along && openDialogMediaSelection();
42
45
  };
43
46
  const loaclUpload = () => {
47
+ emit("changeThumbType", props.thumbModel, props.idx || 0);
44
48
  emit("uploadLocal", (file) => {
45
- const { data } = props;
46
- if (!data || !file)
49
+ let { data } = props;
50
+ if (!file)
47
51
  return;
52
+ if (!data) {
53
+ data = {};
54
+ }
48
55
  data.url = file.url;
49
- emit("update:data", data);
56
+ emit("fileForShowThumb", data);
50
57
  });
51
58
  };
52
59
  const openDialogMediaSelection = () => {
@@ -57,21 +64,16 @@ const _sfc_main = vue.defineComponent({
57
64
  };
58
65
  return (_ctx, _cache) => {
59
66
  return vue.openBlock(), vue.createBlock(vue.unref(webVue.Popover), {
60
- trigger: "hover",
61
- "content-style": "padding: 0;"
67
+ trigger: "click",
68
+ position: "bottom",
69
+ "popup-container": props.parentRef
62
70
  }, {
63
71
  content: vue.withCtx(() => [
64
- vue.createElementVNode("div", {
65
- style: vue.normalizeStyle(btnStyle.value),
66
- onClick: openDialogMediaSelection
67
- }, "\u7D20\u6750\u5E93\u9009\u62E9", 4),
68
- vue.createElementVNode("div", {
69
- style: vue.normalizeStyle(btnStyle.value),
70
- onClick: loaclUpload
71
- }, "\u672C\u5730\u4E0A\u4F20", 4)
72
+ vue.createElementVNode("div", { onClick: openDialogMediaSelection }, "\u7D20\u6750\u5E93\u9009\u62E9"),
73
+ vue.createElementVNode("div", { onClick: loaclUpload }, "\u672C\u5730\u4E0A\u4F20")
72
74
  ]),
73
75
  default: vue.withCtx(() => {
74
- var _a, _b;
76
+ var _a;
75
77
  return [
76
78
  vue.createElementVNode("div", {
77
79
  class: vue.normalizeClass(["thumb-card-container", classObj.value])
@@ -80,7 +82,8 @@ const _sfc_main = vue.defineComponent({
80
82
  vue.createVNode(vue.unref(webVue.Image), {
81
83
  class: "item",
82
84
  fit: "cover",
83
- src: (_b = props.data) == null ? void 0 : _b.url
85
+ src: props.data.url,
86
+ "show-loader": ""
84
87
  }, null, 8, ["src"]),
85
88
  vue.createVNode(vue.Transition, { name: "fade" }, {
86
89
  default: vue.withCtx(() => [
@@ -116,7 +119,7 @@ const _sfc_main = vue.defineComponent({
116
119
  ];
117
120
  }),
118
121
  _: 1
119
- });
122
+ }, 8, ["popup-container"]);
120
123
  };
121
124
  }
122
125
  });
@@ -108,6 +108,16 @@
108
108
  transition: transform 0.15s ease-in 0.05s;
109
109
  transform-origin: center;
110
110
  }
111
+ .select-thumb-container .arco-trigger-popup .arco-popover-popup-content {
112
+ padding: 0;
113
+ }
114
+ .select-thumb-container .arco-trigger-popup .arco-popover-popup-content .arco-popover-content div {
115
+ padding: 5px 10px;
116
+ }
117
+ .select-thumb-container .arco-trigger-popup .arco-popover-popup-content .arco-popover-content div:hover {
118
+ background-color: #f3f6f9;
119
+ cursor: pointer;
120
+ }
111
121
  .select-thumb-container .title {
112
122
  margin-bottom: 10px;
113
123
  color: #4e5969;
@@ -3,6 +3,23 @@
3
3
  @import './card.less';
4
4
  @import './colorPalette.less';
5
5
 
6
+ .arco-trigger-popup {
7
+ .arco-popover-popup-content {
8
+ padding: 0;
9
+
10
+ .arco-popover-content {
11
+ div {
12
+ padding: 5px 10px;
13
+
14
+ &:hover {
15
+ background-color: #f3f6f9;
16
+ cursor: pointer;
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
22
+
6
23
  .title {
7
24
  margin-bottom: 10px;
8
25
  color: #4e5969;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",