@jx3box/jx3box-common-ui 6.0.2 → 6.0.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "6.0.2",
3
+ "version": "6.0.3",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Author.vue CHANGED
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  </div>
29
29
  <div class="u-bio">{{ data.user_bio }}</div>
30
- <AuthorFollow v-if="isLogin" class="u-follow-box" :uid="uid" />
30
+ <AuthorFollow class="u-follow-box" :uid="uid" />
31
31
  <div class="u-link" v-if="hasLink">
32
32
  <a v-if="data.weibo_name" class="u-weibo" :href="weiboLink(data.weibo_id)" target="_blank">
33
33
  <img svg-inline src="../assets/img/author/weibo.svg" />
@@ -152,9 +152,6 @@ export default {
152
152
  level: function() {
153
153
  return User.getLevel(this.data?.experience);
154
154
  },
155
- isLogin: function() {
156
- return User.isLogin();
157
- },
158
155
  },
159
156
  methods: {
160
157
  loadData: function() {
@@ -1,31 +1,43 @@
1
1
  <template>
2
2
  <div class="u-follow">
3
- <el-button
4
- v-if="!isFollow"
5
- :class="{ 'is-follow': isFollow }"
6
- size="mini"
7
- :icon="btnIcon"
8
- @click="follow"
9
- :disabled="isSelf"
10
- :type="btnType"
11
- :loading="loading"
12
- >
13
- {{ btnText }}<span class="u-follow-count">{{ formatFansNum(fansNum) }}</span>
14
- </el-button>
15
- <template v-else>
16
- <el-popover
17
- placement="bottom"
18
- trigger="hover"
19
- popper-class="u-follow-popover"
20
- :visible-arrow="false"
21
- >
22
- <div class="u-action-list">
23
- <div class="u-action-item" v-for="item in actions" :key="item.label" @click.stop="item.action">{{ item.label }}</div>
3
+ <template v-if="isLogin">
4
+ <template v-if="isSelf">
5
+ <div class="u-fans-box">
6
+ <span class="u-fans-label">粉丝数</span>
7
+ <span class="u-fans">{{ formatFansNum(fansNum) }}</span>
24
8
  </div>
25
- <el-button class="u-unfollow-btn" size="mini" :type="btnType" slot="reference">{{ btnText }}<span class="u-follow-count">{{ formatFansNum(fansNum) }}</span></el-button>
26
- </el-popover>
9
+ </template>
10
+ <template v-else>
11
+ <el-button
12
+ v-if="!isFollow"
13
+ :class="{ 'is-follow': isFollow }"
14
+ size="mini"
15
+ :icon="btnIcon"
16
+ @click="follow"
17
+ :type="btnType"
18
+ :loading="loading"
19
+ >
20
+ {{ btnText }}<span class="u-follow-count">{{ formatFansNum(fansNum) }}</span>
21
+ </el-button>
22
+ <el-popover
23
+ v-else
24
+ placement="bottom"
25
+ trigger="hover"
26
+ popper-class="u-follow-popover"
27
+ :visible-arrow="false"
28
+ >
29
+ <div class="u-action-list">
30
+ <div class="u-action-item" v-for="item in actions" :key="item.label" @click.stop="item.action">{{ item.label }}</div>
31
+ </div>
32
+ <el-button class="u-unfollow-btn" size="mini" :type="btnType" slot="reference">{{ btnText }}<span class="u-follow-count">{{ formatFansNum(fansNum) }}</span></el-button>
33
+ </el-popover>
34
+ <el-button size="mini" icon="el-icon-message" disabled title="Lv4+可用">私信</el-button>
35
+ </template>
27
36
  </template>
28
- <el-button size="mini" icon="el-icon-message" disabled title="Lv4+可用">私信</el-button>
37
+ <el-button class="u-fans-box" disabled size="mini" v-else>
38
+ <span class="u-fans-label">粉丝数</span>
39
+ <span class="u-fans">{{ formatFansNum(fansNum) }}</span>
40
+ </el-button>
29
41
  </div>
30
42
  </template>
31
43
 
@@ -73,6 +85,9 @@ export default {
73
85
  user() {
74
86
  return User.getInfo();
75
87
  },
88
+ isLogin: function() {
89
+ return User.isLogin();
90
+ },
76
91
  },
77
92
  watch: {
78
93
  uid: {
@@ -165,4 +180,15 @@ export default {
165
180
  color:#fff;
166
181
  margin-left:5px;
167
182
  }
183
+
184
+ .u-fans-box {
185
+ cursor: default !important;
186
+ .u-fans-label {
187
+ color: #999;
188
+ margin-right: 5px;
189
+ }
190
+ .u-fans {
191
+ color: #333;
192
+ }
193
+ }
168
194
  </style>