@jx3box/jx3box-editor 1.4.3 → 1.4.6

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.
@@ -72,6 +72,10 @@
72
72
  .db;
73
73
  }
74
74
  }
75
+ .e-jx3-emotion {
76
+ padding: 0;
77
+ border: none;
78
+ }
75
79
  }
76
80
  @media print {
77
81
  .e-jx3-resource {
@@ -183,8 +183,8 @@
183
183
  .e-jx3-emotion {
184
184
  .size(80px, 80px);
185
185
  .mr(10px);
186
+ padding: 0 !important;
186
187
  box-shadow: 0 0 1px inset rgba(0, 0, 0, 0.2);
187
- //border: 1px solid #d2d2d2;
188
188
  vertical-align: middle;
189
189
  }
190
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.4.3",
3
+ "version": "1.4.6",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Author.vue CHANGED
@@ -12,7 +12,7 @@
12
12
  </a>
13
13
  </el-tooltip>
14
14
  </a>
15
- <div class="u-extend" v-if="isVip">
15
+ <div class="u-extend">
16
16
  <el-tooltip class="item" effect="dark" placement="top">
17
17
  <div slot="content">
18
18
  <span class="u-tips">经验值:{{ data.experience }}</span>
@@ -38,7 +38,7 @@
38
38
  </ul>
39
39
  <el-alert v-if="!authors.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
40
40
  </el-tab-pane>
41
- <!-- <el-tab-pane label="表情" name="emotions">
41
+ <el-tab-pane label="表情" name="emotions">
42
42
  <span slot="label" class="u-tab-label">
43
43
  <i class="el-icon-sugar"></i>
44
44
  <b>表情</b>
@@ -47,12 +47,12 @@
47
47
  <i class="el-icon-s-data"></i> 共找到 <b>{{ total }}</b> 条记录
48
48
  </p>
49
49
  <ul class="m-resource-iconlist">
50
- <li v-for="(o, i) in emotions" class="u-item" :key="i" :class="{ on: !!o.isSelected }" @click="selectEmotion(o)" ref="emotion">
51
- <img class="e-jx3-emotion" :src="userAvatar(o.url)" :alt="query" />
50
+ <li v-for="o in emotions" class="u-item" :key="o.id" :class="{ on: !!o.isSelected }" @click="selectEmotion(o)" ref="emotion">
51
+ <img class="e-jx3-emotion" :src="resolveImagePath(o.url)" :alt="query" />
52
52
  </li>
53
53
  </ul>
54
54
  <el-alert v-if="!emotions.length && done" title="没有找到相关条目" type="info" show-icon></el-alert>
55
- </el-tab-pane> -->
55
+ </el-tab-pane>
56
56
  </el-tabs>
57
57
 
58
58
  <template v-if="multipage">
@@ -90,10 +90,10 @@ import { loadStat, } from "../service/database";
90
90
  import { loadAuthors, loadEmotions } from "../service/cms";
91
91
  import { getUserInfo } from "../service/author";
92
92
  import { __iconPath, __Root, __OriginRoot, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
93
- import { getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
93
+ import { getLink, showAvatar, resolveImagePath } from "@jx3box/jx3box-common/js/utils";
94
94
  import User from "@jx3box/jx3box-common/js/user";
95
95
  export default {
96
- name: "Resource",
96
+ name: "BoxResource",
97
97
  props: {
98
98
  enable: {
99
99
  type: Boolean,
@@ -183,8 +183,6 @@ export default {
183
183
  },
184
184
  methods: {
185
185
  getData: function(page = 1, append = false) {
186
- if (!this.query) return;
187
-
188
186
  this.loading = true;
189
187
  this.per = 10;
190
188
  this.done = false;
@@ -198,6 +196,8 @@ export default {
198
196
 
199
197
  // 图标
200
198
  if (this.type === 'authors') {
199
+ if (!this.query) return;
200
+
201
201
  params = {
202
202
  ...params,
203
203
  name: query,
@@ -296,12 +296,12 @@ export default {
296
296
  this.resetItems();
297
297
  this.selectedAuthor = o;
298
298
  o.isSelected = true;
299
- this.html = `<a data-type="author" class="e-jx3-author" data-mode="" data-id="${o.ID}" target="_blank" href="/author/${o.ID}">@${o.display_name}</a>`
299
+ this.html = `<a data-type="author" class="e-jx3-author w-jx3-element" data-mode="" data-id="${o.ID}" target="_blank" href="/author/${o.ID}">@${o.display_name}</a>`
300
300
  },
301
301
  selectEmotion: function (o){
302
302
  this.resetItems();
303
303
  o.isSelected = true;
304
- this.html = `<img class="e-jx3-emotion" style="width:80px;" src="${o.url}" alt="${o.id}"/>`
304
+ this.html = `<img class="e-jx3-emotion" style="width:80px;" src="${resolveImagePath(o.url)}" alt="${o.id}"/>`
305
305
  },
306
306
  resetItems: function() {
307
307
  let data = this[this.type];
@@ -335,6 +335,7 @@ export default {
335
335
  });
336
336
  }
337
337
  },
338
+ resolveImagePath
338
339
  },
339
340
  created: function() {
340
341
  this.loadUserInfo();