@zykjcommon/questions 0.0.49 → 0.0.50
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/dist/zykjcommon-questions.common.js +148 -114
- package/dist/zykjcommon-questions.css +1 -1
- package/dist/zykjcommon-questions.umd.js +148 -114
- package/dist/zykjcommon-questions.umd.min.js +4 -4
- package/package.json +1 -1
- package/src/assets/scss/questions/zykjcommon-questions.scss +2 -2
- package/src/components/questions/Question_Classify.vue +14 -3
- package/src/components/questions/Question_MultipleChoice.vue +1 -1
- package/src/components/questions/Question_Programming.vue +20 -0
package/package.json
CHANGED
|
@@ -163,9 +163,20 @@ export default {
|
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
165
|
isAnswered(){
|
|
166
|
-
let len = $(this.$el).find('.list .list-item').length
|
|
167
|
-
let answerd = len === 0
|
|
168
|
-
|
|
166
|
+
// let len = $(this.$el).find('.list .list-item').length
|
|
167
|
+
// let answerd = len === 0
|
|
168
|
+
//每个选中框至少要有一个选项才是已答
|
|
169
|
+
let arr = []
|
|
170
|
+
let mainAppend = $(this.$el).find('.main-append')
|
|
171
|
+
mainAppend.each((index,item)=>{
|
|
172
|
+
let appendItem = $(item).find('.append-item')
|
|
173
|
+
arr.push(appendItem.length)
|
|
174
|
+
})
|
|
175
|
+
if(arr.length === 2){
|
|
176
|
+
return arr[0] && arr[1]
|
|
177
|
+
}else{
|
|
178
|
+
return false
|
|
179
|
+
}
|
|
169
180
|
},
|
|
170
181
|
isCorrect(){
|
|
171
182
|
let correct = this.questionInfo.answerMap.is_correct === '1' ? true : false
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
@saveCodeOnly="saveCodeOnly"
|
|
71
71
|
@iframeLoaded="iframeLoaded"
|
|
72
72
|
@getQuestionInfo="getQuestionInfo"
|
|
73
|
+
@menuBarloaded="menuBarloaded"
|
|
73
74
|
v-if="showFrame"></IframeComponent>
|
|
74
75
|
<Loading :loading="loading"></Loading>
|
|
75
76
|
</div>
|
|
@@ -153,6 +154,7 @@ export default {
|
|
|
153
154
|
},
|
|
154
155
|
data() {
|
|
155
156
|
return {
|
|
157
|
+
findIframeTimer:null,
|
|
156
158
|
iframe:null,
|
|
157
159
|
showFrame:false,
|
|
158
160
|
analyCorrectAnswer:'',
|
|
@@ -199,6 +201,24 @@ export default {
|
|
|
199
201
|
},
|
|
200
202
|
methods: {
|
|
201
203
|
...mapActions('zykjcommonQuestions',['getEditorUrlActions']),
|
|
204
|
+
menuBarloaded(){
|
|
205
|
+
this.$emit('menuBarloaded')
|
|
206
|
+
},
|
|
207
|
+
getIframeContentWindow(){
|
|
208
|
+
return new Promise((resolve,reject)=>{
|
|
209
|
+
if(this.iframe){
|
|
210
|
+
resolve(this.iframe.contentWindow)
|
|
211
|
+
}else{
|
|
212
|
+
this.findIframeTimer = setInterval(()=>{
|
|
213
|
+
if(this.iframe){
|
|
214
|
+
this.findIframeTimer && clearInterval(this.findIframeTimer)
|
|
215
|
+
this.findIframeTimer = null
|
|
216
|
+
resolve(this.iframe.contentWindow)
|
|
217
|
+
}
|
|
218
|
+
},200)
|
|
219
|
+
}
|
|
220
|
+
})
|
|
221
|
+
},
|
|
202
222
|
getAnswer(){
|
|
203
223
|
return {
|
|
204
224
|
code_file_oss_temp_path:this.code_file_oss_temp_path,
|