@jx3box/jx3box-editor 1.8.0 → 1.8.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.
- package/package.json +1 -1
- package/src/Article.vue +20 -51
- package/src/Upload.vue +11 -2
package/package.json
CHANGED
package/src/Article.vue
CHANGED
|
@@ -2,28 +2,10 @@
|
|
|
2
2
|
<div class="c-article-tinymce c-article-box">
|
|
3
3
|
<!-- <div id="c-article-origin" class="c-article-origin" ref="origin"><slot></slot></div> -->
|
|
4
4
|
<div id="c-article" class="c-article" ref="article" v-if="pageable">
|
|
5
|
-
<div
|
|
6
|
-
class="c-article-chunk"
|
|
7
|
-
v-for="(text, i) in data"
|
|
8
|
-
:key="i"
|
|
9
|
-
v-html="text"
|
|
10
|
-
:class="{ on: i == page - 1 || all == true }"
|
|
11
|
-
:id="'c-article-part' + ~~(i + 1)"
|
|
12
|
-
></div>
|
|
5
|
+
<div class="c-article-chunk" v-for="(text, i) in data" :key="i" v-html="text" :class="{ on: i == page - 1 || all == true }" :id="'c-article-part' + ~~(i + 1)"></div>
|
|
13
6
|
</div>
|
|
14
|
-
<div
|
|
15
|
-
|
|
16
|
-
class="c-article"
|
|
17
|
-
ref="article"
|
|
18
|
-
v-else-if="data && data.length"
|
|
19
|
-
v-html="data[0]"
|
|
20
|
-
></div>
|
|
21
|
-
<el-button
|
|
22
|
-
class="c-article-all"
|
|
23
|
-
type="primary"
|
|
24
|
-
v-if="!all && hasPages"
|
|
25
|
-
@click="showAll"
|
|
26
|
-
>加载全部</el-button>
|
|
7
|
+
<div id="c-article" class="c-article" ref="article" v-else-if="data && data.length" v-html="data[0]"></div>
|
|
8
|
+
<el-button class="c-article-all" type="primary" v-if="!all && hasPages" @click="showAll">加载全部</el-button>
|
|
27
9
|
<el-pagination
|
|
28
10
|
class="c-article-pages"
|
|
29
11
|
v-if="!all"
|
|
@@ -36,23 +18,9 @@
|
|
|
36
18
|
:total="total"
|
|
37
19
|
></el-pagination>
|
|
38
20
|
<div class="w-jx3-element-pop" :style="jx3_element.style">
|
|
39
|
-
<jx3-item
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
v-show="jx3_element.type == 'item'"
|
|
43
|
-
/>
|
|
44
|
-
<jx3-buff
|
|
45
|
-
:client="buff.client"
|
|
46
|
-
:id="buff.id"
|
|
47
|
-
:level="buff.level"
|
|
48
|
-
v-show="jx3_element.type == 'buff'"
|
|
49
|
-
/>
|
|
50
|
-
<jx3-skill
|
|
51
|
-
:client="skill.client"
|
|
52
|
-
:id="skill.id"
|
|
53
|
-
:level="skill.level"
|
|
54
|
-
v-show="jx3_element.type == 'skill'"
|
|
55
|
-
/>
|
|
21
|
+
<jx3-item :item_id="item.id" :jx3ClientType="item.client" v-show="jx3_element.type == 'item'" />
|
|
22
|
+
<jx3-buff :client="buff.client" :id="buff.id" :level="buff.level" v-show="jx3_element.type == 'buff'" />
|
|
23
|
+
<jx3-skill :client="skill.client" :id="skill.id" :level="skill.level" v-show="jx3_element.type == 'skill'" />
|
|
56
24
|
<jx3-npc :client="npc.client" :id="npc.id" v-show="jx3_element.type === 'npc'" />
|
|
57
25
|
<jx3-author :uid="author.id" v-show="jx3_element.type === 'author'" />
|
|
58
26
|
<jx3-emotion-author :id="emotion.id" v-show="jx3_element.type === 'emotion'" />
|
|
@@ -96,7 +64,7 @@ import renderTalent2 from "../assets/js/talent2";
|
|
|
96
64
|
import renderKatex from "../assets/js/katex";
|
|
97
65
|
import renderCode from "../assets/js/code";
|
|
98
66
|
import renderImgPreview from "../assets/js/renderImgPreview";
|
|
99
|
-
import renderPzIframe from
|
|
67
|
+
import renderPzIframe from "../assets/js/pz_iframe";
|
|
100
68
|
|
|
101
69
|
// 剑三
|
|
102
70
|
import Item from "./Item";
|
|
@@ -104,7 +72,7 @@ import Buff from "./Buff";
|
|
|
104
72
|
import Skill from "./Skill";
|
|
105
73
|
import Npc from "./Npc";
|
|
106
74
|
import Author from "./components/Author";
|
|
107
|
-
import PostAuthor from
|
|
75
|
+
import PostAuthor from "./components/PostAuthor.vue";
|
|
108
76
|
import renderJx3Element from "../assets/js/jx3_element";
|
|
109
77
|
|
|
110
78
|
export default {
|
|
@@ -147,15 +115,15 @@ export default {
|
|
|
147
115
|
level: "",
|
|
148
116
|
},
|
|
149
117
|
// NPC
|
|
150
|
-
npc
|
|
151
|
-
client
|
|
152
|
-
id
|
|
118
|
+
npc: {
|
|
119
|
+
client: "std",
|
|
120
|
+
id: "",
|
|
153
121
|
},
|
|
154
122
|
author: {
|
|
155
|
-
id:
|
|
123
|
+
id: "",
|
|
156
124
|
},
|
|
157
125
|
emotion: {
|
|
158
|
-
id:
|
|
126
|
+
id: "",
|
|
159
127
|
},
|
|
160
128
|
// COMMON
|
|
161
129
|
jx3_element: {
|
|
@@ -199,7 +167,7 @@ export default {
|
|
|
199
167
|
// 折叠块
|
|
200
168
|
renderFoldBlock($root);
|
|
201
169
|
// 代码
|
|
202
|
-
renderCode(`code[class=^'language-']`)
|
|
170
|
+
renderCode(`code[class=^'language-']`);
|
|
203
171
|
// Tatex
|
|
204
172
|
renderKatex();
|
|
205
173
|
|
|
@@ -226,14 +194,15 @@ export default {
|
|
|
226
194
|
target = "#c-article";
|
|
227
195
|
}
|
|
228
196
|
let dir = renderDirectory(target, this.directorybox);
|
|
229
|
-
this.$emit("directoryRendered",dir);
|
|
197
|
+
this.$emit("directoryRendered", dir);
|
|
230
198
|
|
|
231
|
-
$(
|
|
232
|
-
|
|
199
|
+
$(".w-directory-anchor").on("click", function () {
|
|
200
|
+
e.preventDefault();
|
|
201
|
+
let id = $(this).attr("id");
|
|
233
202
|
let target = $(`#${id}`).offset().top;
|
|
234
203
|
$(document).scrollTop(target - HEADER_HEIGHT);
|
|
235
204
|
window.location.hash = `#${id}`;
|
|
236
|
-
})
|
|
205
|
+
});
|
|
237
206
|
},
|
|
238
207
|
changePage: function (i) {
|
|
239
208
|
this.page = i;
|
|
@@ -292,7 +261,7 @@ export default {
|
|
|
292
261
|
"jx3-skill": Skill,
|
|
293
262
|
"jx3-npc": Npc,
|
|
294
263
|
"jx3-author": Author,
|
|
295
|
-
|
|
264
|
+
"jx3-emotion-author": PostAuthor,
|
|
296
265
|
// "gallery":gallery,
|
|
297
266
|
// VueViewer
|
|
298
267
|
},
|
package/src/Upload.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<el-button type="primary" @click="dialogVisible = true" icon="el-icon-upload" :disabled="!enable">{{ btn_txt }}</el-button>
|
|
5
5
|
|
|
6
6
|
<!-- 弹出界面 -->
|
|
7
|
-
<el-dialog class="c-large-dialog" title="上传" :visible.sync="dialogVisible"
|
|
7
|
+
<el-dialog class="c-large-dialog" title="上传" :visible.sync="dialogVisible">
|
|
8
8
|
<!-- 清空按钮 -->
|
|
9
9
|
<el-button class="u-upload-clear" plain icon="el-icon-delete" size="mini" @click="clear">清空</el-button>
|
|
10
10
|
|
|
@@ -80,12 +80,21 @@ export default {
|
|
|
80
80
|
type: Boolean,
|
|
81
81
|
default: true,
|
|
82
82
|
},
|
|
83
|
+
max: {
|
|
84
|
+
type: Number,
|
|
85
|
+
default: 10,
|
|
86
|
+
},
|
|
87
|
+
// 文件大小限制
|
|
88
|
+
sizeLimit: {
|
|
89
|
+
type: Number,
|
|
90
|
+
default: 30
|
|
91
|
+
},
|
|
83
92
|
},
|
|
84
93
|
data: function () {
|
|
85
94
|
return {
|
|
86
95
|
API: API,
|
|
87
96
|
dialogVisible: false,
|
|
88
|
-
tip: this.desc ||
|
|
97
|
+
tip: this.desc || `一次最多同时上传${this.max}个文件(单个文件不超过${this.sizeLimit}M),格式限常见的图片、文档、数据表及压缩包`,
|
|
89
98
|
btn_txt: this.text || "上传附件",
|
|
90
99
|
|
|
91
100
|
fileList: [],
|