@jx3box/jx3box-editor 1.4.5 → 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.
package/assets/css/resource.less
CHANGED
package/package.json
CHANGED
package/src/BoxResource.vue
CHANGED
|
@@ -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
|
-
|
|
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="
|
|
51
|
-
<img class="e-jx3-emotion" :src="
|
|
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: "
|
|
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,
|
|
@@ -301,7 +301,7 @@ export default {
|
|
|
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();
|