zydx-plus 1.32.204 → 1.32.206
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 +2 -2
- package/src/components/editor/src/butJson.js +7 -3
- package/src/components/editor/src/editor.vue +14 -14
- package/src/components/editor2/src/editor.vue +5 -5
- package/src/components/mind/src/mind.vue +0 -7
- package/src/components/textarea/src/textarea.vue +2 -2
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zydx-plus",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.206",
|
|
4
4
|
"description": "Vue.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"pdfjs-dist": "^2.0.943",
|
|
25
25
|
"snabbdom": "^3.5.1",
|
|
26
26
|
"katex": "^0.15.6",
|
|
27
|
-
"simple-mind-map": "^0.
|
|
27
|
+
"simple-mind-map": "^0.6.14",
|
|
28
28
|
"html2json": "^1.0.2",
|
|
29
29
|
"@tiptap/extension-image": "^2.0.3",
|
|
30
30
|
"@tiptap/starter-kit": "^2.0.3",
|
|
@@ -64,7 +64,10 @@ export function butJson (editor,data) {
|
|
|
64
64
|
name: '标注编号',
|
|
65
65
|
key: 'numberMenu',
|
|
66
66
|
menuKeys: [],
|
|
67
|
-
html:
|
|
67
|
+
html: [
|
|
68
|
+
`<sup>[${menusData(data,'numberMenu').text}]</sup>`,
|
|
69
|
+
`<sup>[${menusData(data,'numberMenu').text}]</sup><span> </span>`
|
|
70
|
+
]
|
|
68
71
|
},
|
|
69
72
|
keywordMenu: {
|
|
70
73
|
name: '关键词',
|
|
@@ -91,7 +94,8 @@ export function butJson (editor,data) {
|
|
|
91
94
|
html: [
|
|
92
95
|
`<sup>${num[numSort(editor)]}</sup>`,
|
|
93
96
|
`<hr class="custom-link" contenteditable="false">`,
|
|
94
|
-
`<p data-signId="s-${numSort(editor)}"><span style="font-family: KaiTi">${num[numSort(editor)]}填写标注内容<span></p
|
|
97
|
+
`<p data-signId="s-${numSort(editor)}"><span style="font-family: KaiTi">${num[numSort(editor)]}填写标注内容<span></p>`,
|
|
98
|
+
`<sup>${num[numSort(editor)]}</sup><span> </span>`,
|
|
95
99
|
],
|
|
96
100
|
index: numSort(editor)
|
|
97
101
|
},
|
|
@@ -155,4 +159,4 @@ function getTime() {
|
|
|
155
159
|
let month = date.getMonth() + 1
|
|
156
160
|
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
|
157
161
|
return year + '年' + month + '月' + day + '日'
|
|
158
|
-
}
|
|
162
|
+
}
|
|
@@ -704,14 +704,11 @@ export default {
|
|
|
704
704
|
}
|
|
705
705
|
// 标注编号
|
|
706
706
|
if (data.key === 'numberMenu') {
|
|
707
|
-
|
|
707
|
+
let index = 0
|
|
708
|
+
const {path, pos} = this.editor.state.selection.$head
|
|
708
709
|
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
// }else {
|
|
712
|
-
// this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
713
|
-
// }
|
|
714
|
-
this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
710
|
+
if(path[5] === pos) index = 1
|
|
711
|
+
this.editor.chain().focus().insertContentAt(this.selection(), html[index]).run()
|
|
715
712
|
}
|
|
716
713
|
// 关键词
|
|
717
714
|
if (data.key === 'keywordMenu') {
|
|
@@ -747,15 +744,18 @@ export default {
|
|
|
747
744
|
}
|
|
748
745
|
// 添加标注
|
|
749
746
|
if (data.key === 'taggingMenu') {
|
|
750
|
-
|
|
747
|
+
let ind = 0
|
|
748
|
+
const {path, pos} = this.editor.state.selection.$head
|
|
749
|
+
let index = this.editor.state.selection.$anchor.path[1] // 获取当前光标所行数
|
|
751
750
|
const content = this.editor.state.selection.$anchor.path[0].content.content // 获取内容
|
|
752
751
|
const name = content[index + 1]?.type.name
|
|
753
752
|
const num = this.cursorPosition(content, index) // 获取当前光标位置
|
|
754
753
|
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
755
|
-
|
|
754
|
+
if(path[5] === pos) ind = 3
|
|
755
|
+
this.editor.chain().focus().insertContentAt(this.selection(), html[ind]).run()
|
|
756
756
|
const si = butJson(this.editor, this.menusText)[data.key].index - 1 // 获取标记的位置
|
|
757
|
-
const signID = this.selectionPath(`s-${si}`)
|
|
758
|
-
if (name !== 'horizontalRule') {
|
|
757
|
+
const signID = this.selectionPath(`s-${si}`) // 获取标记的位置
|
|
758
|
+
if (name !== 'horizontalRule') { // 判断是否有分割线
|
|
759
759
|
this.editor.chain().focus().insertContentAt(num, html[1]).run()
|
|
760
760
|
this.editor.chain().focus().insertContentAt(num + 2, html[2]).run()
|
|
761
761
|
} else {
|
|
@@ -855,7 +855,7 @@ export default {
|
|
|
855
855
|
}
|
|
856
856
|
|
|
857
857
|
:deep(.read-only-p p) {
|
|
858
|
-
line-height:
|
|
858
|
+
line-height: 24px;
|
|
859
859
|
text-align: justify;
|
|
860
860
|
}
|
|
861
861
|
|
|
@@ -964,7 +964,7 @@ label {
|
|
|
964
964
|
}
|
|
965
965
|
|
|
966
966
|
.editing-cont :deep(p) {
|
|
967
|
-
line-height:
|
|
967
|
+
line-height: 24px;
|
|
968
968
|
}
|
|
969
969
|
.editing-cont :deep(img) {
|
|
970
970
|
padding: 5px 0;
|
|
@@ -1125,4 +1125,4 @@ li {
|
|
|
1125
1125
|
width: 100%;
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
</style>
|
|
1128
|
+
</style>
|
|
@@ -447,20 +447,20 @@ export default {
|
|
|
447
447
|
display: none !important;
|
|
448
448
|
}
|
|
449
449
|
.editor :deep(h1) {
|
|
450
|
-
line-height:
|
|
450
|
+
line-height: 24px;
|
|
451
451
|
font-size: 18px;
|
|
452
452
|
}
|
|
453
453
|
.editor :deep(h2) {
|
|
454
|
-
line-height:
|
|
454
|
+
line-height: 24px;
|
|
455
455
|
font-size: 16px;
|
|
456
456
|
}
|
|
457
457
|
.editor :deep(h3) {
|
|
458
|
-
line-height:
|
|
458
|
+
line-height: 24px;
|
|
459
459
|
font-size: 14px;
|
|
460
460
|
}
|
|
461
461
|
.editor :deep(p) {
|
|
462
462
|
font-size: 14px;
|
|
463
|
-
line-height:
|
|
463
|
+
line-height: 24px;
|
|
464
464
|
}
|
|
465
465
|
:deep(.ProseMirror) p.is-editor-empty:first-child::before {
|
|
466
466
|
content: attr(data-placeholder);
|
|
@@ -536,7 +536,7 @@ export default {
|
|
|
536
536
|
padding: 5px 0;
|
|
537
537
|
}
|
|
538
538
|
.ed-cont{
|
|
539
|
-
padding-top:
|
|
539
|
+
padding-top: 4px;
|
|
540
540
|
}
|
|
541
541
|
.editor{
|
|
542
542
|
border-radius: 3px;
|
|
@@ -114,13 +114,6 @@
|
|
|
114
114
|
import Select from '../../select/src/select.vue'
|
|
115
115
|
import Coloring from '../../coloring/src/coloring.vue'
|
|
116
116
|
import MindMap from "simple-mind-map";
|
|
117
|
-
import Drag from 'simple-mind-map/src/Drag.js'
|
|
118
|
-
import AssociativeLine from 'simple-mind-map/src/AssociativeLine.js'
|
|
119
|
-
import Export from 'simple-mind-map/src/Export.js'
|
|
120
|
-
import "simple-mind-map/dist/simpleMindMap.esm.css";
|
|
121
|
-
|
|
122
|
-
// 注册插件
|
|
123
|
-
MindMap.usePlugin(Drag).usePlugin(AssociativeLine).usePlugin(Export)
|
|
124
117
|
|
|
125
118
|
export default {
|
|
126
119
|
components: {Select, Coloring},
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
.text{
|
|
90
90
|
width: 100%;
|
|
91
91
|
border: 1px solid #ccc;
|
|
92
|
-
line-height:
|
|
92
|
+
line-height: 24px;
|
|
93
93
|
box-sizing: border-box;
|
|
94
94
|
text-indent: 2em;
|
|
95
95
|
background-color: #fff;
|
|
@@ -98,4 +98,4 @@ export default {
|
|
|
98
98
|
content: attr(placeholder);
|
|
99
99
|
color: gray;
|
|
100
100
|
}
|
|
101
|
-
</style>
|
|
101
|
+
</style>
|