@zykjcommon/questions 0.0.29 → 0.0.31

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.29",
3
+ "version": "0.0.31",
4
4
  "main": "src/components/questions/entry.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,5 +1,6 @@
1
1
  $greenItemFontSize:0.14em;
2
2
  .zykjcommon-question{
3
+ box-sizing: border-box;
3
4
  .editor-content{
4
5
  margin-top: 10px;
5
6
  width: 100%;
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
  <div class="main-content">
12
12
  <div class="main-append">
13
- <!-- <div class="append-item"></div>-->
13
+ <!-- <div class="append-item"></div>-->
14
14
  </div>
15
15
  </div>
16
16
  </div>
@@ -74,8 +74,10 @@ export default {
74
74
  this.unmountedDo()
75
75
  },
76
76
  mounted() {
77
- this.setRootFontSize()
78
- window.addEventListener('resize',this.setRootFontSize)
77
+ this.intervalFindEl().then(()=>{
78
+ this.setRootFontSize()
79
+ window.addEventListener('resize',this.setRootFontSize)
80
+ })
79
81
  this.init()
80
82
  this.$watch('optionList',(nv)=>{
81
83
  if(nv && nv.length){
@@ -167,6 +169,20 @@ export default {
167
169
  let correct = this.questionInfo.answerMap.is_correct === '1' ? true : false
168
170
  return correct
169
171
  },
172
+ intervalFindEl(){
173
+ return new Promise((resolve,reject)=>{
174
+ if(this.$el){
175
+ resolve()
176
+ }else{
177
+ let interval = setInterval(()=>{
178
+ if(this.$el){
179
+ clearInterval(interval)
180
+ resolve()
181
+ }
182
+ },50)
183
+ }
184
+ })
185
+ },
170
186
  parseLists(nv){
171
187
  this.classify_question_info = nv.classify_question_info
172
188
  let exam_options_data = nv.exam_options_data