zydx-plus 1.29.141 → 1.29.142
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
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<em>({{ text }})</em>
|
|
7
7
|
</div>
|
|
8
8
|
<div class="choice-title-right">
|
|
9
|
-
<button class="but" @click="add('correct')">增正确项</button>
|
|
9
|
+
<button class="but" @click="add('correct')" v-if="!single">增正确项</button>
|
|
10
10
|
<button class="but" @click="add('interfere')">增干扰项</button>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
@@ -70,6 +70,10 @@ export default {
|
|
|
70
70
|
isShow: {
|
|
71
71
|
type: Boolean,
|
|
72
72
|
default: true
|
|
73
|
+
},
|
|
74
|
+
single: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
73
77
|
}
|
|
74
78
|
},
|
|
75
79
|
watch: {
|
|
@@ -96,14 +100,25 @@ export default {
|
|
|
96
100
|
// 整理数据
|
|
97
101
|
organize(v) {
|
|
98
102
|
let arr = []
|
|
99
|
-
v.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
if(v.length === 0) {
|
|
104
|
+
if(this.single) {
|
|
105
|
+
arr.push({
|
|
106
|
+
type: 'correct',
|
|
107
|
+
letter: this.letter[0],
|
|
108
|
+
title: '正确选项',
|
|
109
|
+
list: [{value: ''}]
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}else {
|
|
113
|
+
v.forEach(x => {
|
|
114
|
+
arr.push({
|
|
115
|
+
type: (x.isRight)? 'correct' : 'interfere',
|
|
116
|
+
letter: x.index,
|
|
117
|
+
title: (x.isRight)? '正确选项' : '干扰选项',
|
|
118
|
+
list: x.content.map(y => ({value: y}))
|
|
119
|
+
})
|
|
105
120
|
})
|
|
106
|
-
}
|
|
121
|
+
}
|
|
107
122
|
return arr
|
|
108
123
|
},
|
|
109
124
|
getContent() {
|
|
@@ -124,7 +139,7 @@ export default {
|
|
|
124
139
|
this.list.forEach(x => {
|
|
125
140
|
arr.push({
|
|
126
141
|
index: x.letter,
|
|
127
|
-
content: x.value
|
|
142
|
+
content: [x.value? x.value: '']
|
|
128
143
|
})
|
|
129
144
|
})
|
|
130
145
|
return arr
|
|
@@ -390,6 +390,9 @@ export default {
|
|
|
390
390
|
html += '<p style="text-align: right;"><span style="color: #999;">请填来源</span></p>'
|
|
391
391
|
this.editor.commands.setContent(html)
|
|
392
392
|
}
|
|
393
|
+
if(v === 'centerH2') this.editor.chain().focus().toggleHeading({level:2}).setTextAlign('center').run()
|
|
394
|
+
if(v === 'leftH2') this.editor.chain().focus().toggleHeading({level:2}).setTextAlign('left').run()
|
|
395
|
+
if(v === 'rightH2') this.editor.chain().focus().toggleHeading({level:2}).setTextAlign('right').run()
|
|
393
396
|
}
|
|
394
397
|
}
|
|
395
398
|
}
|