@jx3box/jx3box-common-ui 6.2.7 → 6.2.9

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.7",
3
+ "version": "6.2.9",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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);
@@ -13,7 +13,24 @@ import { __server, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
13
13
  import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
14
14
  export default {
15
15
  name: "Avatar",
16
- props: ["uid", "url", "size", "frame"],
16
+ props: {
17
+ uid: {
18
+ type: Number,
19
+ default: 0,
20
+ },
21
+ url: {
22
+ type: String,
23
+ default: "",
24
+ },
25
+ frame: {
26
+ type: Boolean,
27
+ default: false,
28
+ },
29
+ size : {
30
+ type : Number,
31
+ default : 88
32
+ }
33
+ },
17
34
  components: {},
18
35
  data: function() {
19
36
  return {
@@ -37,8 +54,6 @@ export default {
37
54
  },
38
55
  authorLink,
39
56
  },
40
- mounted : function (){
41
- }
42
57
  };
43
58
  </script>
44
59