@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zykjcommon/questions",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "main": "src/components/questions/entry.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -406,8 +406,8 @@ $greenItemFontSize:0.13em;
406
406
  //justify-content: space-between;
407
407
  align-content: start;
408
408
  &::-webkit-scrollbar {
409
- width: 7px;
410
- height: 7px;
409
+ width: 17px;
410
+ height: 17px;
411
411
  }
412
412
  &.noScrollBar::-webkit-scrollbar {
413
413
  width: 0;
@@ -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
- return answerd
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
@@ -178,7 +178,7 @@ export default {
178
178
  return {multiple_index_set:self.checkboxList}
179
179
  },
180
180
  isAnswered(){
181
- let answerd = this.checkboxList.length !== 0
181
+ let answerd = this.checkboxList.length > 1
182
182
  return answerd
183
183
  },
184
184
  isCorrect(){
@@ -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,