@jx3box/jx3box-editor 1.6.0 → 1.6.1

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-editor",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="w-author" v-loading="loading">
3
- <div class="w-author-wrapper el-popover" v-if="data" :style="decoration">
3
+ <div class="w-author-wrapper el-popover" v-if="data" :style="{ backgroundImage: bg }">
4
4
  <div class="u-author">
5
5
  <Avatar class="u-avatar" :uid="uid" :url="data.user_avatar" :size="68" :frame="data.user_avatar_frame" />
6
6
  <div class="u-info">
@@ -63,7 +63,7 @@ export default {
63
63
  medals: [],
64
64
  teams: [],
65
65
  loading: false,
66
- decoration:''
66
+ bg:''
67
67
  }),
68
68
  computed: {
69
69
  super_author_icon: function() {
@@ -129,6 +129,7 @@ export default {
129
129
  getDecoration(){
130
130
  let decoration_atcard=sessionStorage.getItem('decoration_atcard'+this.uid)
131
131
  if(decoration_atcard == 'no'){
132
+ this.bg = ""
132
133
  return;
133
134
  }
134
135
  //已有缓存,读取解析
@@ -139,8 +140,9 @@ export default {
139
140
  getDecoration({using:1,user_id:this.uid}).then(data=>{
140
141
  let res=data.data.data
141
142
  if(res.length==0){
142
- //空 则为无主题,不再加载接口,界面设No
143
+ //空 则为无主题,不再加载接口,界面设No
143
144
  sessionStorage.setItem('decoration_atcard'+this.uid,'no')
145
+ this.bg = ""
144
146
  return;
145
147
  }
146
148
  let decoration=res.filter(val => {
@@ -150,15 +152,14 @@ export default {
150
152
  sessionStorage.setItem('decoration_atcard'+this.uid,JSON.stringify(decoration[0]))
151
153
  this.setDecoration(decoration[0])
152
154
  }else{
153
- //空 则为无主题,不再加载接口,界面设No
155
+ //空 则为无主题,不再加载接口,界面设No
156
+ this.bg = ""
154
157
  sessionStorage.setItem('decoration_atcard'+this.uid,'no')
155
158
  }
156
159
  })
157
160
  },
158
161
  setDecoration(decoration_sidebar){
159
- this.decoration={
160
- 'background-image':'url('+this.showDecoration(decoration_sidebar.val,decoration_sidebar.type)+')'
161
- }
162
+ this.bg = `url(${this.showDecoration(decoration_sidebar.val,decoration_sidebar.type)})`;
162
163
  },
163
164
  showMedalIcon: function(val) {
164
165
  return __imgPath + "image/medals/user/" + val + ".gif";
@@ -190,7 +191,7 @@ export default {
190
191
  // background-image: url(https://img.jx3box.com/decoration/images/1_CAT/atcard.png);
191
192
  background-repeat: no-repeat;
192
193
  background-position: top right;
193
- background-size: contain;
194
+ background-size: 100% auto;
194
195
  .u-author{
195
196
  padding:5px 0 15px 5px;
196
197
  }