@jx3box/jx3box-common-ui 8.0.4 → 8.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "8.0.4",
3
+ "version": "8.0.6",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -81,7 +81,7 @@ export default {
81
81
  "withoutLeft",
82
82
  "adminMarks",
83
83
  "icon",
84
- // "subtypeMap",
84
+ "subtypeMap",
85
85
  "showExtend"
86
86
  ],
87
87
  data: function () {
@@ -92,13 +92,6 @@ export default {
92
92
  isOverlay: false,
93
93
  isApp: isApp(),
94
94
  show: false,
95
-
96
- subtypeMap: {
97
- 1: "攻略心得",
98
- 2: "萌新指南",
99
- 3: "江湖异闻",
100
- 4: "同人创作"
101
- }
102
95
  };
103
96
  },
104
97
  computed: {
@@ -242,6 +242,8 @@ export default {
242
242
  mark: this.mark || [],
243
243
  sticky: this.isSticky ? Date.now() : null,
244
244
  star: this.isStar,
245
+ tags: this.tag,
246
+ post_subtype: this.post_subtype,
245
247
  };
246
248
  },
247
249
  isAdmin: function () {
@@ -313,7 +315,7 @@ export default {
313
315
  if (this.sticky) this.isSticky = true;
314
316
 
315
317
  this.isStar = star || 0;
316
- this.tags = tags || [];
318
+ this.tag = tags || [];
317
319
  this.post_subtype = post_subtype || "";
318
320
 
319
321
  // 设置加载完成标识
@@ -373,10 +375,6 @@ export default {
373
375
  this.checkHasRight();
374
376
  // 预设信息
375
377
  this.initTypeOptions();
376
-
377
- if (this.showExtend && this.app) {
378
- this.loadTopic();
379
- }
380
378
  },
381
379
  mounted: function () {
382
380
  // 基本信息
@@ -391,6 +389,10 @@ export default {
391
389
  if (this.pid && this.hasRight) {
392
390
  this.pull();
393
391
  }
392
+
393
+ if (this.showExtend && this.app && this.dialog_visible) {
394
+ this.loadTopic();
395
+ }
394
396
  });
395
397
  },
396
398
  };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="m-single-collection" v-if="list && list.length">
3
- <div class="u-title"><i class="el-icon-connection"></i> 关联</div>
3
+ <!-- <div class="u-title"><i class="el-icon-connection"></i> 关联</div>
4
4
  <ul class="u-list">
5
5
  <li v-for="(item, i) in list" :key="i">
6
6
  <el-tooltip class="item" effect="dark" :content="item.title" placement="left">
@@ -10,12 +10,16 @@
10
10
  </a>
11
11
  </el-tooltip>
12
12
  </li>
13
- </ul>
13
+ </ul> -->
14
+ <a class="u-image" :href="`collection/${store.id}`">
15
+ <img :src="getCover(store.image)" />
16
+ </a>
14
17
  </div>
15
18
  </template>
16
19
 
17
20
  <script>
18
- import { getLink } from "@jx3box/jx3box-common/js/utils";
21
+ import { showAvatar, getLink, resolveImagePath, authorLink } from "@jx3box/jx3box-common/js/utils";
22
+ import { __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
19
23
  import { getCollection } from "../../service/cms";
20
24
  export default {
21
25
  name: "PostCollection",
@@ -55,11 +59,22 @@ export default {
55
59
  return getLink(item.type, item.id);
56
60
  }
57
61
  },
62
+ getCover: function (val) {
63
+ return val ? resolveImagePath(val) : `${__imgPath}image/collection/default_cover.png`;
64
+ },
58
65
  },
59
66
  };
60
67
  </script>
61
68
  <style scoped lang="less">
62
69
  .m-single-collection {
70
+ .u-image {
71
+ img {
72
+ .w(100%);
73
+ height: 226px;
74
+ object-fit: cover;
75
+ // border-radius: 4px;
76
+ }
77
+ }
63
78
  .u-title {
64
79
  font-weight: 300;
65
80
  font-size: 20px;