@jx3box/jx3box-editor 1.0.5 → 1.0.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/article_markdown.less +7 -5
- package/assets/css/markdown/_.less +38 -0
- package/assets/css/markdown/dialog.less +26 -0
- package/assets/css/markdown/macro.less +45 -0
- package/assets/css/markdown/talent.less +42 -0
- package/assets/css/markdown/video.less +25 -0
- package/assets/css/markdown.less +13 -30
- package/assets/css/module/buff.less +1 -1
- package/assets/css/module/macro.less +3 -2
- package/assets/css/module/npc.less +224 -0
- package/assets/css/module/qixue.less +2 -1
- package/assets/css/module/skill.less +1 -1
- package/assets/css/module/video.less +1 -1
- package/assets/css/resource.less +4 -0
- package/assets/data/markdown_whitelist.json +6 -2
- package/assets/img/npc/attack.svg +69 -0
- package/assets/img/npc/buff.svg +20 -0
- package/assets/img/npc/energy.svg +1 -0
- package/assets/img/npc/miss.svg +1 -0
- package/assets/img/npc/npc.svg +1 -0
- package/assets/img/npc/radar.svg +45 -0
- package/assets/img/npc/shield.svg +1 -0
- package/assets/img/npc/sight.svg +1 -0
- package/assets/img/npc/skull.svg +15 -0
- package/assets/img/npc/target.svg +55 -0
- package/assets/js/a.js +7 -0
- package/package.json +2 -2
- package/service/database.js +12 -1
- package/src/Article.vue +2 -2
- package/src/ArticleMarkdown.vue +10 -2
- package/src/Markdown.vue +54 -11
- package/src/Npc.vue +214 -0
- package/src/Resource.vue +35 -0
- package/src/components/markdown/katex.vue +59 -0
- package/src/components/markdown/macro.vue +4 -2
- package/src/components/markdown/pz.vue +5 -3
- package/src/components/markdown/talent.vue +52 -0
- package/src/components/markdown/talent2.vue +52 -0
- package/src/components/markdown/video.vue +52 -0
- package/assets/css/markdown/common.less +0 -13
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-editor-markdown-dialog">
|
|
3
|
+
<span class="c-markdown-toolbar-file c-markdown-toolbar-item u-katex" @click="handleClick" title="插入Latex">
|
|
4
|
+
Σ
|
|
5
|
+
</span>
|
|
6
|
+
|
|
7
|
+
<el-dialog :visible.sync="visible" title="插入数学公式" :modal-append-to-body="false">
|
|
8
|
+
<a class="u-help" href="/tool/16295" target="_blank">💙 查看帮助文档</a>
|
|
9
|
+
|
|
10
|
+
<el-input class="u-input u-input-katex" type="textarea" :rows="5" v-model="katex"></el-input>
|
|
11
|
+
|
|
12
|
+
<div slot="footer">
|
|
13
|
+
<el-button @click="cancel">取消</el-button>
|
|
14
|
+
<el-button type="primary" @click="insert">插入</el-button>
|
|
15
|
+
</div>
|
|
16
|
+
</el-dialog>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: "markdown_katex",
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
visible: false,
|
|
26
|
+
katex: "",
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
handleClick() {
|
|
31
|
+
this.visible = true;
|
|
32
|
+
},
|
|
33
|
+
cancel() {
|
|
34
|
+
this.visible = false;
|
|
35
|
+
this.katex = "";
|
|
36
|
+
},
|
|
37
|
+
insert() {
|
|
38
|
+
const content = `<pre class="e-latex-area w-latex">${this.katex}</pre>`;
|
|
39
|
+
|
|
40
|
+
this.$emit("insert", content);
|
|
41
|
+
|
|
42
|
+
this.katex = "";
|
|
43
|
+
|
|
44
|
+
this.visible = false;
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="less">
|
|
51
|
+
@import "../../../assets/css/markdown/dialog.less";
|
|
52
|
+
.c-markdown-toolbar-item.u-katex {
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-content: center;
|
|
56
|
+
width: 26px;
|
|
57
|
+
height: 26px;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="c-editor-markdown-dialog
|
|
2
|
+
<div class="c-editor-markdown-dialog">
|
|
3
3
|
<span class="c-markdown-toolbar-file c-markdown-toolbar-item" @click="handleClick" title="插入宏">宏</span>
|
|
4
4
|
|
|
5
5
|
<el-dialog :visible.sync="visible" title="插入宏" :modal-append-to-body="false">
|
|
@@ -35,6 +35,8 @@ export default {
|
|
|
35
35
|
|
|
36
36
|
this.$emit('insert', content)
|
|
37
37
|
|
|
38
|
+
this.macro = ''
|
|
39
|
+
|
|
38
40
|
this.visible = false
|
|
39
41
|
}
|
|
40
42
|
}
|
|
@@ -42,5 +44,5 @@ export default {
|
|
|
42
44
|
</script>
|
|
43
45
|
|
|
44
46
|
<style lang="less">
|
|
45
|
-
@import '../../../assets/css/markdown/
|
|
47
|
+
@import '../../../assets/css/markdown/dialog.less';
|
|
46
48
|
</style>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="c-editor-markdown-dialog ">
|
|
3
3
|
<span class="c-markdown-toolbar-file c-markdown-toolbar-item" @click="handleClick" title="插入配装方案">装</span>
|
|
4
4
|
|
|
5
5
|
<el-dialog :visible.sync="visible" title="配装方案" :modal-append-to-body="false">
|
|
6
6
|
|
|
7
7
|
<p>👘 请填入魔盒配装方案的<a target="_blank" href="/tool/32032">【嵌入版】</a>编码</p>
|
|
8
8
|
|
|
9
|
-
<el-input class="
|
|
9
|
+
<el-input class="u-input" type="textarea" :rows="4" v-model="pzCode"></el-input>
|
|
10
10
|
|
|
11
11
|
<div slot="footer">
|
|
12
12
|
<el-button @click="cancel">取消</el-button>
|
|
@@ -38,6 +38,8 @@ export default {
|
|
|
38
38
|
|
|
39
39
|
this.$emit('insert', content)
|
|
40
40
|
|
|
41
|
+
this.pz = ''
|
|
42
|
+
|
|
41
43
|
this.visible = false
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -45,5 +47,5 @@ export default {
|
|
|
45
47
|
</script>
|
|
46
48
|
|
|
47
49
|
<style lang="less">
|
|
48
|
-
@import '../../../assets/css/markdown/
|
|
50
|
+
@import '../../../assets/css/markdown/dialog.less';
|
|
49
51
|
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-editor-markdown-dialog">
|
|
3
|
+
<span class="c-markdown-toolbar-file c-markdown-toolbar-item" @click="handleClick" title="插入奇穴方案">
|
|
4
|
+
奇
|
|
5
|
+
</span>
|
|
6
|
+
|
|
7
|
+
<el-dialog :visible.sync="visible" title="插入奇穴方案" :modal-append-to-body="false">
|
|
8
|
+
<p>💙 请填入<a target="_blank" href="/app/talent">奇穴模拟器</a>生成的编码</p>
|
|
9
|
+
|
|
10
|
+
<el-input class="u-input u-input-macro" type="textarea" :rows="5" v-model="talent"></el-input>
|
|
11
|
+
|
|
12
|
+
<div slot="footer">
|
|
13
|
+
<el-button @click="cancel">取消</el-button>
|
|
14
|
+
<el-button type="primary" @click="insert">插入</el-button>
|
|
15
|
+
</div>
|
|
16
|
+
</el-dialog>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: "markdown_talent",
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
visible: false,
|
|
26
|
+
talent: "",
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
handleClick() {
|
|
31
|
+
this.visible = true;
|
|
32
|
+
},
|
|
33
|
+
cancel() {
|
|
34
|
+
this.visible = false;
|
|
35
|
+
this.talent = "";
|
|
36
|
+
},
|
|
37
|
+
insert() {
|
|
38
|
+
const content = `<pre class="e-jx3qixue-area">${this.talent}</pre>`;
|
|
39
|
+
|
|
40
|
+
this.$emit("insert", content);
|
|
41
|
+
|
|
42
|
+
this.talent = "";
|
|
43
|
+
|
|
44
|
+
this.visible = false;
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="less">
|
|
51
|
+
@import "../../../assets/css/markdown/dialog.less";
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-editor-markdown-dialog">
|
|
3
|
+
<span class="c-markdown-toolbar-file c-markdown-toolbar-item" @click="handleClick" title="插入镇派方案">
|
|
4
|
+
镇
|
|
5
|
+
</span>
|
|
6
|
+
|
|
7
|
+
<el-dialog :visible.sync="visible" title="插入镇派方案" :modal-append-to-body="false">
|
|
8
|
+
<p>💙 请填入<a target="_blank" href="/app/talent2">镇派模拟器</a>生成的编码</p>
|
|
9
|
+
|
|
10
|
+
<el-input class="u-input u-input-macro" type="textarea" :rows="5" v-model="talent"></el-input>
|
|
11
|
+
|
|
12
|
+
<div slot="footer">
|
|
13
|
+
<el-button @click="cancel">取消</el-button>
|
|
14
|
+
<el-button type="primary" @click="insert">插入</el-button>
|
|
15
|
+
</div>
|
|
16
|
+
</el-dialog>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: "markdown_talent2",
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
visible: false,
|
|
26
|
+
talent: "",
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
handleClick() {
|
|
31
|
+
this.visible = true;
|
|
32
|
+
},
|
|
33
|
+
cancel() {
|
|
34
|
+
this.visible = false;
|
|
35
|
+
this.talent = "";
|
|
36
|
+
},
|
|
37
|
+
insert() {
|
|
38
|
+
const content = `<pre class="e-jx3talent2-area">${this.talent}</pre>`;
|
|
39
|
+
|
|
40
|
+
this.$emit("insert", content);
|
|
41
|
+
|
|
42
|
+
this.talent = "";
|
|
43
|
+
|
|
44
|
+
this.visible = false;
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="less">
|
|
51
|
+
@import "../../../assets/css/markdown/dialog.less";
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-editor-markdown-dialog">
|
|
3
|
+
<span class="c-markdown-toolbar-video c-markdown-toolbar-item" @click="handleClick" title="插入视频">
|
|
4
|
+
<i class="el-icon-video-camera"></i>
|
|
5
|
+
</span>
|
|
6
|
+
|
|
7
|
+
<el-dialog :visible.sync="visible" title="插入视频" :modal-append-to-body="false">
|
|
8
|
+
<a class="u-help" href="/tool/686/" target="_blank">💙 点击查看如何获取视频地址</a>
|
|
9
|
+
|
|
10
|
+
<el-input class="u-input" type="textarea" :rows="4" v-model="videoUrl"></el-input>
|
|
11
|
+
|
|
12
|
+
<div slot="footer">
|
|
13
|
+
<el-button @click="cancel">取消</el-button>
|
|
14
|
+
<el-button type="primary" @click="insert">插入</el-button>
|
|
15
|
+
</div>
|
|
16
|
+
</el-dialog>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: "markdown_video",
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
visible: false,
|
|
26
|
+
videoUrl: "",
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
handleClick() {
|
|
31
|
+
this.visible = true;
|
|
32
|
+
},
|
|
33
|
+
cancel() {
|
|
34
|
+
this.visible = false;
|
|
35
|
+
this.videoUrl = "";
|
|
36
|
+
},
|
|
37
|
+
insert() {
|
|
38
|
+
const content = `<div class="c-article-videox">${this.videoUrl}</div>`;
|
|
39
|
+
|
|
40
|
+
this.$emit("insert", content);
|
|
41
|
+
|
|
42
|
+
this.videoUrl = "";
|
|
43
|
+
|
|
44
|
+
this.visible = false;
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="less">
|
|
51
|
+
@import "../../../assets/css/markdown/dialog.less";
|
|
52
|
+
</style>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
.c-editor-markdown-macro {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
|
|
4
|
-
.u-input {
|
|
5
|
-
.el-textarea__inner {
|
|
6
|
-
|
|
7
|
-
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
.el-dialog__body {
|
|
11
|
-
padding-top: 0;
|
|
12
|
-
}
|
|
13
|
-
}
|