@jx3box/jx3box-editor 1.0.8 → 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.
Files changed (39) hide show
  1. package/assets/css/article_markdown.less +7 -5
  2. package/assets/css/markdown/_.less +38 -0
  3. package/assets/css/markdown/dialog.less +26 -0
  4. package/assets/css/markdown/macro.less +45 -0
  5. package/assets/css/markdown/talent.less +42 -0
  6. package/assets/css/markdown/video.less +25 -0
  7. package/assets/css/markdown.less +13 -30
  8. package/assets/css/module/buff.less +1 -1
  9. package/assets/css/module/macro.less +3 -2
  10. package/assets/css/module/npc.less +224 -0
  11. package/assets/css/module/qixue.less +2 -1
  12. package/assets/css/module/skill.less +1 -1
  13. package/assets/css/module/video.less +1 -1
  14. package/assets/css/resource.less +4 -0
  15. package/assets/data/markdown_whitelist.json +6 -2
  16. package/assets/img/npc/attack.svg +69 -0
  17. package/assets/img/npc/buff.svg +20 -0
  18. package/assets/img/npc/energy.svg +1 -0
  19. package/assets/img/npc/miss.svg +1 -0
  20. package/assets/img/npc/npc.svg +1 -0
  21. package/assets/img/npc/radar.svg +45 -0
  22. package/assets/img/npc/shield.svg +1 -0
  23. package/assets/img/npc/sight.svg +1 -0
  24. package/assets/img/npc/skull.svg +15 -0
  25. package/assets/img/npc/target.svg +55 -0
  26. package/package.json +1 -1
  27. package/service/database.js +12 -1
  28. package/src/Article.vue +1 -1
  29. package/src/ArticleMarkdown.vue +9 -1
  30. package/src/Markdown.vue +54 -11
  31. package/src/Npc.vue +214 -0
  32. package/src/Resource.vue +35 -0
  33. package/src/components/markdown/katex.vue +59 -0
  34. package/src/components/markdown/macro.vue +4 -2
  35. package/src/components/markdown/pz.vue +5 -3
  36. package/src/components/markdown/talent.vue +52 -0
  37. package/src/components/markdown/talent2.vue +52 -0
  38. package/src/components/markdown/video.vue +52 -0
  39. package/assets/css/markdown/common.less +0 -13
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="c-editor-markdown-dialog c-editor-markdown-macro">
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/common.less';
47
+ @import '../../../assets/css/markdown/dialog.less';
46
48
  </style>
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <div class="m-macro-dialog m-pz-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">
6
6
 
7
7
  <p>👘 请填入魔盒配装方案的<a target="_blank" href="/tool/32032">【嵌入版】</a>编码</p>
8
8
 
9
- <el-input class="m-macro-input" type="textarea" :rows="4" v-model="pzCode"></el-input>
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/common.less';
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
- }