@jx3box/jx3box-common-ui 8.7.0 → 8.7.2

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.7.0",
3
+ "version": "8.7.2",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  "last 2 versions"
31
31
  ],
32
32
  "dependencies": {
33
- "@jx3box/jx3box-comment-ui": "^1.8.8",
33
+ "@jx3box/jx3box-comment-ui": "^1.9.3",
34
34
  "@jx3box/jx3box-common": "^8.2.18",
35
35
  "@jx3box/jx3box-data": "^3.5.8",
36
36
  "@jx3box/jx3box-editor": "^2.1.9",
@@ -152,7 +152,7 @@ const activeNav = {
152
152
  "exam",
153
153
  "body",
154
154
  ],
155
- bbs: ["bbs", "topic", "emotion", "joke", "namespace", "collection", "community"],
155
+ community: ["bbs", "topic", "emotion", "joke", "namespace", "collection", "community"],
156
156
  pvp: ["pvp"],
157
157
  };
158
158
 
@@ -5,10 +5,10 @@
5
5
  <div class="c-topic-text__year">{{ year }}</div>
6
6
  <div class="c-topic-text__text">{{ topicText }}</div>
7
7
  </div>
8
- <img class="c-topic-bg" src="../../assets/img/rightsidebar/topic_bg_bps.svg" alt="">
8
+ <img class="c-topic-bg" src="../../assets/img/rightsidebar/topic_bg_bps.svg" alt="" />
9
9
  </div>
10
10
  <div class="c-post-topic__img">
11
- <img :src="topicImage" alt="">
11
+ <img :src="topicImage" alt="" />
12
12
  </div>
13
13
  </div>
14
14
  </template>
@@ -35,19 +35,22 @@ export default {
35
35
  },
36
36
  data() {
37
37
  return {
38
- topicInfo: null
39
- }
38
+ topicInfo: null,
39
+ };
40
40
  },
41
41
  computed: {
42
42
  topicText() {
43
- return this.topicInfo ? `${dayjs(this.topicInfo.created_at).format('MM月DD日')}荣登头条榜` : ''
43
+ return this.topicInfo ? `${dayjs(this.topicInfo.created_at).format("MM月DD日")}荣登头条榜` : "";
44
44
  },
45
45
  year() {
46
- return this.topicInfo ? dayjs(this.topicInfo.created_at).format('YYYY年') : ""
46
+ return this.topicInfo ? dayjs(this.topicInfo.created_at).format("YYYY年") : "";
47
47
  },
48
48
  topicImage() {
49
49
  const img = this.postBanner || this.topicInfo?.img;
50
- return getThumbnail(img, [260*2, 78*2])
50
+ if (img.indexOf(".gif") > -1) {
51
+ return img;
52
+ }
53
+ return getThumbnail(img, [260 * 2, 78 * 2]);
51
54
  },
52
55
  client() {
53
56
  return location.href.includes("origin") ? "origin" : "std";
@@ -59,21 +62,23 @@ export default {
59
62
  handler(val) {
60
63
  if (!val) return;
61
64
  this.loadData();
62
- }
63
- }
65
+ },
66
+ },
64
67
  },
65
68
  methods: {
66
69
  loadData() {
67
70
  getSliders(this.type, this.id, this.client).then((res) => {
68
71
  if (res.data.data?.list) {
69
72
  // 取创建时间最新的一条
70
- const list = res.data.data.list.sort((a, b) => dayjs(b.created_at).isAfter(dayjs(a.created_at)) ? 1 : -1);
73
+ const list = res.data.data.list.sort((a, b) =>
74
+ dayjs(b.created_at).isAfter(dayjs(a.created_at)) ? 1 : -1
75
+ );
71
76
  this.topicInfo = list[0];
72
77
  }
73
78
  });
74
79
  },
75
- }
76
- }
80
+ },
81
+ };
77
82
  </script>
78
83
 
79
84
  <style lang="less" scoped>
@@ -93,7 +98,7 @@ export default {
93
98
  // left: 50%;
94
99
  // transform: translate(-50%, -50%);
95
100
  z-index: 1;
96
- color: #FFD28F;
101
+ color: #ffd28f;
97
102
  letter-spacing: 1px;
98
103
  white-space: nowrap;
99
104
  margin-right: 8px;
@@ -115,7 +120,7 @@ export default {
115
120
  overflow: hidden;
116
121
  .r(4px);
117
122
  min-height: 71px;
118
- img{
123
+ img {
119
124
  .pa;
120
125
  left: 50%;
121
126
  transform: translateX(-50%);