@jx3box/jx3box-common-ui 7.2.1 → 7.2.3
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 +1 -1
- package/src/App.vue +3 -4
- package/src/author/Avatar.vue +15 -3
- package/src/interact/boxcoin_admin.vue +14 -1
- package/src/single/Thx.vue +2 -2
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -39,13 +39,12 @@
|
|
|
39
39
|
<el-button @click="visible = true">用户POP</el-button>
|
|
40
40
|
<!-- :postId="23865" -->
|
|
41
41
|
<Thx
|
|
42
|
-
postType="
|
|
42
|
+
postType="bps"
|
|
43
43
|
postTitle="bbs23865的标题"
|
|
44
|
-
|
|
45
|
-
:userId="7"
|
|
44
|
+
:userId="8"
|
|
46
45
|
:adminBoxcoinEnable="true"
|
|
47
46
|
:userBoxcoinEnable="true"
|
|
48
|
-
:postId="
|
|
47
|
+
:postId="5575"
|
|
49
48
|
/>
|
|
50
49
|
<hr />
|
|
51
50
|
<Like mode="heart" :count="100" :showCount="true" />
|
package/src/author/Avatar.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a class="c-avatar" :href="authorLink(uid)" :class="size">
|
|
2
|
+
<a class="c-avatar" :href="authorLink(uid)" :class="size" :style="style">
|
|
3
3
|
<img :src="showAvatar(url)" class="c-avatar-pic" />
|
|
4
4
|
<i class="c-avatar-frame" v-if="frame">
|
|
5
5
|
<img :src="frameUrl" />
|
|
@@ -46,20 +46,32 @@ export default {
|
|
|
46
46
|
};
|
|
47
47
|
},
|
|
48
48
|
computed: {
|
|
49
|
+
isNumberSize:function (){
|
|
50
|
+
return !isNaN(Number(this.size))
|
|
51
|
+
},
|
|
49
52
|
frameUrl: function () {
|
|
50
53
|
return __imgPath + `avatar/images/${this.frame}/${this.frame}.svg`;
|
|
51
54
|
},
|
|
55
|
+
style:function (){
|
|
56
|
+
if(this.isNumberSize){
|
|
57
|
+
return {
|
|
58
|
+
width:this.size+'px',
|
|
59
|
+
height:this.size+'px'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return {}
|
|
63
|
+
}
|
|
52
64
|
},
|
|
53
65
|
methods: {
|
|
54
66
|
showAvatar: function (val) {
|
|
55
|
-
return showAvatar(val, this.styles[this.size] * 3);
|
|
67
|
+
return showAvatar(val, this.isNumberSize ? this.size*3 : this.styles[this.size] * 3);
|
|
56
68
|
},
|
|
57
69
|
authorLink,
|
|
58
70
|
},
|
|
59
71
|
};
|
|
60
72
|
</script>
|
|
61
73
|
|
|
62
|
-
<style
|
|
74
|
+
<style lang="less">
|
|
63
75
|
.c-avatar {
|
|
64
76
|
.pr;
|
|
65
77
|
.dbi;
|
|
@@ -79,11 +79,24 @@ export default {
|
|
|
79
79
|
return this.total - this.left;
|
|
80
80
|
},
|
|
81
81
|
ready: function () {
|
|
82
|
-
|
|
82
|
+
// 不能给自己打赏,打赏目标不能是自己
|
|
83
|
+
// 打赏数量不能超过剩余数量
|
|
84
|
+
// 打赏数量不能为0
|
|
85
|
+
// 打赏寄语不能为空
|
|
86
|
+
return !!(
|
|
87
|
+
!this.isSelf &&
|
|
88
|
+
!this.targetIsSelf &&
|
|
89
|
+
this.isEnough &&
|
|
90
|
+
this.count &&
|
|
91
|
+
this.remark
|
|
92
|
+
);
|
|
83
93
|
},
|
|
84
94
|
isNotSelf: function () {
|
|
85
95
|
return this.userId != User.getInfo().uid;
|
|
86
96
|
},
|
|
97
|
+
targetIsSelf: function () {
|
|
98
|
+
return this.chosen == this.userId;
|
|
99
|
+
},
|
|
87
100
|
isEnough: function () {
|
|
88
101
|
return this.left && this.left >= this.count;
|
|
89
102
|
},
|
package/src/single/Thx.vue
CHANGED
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
default: "normal",
|
|
53
53
|
},
|
|
54
54
|
postId: {
|
|
55
|
-
type: Number,
|
|
55
|
+
type: [Number, Array],
|
|
56
56
|
default: 0,
|
|
57
57
|
},
|
|
58
58
|
postType: {
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
},
|
|
78
78
|
client: {
|
|
79
79
|
type: String,
|
|
80
|
-
default: "
|
|
80
|
+
default: "std",
|
|
81
81
|
},
|
|
82
82
|
allowGift: {
|
|
83
83
|
type: Number,
|