@jx3box/jx3box-common-ui 6.2.6 → 6.2.8

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": "6.2.6",
3
+ "version": "6.2.8",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  <LeftSidebar :open="true">
17
17
  <LeftSideToggle :mobileOnly="true" />
18
- <Author :author="author" :uid="28338" />
18
+ <Author :author="author" :uid="8" />
19
19
  </LeftSidebar>
20
20
 
21
21
  <Main :withoutLeft="false" :withoutRight="false">
@@ -20,35 +20,31 @@
20
20
  <span>粉丝榜</span>
21
21
  </div>
22
22
  <div class="f-avatar">
23
- <el-row :gutter="10">
24
- <el-col :span="4" v-for="(item, index) in list" :key="item.pay_user_id">
25
- <el-tooltip
26
- class="item"
27
- effect="dark"
28
- :content="'累计打赏' + item.money.toString() + '金箔'"
29
- placement="top"
30
- v-if="index < 5"
31
- >
32
- <a class="u-fan" :href="authorLink(item.pay_user_id)"><el-avatar class="u-avatar" shape="circle" :size="30" :src="showAvatar(item.pay_user.avatar)"
33
- ><i class="el-icon-s-custom"></i
34
- ></el-avatar></a>
35
- </el-tooltip>
36
- </el-col>
37
- <el-col :span="4" v-if="list.length > 5">
38
- <el-avatar class="u-avatar u-more" shape="circle" :size="30">
39
- <span class="f-avatar-num" v-if="list.length > 99">···</span>
40
- <span class="f-avatar-num" v-else>+{{ list.length - 5 }}</span>
41
- </el-avatar>
42
- </el-col>
43
- </el-row>
23
+ <el-tooltip
24
+ class="item"
25
+ effect="dark"
26
+ :content="'累计打赏' + item.money.toString() + '金箔'"
27
+ placement="top"
28
+ v-for="item in list"
29
+ :key="item.pay_user_id"
30
+ >
31
+ <a class="u-fan" :href="authorLink(item.pay_user_id)"
32
+ ><el-avatar class="u-avatar" shape="circle" :size="26" :src="showAvatar(item.pay_user.avatar)"
33
+ ><i class="el-icon-s-custom"></i></el-avatar
34
+ ></a>
35
+ </el-tooltip>
36
+ <el-avatar class="u-avatar u-more" shape="circle" :size="26" v-if="total > MAX_LENGTH">
37
+ <span class="f-avatar-num" v-if="total > 99">···</span>
38
+ <span class="f-avatar-num" v-else>+{{ total - MAX_LENGTH }}</span>
39
+ </el-avatar>
44
40
  </div>
45
- <div class="f-bottom">本赛季共 {{ list.length }} 人为TA赠礼</div>
41
+ <div class="f-bottom">本赛季共 {{ total }} 人为TA赠礼</div>
46
42
  </div>
47
43
  </template>
48
44
 
49
45
  <script>
50
46
  import { getFansList } from "../../service/author";
51
- import { showAvatar,authorLink } from "@jx3box/jx3box-common/js/utils";
47
+ import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
52
48
  export default {
53
49
  name: "AuthorFans",
54
50
  props: {
@@ -61,12 +57,13 @@ export default {
61
57
  return {
62
58
  list: [],
63
59
  total: 0,
60
+ MAX_LENGTH : 5,
64
61
  };
65
62
  },
66
63
  methods: {
67
64
  getData() {
68
65
  getFansList(this.uid).then((res) => {
69
- this.list = res.data.data.list || [];
66
+ this.list = res.data.data.list.slice(0,this.MAX_LENGTH) || [];
70
67
  this.total = res.data.data.totalUser || 0;
71
68
  });
72
69
  },
@@ -166,6 +163,9 @@ export default {
166
163
  color: #888;
167
164
  font-weight: 700;
168
165
  }
166
+ .u-fan{
167
+ .mr(5px);
168
+ }
169
169
  }
170
170
  .f-bottom {
171
171
  .mt(10px);
@@ -19,7 +19,7 @@
19
19
  placement="bottom"
20
20
  trigger="hover"
21
21
  popper-class="c-author-follow-popover"
22
- :visible-arrow="false"
22
+ :visible-arrow="true"
23
23
  >
24
24
  <div class="u-action-list">
25
25
  <div class="u-action-item" v-for="item in actions" :key="item.label" @click.stop="item.action">
@@ -58,7 +58,7 @@ export default {
58
58
  return this.isFollow ? "已关注" : "关注";
59
59
  },
60
60
  btnIcon() {
61
- return this.isSelf ? "" : this.isFollow ? "" : "el-icon-plus";
61
+ return this.isSelf ? "el-icon-plus" : this.isFollow ? "" : "el-icon-plus";
62
62
  },
63
63
  btnType() {
64
64
  return this.isFollow ? "info" : "warning";
@@ -161,19 +161,25 @@ export default {
161
161
  background: #ecf5ff;
162
162
  }
163
163
  }
164
- /*.u-trigger {
164
+
165
+ .u-fans-box {
166
+ cursor: not-allowed;
167
+ &:hover {
168
+ cursor: not-allowed;
169
+ }
170
+ }
171
+ .u-trigger {
165
172
  &:hover {
166
173
  cursor: default;
167
- background: unset;
168
174
  }
169
- }*/
175
+ }
170
176
  }
171
177
  .c-author-follow-popover {
172
178
  //.u-follow-popover {
173
179
  &.el-popover {
174
180
  min-width: 100px;
175
181
  padding: 0;
176
- margin: 0;
182
+ margin-top: 5px;
177
183
  .u-action-list {
178
184
  .u-action-item {
179
185
  text-align: center;