@jx3box/jx3box-editor 1.4.1 → 1.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Author.vue +26 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Author.vue CHANGED
@@ -6,15 +6,24 @@
6
6
  <div class="u-info">
7
7
  <a class="u-name" :href="authorLink(uid)" target="_blank">
8
8
  <span>{{ data.display_name.slice(0, 8) }}</span>
9
- <a class="u-superauthor" href="/dashboard/cooperation" target="_blank">
10
- <img :src="super_author_icon" alt="superauthor" />
11
- </a>
9
+ <el-tooltip class="item" effect="dark" content="签约作者" placement="top" v-if="isSuperAuthor">
10
+ <a class="u-superauthor" href="/dashboard/cooperation" target="_blank">
11
+ <img :src="super_author_icon" alt="superauthor" />
12
+ </a>
13
+ </el-tooltip>
12
14
  </a>
13
- <div class="u-extend">
14
- <span class="u-level" :class="'lv-' + level" :style={backgroundColor:showLevelColor(level)}>Lv.{{ level }}</span>
15
- <a class="u-vip" href="/vip/premium?from=sidebar_author" target="_blank">
16
- <i class="i-icon-vip on">{{ vipType }}</i>
17
- </a>
15
+ <div class="u-extend" v-if="isVip">
16
+ <el-tooltip class="item" effect="dark" placement="top">
17
+ <div slot="content">
18
+ <span class="u-tips">经验值:{{ data.experience }}</span>
19
+ </div>
20
+ <span class="u-level" :class="'lv-' + level" :style={backgroundColor:showLevelColor(level)}>Lv.{{ level }}</span>
21
+ </el-tooltip>
22
+ <el-tooltip class="item" effect="dark" :content="vipTypeTitle" placement="top" v-if="isVip">
23
+ <a class="u-vip" href="/vip/premium?from=sidebar_author" target="_blank">
24
+ <i class="i-icon-vip on">{{ vipType }}</i>
25
+ </a>
26
+ </el-tooltip>
18
27
  </div>
19
28
  </div>
20
29
  </div>
@@ -58,6 +67,12 @@ export default {
58
67
  super_author_icon: function() {
59
68
  return __imgPath + "image/user/" + "superauthor.svg";
60
69
  },
70
+ isVip: function (){
71
+ return this.data?.is_pro || this.data?.is_pre
72
+ },
73
+ vipTypeTitle: function() {
74
+ return this.data?.is_pro ? "专业版会员" : "高级版会员";
75
+ },
61
76
  vipType: function() {
62
77
  return this.data?.is_pro ? "PRO" : "PRE";
63
78
  },
@@ -67,6 +82,9 @@ export default {
67
82
  hasTrophy: function() {
68
83
  return this.medals.length;
69
84
  },
85
+ isSuperAuthor: function() {
86
+ return !!this.data?.sign;
87
+ },
70
88
  },
71
89
  watch: {
72
90
  uid: {