@jx3box/jx3box-editor 1.3.6 → 1.3.9
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 +12 -0
- package/package.json +1 -1
- package/src/BoxResource.vue +23 -11
package/assets/css/resource.less
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.c-resource {
|
|
2
|
+
margin-right:5px;
|
|
2
3
|
.u-switch {
|
|
3
4
|
.u-icon {
|
|
4
5
|
.size(14px);
|
|
@@ -261,6 +262,17 @@
|
|
|
261
262
|
fill: @primary;
|
|
262
263
|
}
|
|
263
264
|
}
|
|
265
|
+
.u-lv-box {
|
|
266
|
+
font-style: normal;
|
|
267
|
+
font-weight: normal;
|
|
268
|
+
font-size: 12px;
|
|
269
|
+
padding: 2px 8px;
|
|
270
|
+
border: 1px solid #8269df;
|
|
271
|
+
border-radius: 2px;
|
|
272
|
+
margin-left: 5px;
|
|
273
|
+
background: #fff;
|
|
274
|
+
color: #6843f4;
|
|
275
|
+
}
|
|
264
276
|
&.el-tabs--card > .el-tabs__header .el-tabs__item {
|
|
265
277
|
transition: none;
|
|
266
278
|
}
|
package/package.json
CHANGED
package/src/BoxResource.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="c-resource">
|
|
2
|
+
<div class="c-resource c-resource__jx3box">
|
|
3
3
|
<!-- 上传触发按钮 -->
|
|
4
4
|
<el-button class="u-switch" type="primary" @click="openDialog" :disabled="!enable"> <img class="u-icon" svg-inline :src="boxIcon" />魔盒资源 </el-button>
|
|
5
5
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<el-dialog class="c-large-dialog" title="魔盒资源库" :visible.sync="dialogVisible">
|
|
8
8
|
<div class="c-resource-content" v-loading="loading">
|
|
9
9
|
<div class="m-database-search">
|
|
10
|
-
<el-input class="u-input" placeholder="
|
|
11
|
-
<template slot="prepend"
|
|
10
|
+
<el-input class="u-input" :placeholder="placeholderText" v-model="query" @change="search" @keyup.enter.native="search">
|
|
11
|
+
<template slot="prepend">关键词</template>
|
|
12
12
|
</el-input>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<span slot="label" class="u-tab-label">
|
|
18
18
|
<i class="el-icon-s-custom" style="margin-right:5px;"></i>
|
|
19
19
|
<b>魔盒用户</b>
|
|
20
|
+
<i class="u-lv-box">Lv2+</i>
|
|
20
21
|
</span>
|
|
21
22
|
<p v-if="total && done" class="m-resource-count">
|
|
22
23
|
<i class="el-icon-s-data"></i> 共找到 <b>{{ total }}</b> 条记录
|
|
@@ -85,12 +86,11 @@
|
|
|
85
86
|
</template>
|
|
86
87
|
|
|
87
88
|
<script>
|
|
88
|
-
import {
|
|
89
|
+
import { loadStat, } from "../service/database";
|
|
89
90
|
import { loadAuthors, loadEmotions } from "../service/cms";
|
|
90
91
|
import { getUserInfo } from "../service/author";
|
|
91
92
|
import { __iconPath, __Root, __OriginRoot, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
92
|
-
import
|
|
93
|
-
import { iconLink, getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
|
|
93
|
+
import { getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
|
|
94
94
|
import User from "@jx3box/jx3box-common/js/user";
|
|
95
95
|
export default {
|
|
96
96
|
name: "Resource",
|
|
@@ -130,10 +130,18 @@ export default {
|
|
|
130
130
|
per: 10,
|
|
131
131
|
page: 1,
|
|
132
132
|
total: 1,
|
|
133
|
-
pages: 1
|
|
133
|
+
pages: 1,
|
|
134
|
+
|
|
135
|
+
placeholderTexts : {
|
|
136
|
+
'authors' : '请输入 ID 或 名称'
|
|
137
|
+
}
|
|
138
|
+
|
|
134
139
|
};
|
|
135
140
|
},
|
|
136
141
|
computed: {
|
|
142
|
+
placeholderText : function (){
|
|
143
|
+
return this.placeholderTexts[this.type]
|
|
144
|
+
},
|
|
137
145
|
buttonTXT: function() {
|
|
138
146
|
return this.selectedCount ? "插 入" : "确 定";
|
|
139
147
|
},
|
|
@@ -262,10 +270,14 @@ export default {
|
|
|
262
270
|
insert: function() {
|
|
263
271
|
if (this.type === 'authors') {
|
|
264
272
|
if (this.userStatus == 0 && this.canInsertAuthor) {
|
|
265
|
-
this.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
273
|
+
if (this.selectedAuthor.ID) {
|
|
274
|
+
this.setAuthors();
|
|
275
|
+
this.$emit("insert", this.html);
|
|
276
|
+
this.dialogVisible = false;
|
|
277
|
+
this.selectedAuthor = {};
|
|
278
|
+
} else {
|
|
279
|
+
this.$message.warning("请选择一个用户");
|
|
280
|
+
}
|
|
269
281
|
} else {
|
|
270
282
|
this.$alert('您的等级不足或无权限(Lv2以上可用)', '消息');
|
|
271
283
|
}
|