zydx-plus 1.32.216 → 1.32.217
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
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
<button class="but" @click="del(item)">删除</button>
|
|
13
13
|
</b>
|
|
14
14
|
<b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="replace" ref="b">
|
|
15
|
-
|
|
15
|
+
<button v-if="collapse" class="but" :class="{'buts-actives': !item.open}" @click="openOption(index)">{{ item.open?'收起选项':'展开选项'}}</button>
|
|
16
|
+
<button class="but" @click="replaceTap(item,index)" :class="{'buts-actives': item.replace}">{{ replaceText }}</button>
|
|
16
17
|
</b>
|
|
17
18
|
<b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="choice" ref="b">
|
|
18
19
|
<button class="but"
|
|
@@ -26,17 +27,17 @@
|
|
|
26
27
|
</span>
|
|
27
28
|
</div>
|
|
28
29
|
</div>
|
|
29
|
-
<div v-if="item.alist" class="subject-html">
|
|
30
|
-
<div v-for="(
|
|
31
|
-
<div class="subject-html-title">{{ titleText }}{{
|
|
32
|
-
<div class="subject-html-cont" v-html="
|
|
30
|
+
<div v-if="item.alist" class="subject-html" v-show="item.open">
|
|
31
|
+
<div v-for="(it,ind) in item.alist">
|
|
32
|
+
<div class="subject-html-title">{{ titleText }}{{ ind + 1 }}</div>
|
|
33
|
+
<div class="subject-html-cont" v-html="it.annexContent"></div>
|
|
33
34
|
</div>
|
|
34
35
|
</div>
|
|
35
|
-
<div class="choice" v-if="item.testKey">
|
|
36
|
+
<div class="choice" v-if="item.testKey" v-show="item.open">
|
|
36
37
|
<div class="choice-box" v-for="(ts,ind) in item.testKey">
|
|
37
38
|
<label>
|
|
38
|
-
<input class="choice-input" :disabled="disabled" :checked="ts.checked" @change="answerChange($event,item,index)" :type="ques(item.quesType)?'radio':'checkbox'" :name="index" />
|
|
39
|
-
<span class="choice-span">{{ ts.index }}. {{ ts.content[0] }}</span>
|
|
39
|
+
<input class="choice-input" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked" @change="answerChange($event,item,index)" :type="ques(item.quesType)?'radio':'checkbox'" :name="index" />
|
|
40
|
+
<span :class="{'choice-span': chooseAnswer}">{{ ts.index }}. {{ ts.content[0] }}</span>
|
|
40
41
|
</label>
|
|
41
42
|
</div>
|
|
42
43
|
</div>
|
|
@@ -54,7 +55,8 @@ export default {
|
|
|
54
55
|
value: [],
|
|
55
56
|
multipleShow: this.multiple,
|
|
56
57
|
choiceState: true,
|
|
57
|
-
replaceShow: this.replace
|
|
58
|
+
replaceShow: this.replace,
|
|
59
|
+
replaceOpen: false
|
|
58
60
|
}
|
|
59
61
|
},
|
|
60
62
|
props: {
|
|
@@ -98,6 +100,14 @@ export default {
|
|
|
98
100
|
type: String,
|
|
99
101
|
default: '替换题目'
|
|
100
102
|
},
|
|
103
|
+
collapse: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false
|
|
106
|
+
},
|
|
107
|
+
chooseAnswer: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: true
|
|
110
|
+
}
|
|
101
111
|
},
|
|
102
112
|
watch: {
|
|
103
113
|
data: {
|
|
@@ -107,6 +117,8 @@ export default {
|
|
|
107
117
|
item.choice = true
|
|
108
118
|
item.right = 0
|
|
109
119
|
item.top = 0
|
|
120
|
+
item.open = true
|
|
121
|
+
item.replace = false
|
|
110
122
|
if(item.alist) {
|
|
111
123
|
item.alist.map(x => {
|
|
112
124
|
x.annexContent = json2html({node: "root",child: JSON.parse(x.annexContent)})
|
|
@@ -160,6 +172,9 @@ export default {
|
|
|
160
172
|
},
|
|
161
173
|
emits: ['change','modify','del','changeAll','replaceData','choiceData','judgeAnswer'],
|
|
162
174
|
methods: {
|
|
175
|
+
openOption(i) {
|
|
176
|
+
this.data[i].open = !this.data[i].open
|
|
177
|
+
},
|
|
163
178
|
answerChange(e,v,id) {
|
|
164
179
|
let answerArr = []
|
|
165
180
|
const ids = document.getElementsByName(id)
|
|
@@ -203,6 +218,8 @@ export default {
|
|
|
203
218
|
this.$emit('replaceData', {
|
|
204
219
|
data: v,
|
|
205
220
|
index: i
|
|
221
|
+
}, (e) => {
|
|
222
|
+
this.data[i].replace = e
|
|
206
223
|
})
|
|
207
224
|
},
|
|
208
225
|
choiceTap(v,i) {
|