@zykjcommon/questions 0.0.34 → 0.0.36
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/.browserslistrc +1 -0
- package/dist/zykjcommon-questions.common.js +1351 -8863
- package/dist/zykjcommon-questions.css +1 -1
- package/dist/zykjcommon-questions.umd.js +1351 -8863
- package/dist/zykjcommon-questions.umd.min.js +5 -5
- package/package.json +2 -2
- package/src/assets/js/rem.js +0 -3
- package/src/components/questions/Question_Classify.vue +3 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zykjcommon/questions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"main": "src/components/questions/entry.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"cookie": "^0.4.1",
|
|
19
19
|
"core-js": "^3.6.5",
|
|
20
20
|
"crypto-js": "^3.1.9-1",
|
|
21
|
-
"element-plus": "^2.0.2",
|
|
22
21
|
"md5": "^2.2.1",
|
|
23
22
|
"mitt": "^3.0.0",
|
|
24
23
|
"mobile-detect": "^1.4.5",
|
|
@@ -29,6 +28,7 @@
|
|
|
29
28
|
"vuex-composition-helpers": "^2.0.1"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
31
|
+
"element-plus": "^2.0.2",
|
|
32
32
|
"@types/node": "^18.11.9",
|
|
33
33
|
"@vue/cli-plugin-babel": "^5.0.1",
|
|
34
34
|
"@vue/cli-plugin-router": "~4.5.0",
|
package/src/assets/js/rem.js
CHANGED
|
@@ -33,15 +33,12 @@ export let setRem = function(){
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export let setRemFixedHeight = function(designWidth=1440,repairH = 0,scale=1,box){
|
|
36
|
-
|
|
37
36
|
let baseNum = 100;
|
|
38
37
|
let winWidth = document.documentElement.clientWidth || document.body.clientWidth;
|
|
39
38
|
let winHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
40
39
|
winHeight = winHeight - repairH
|
|
41
|
-
let html = document.getElementsByTagName('html')[0];
|
|
42
40
|
let frameBili = 4.3 / 3
|
|
43
41
|
let b = frameBili / (winWidth / winHeight)
|
|
44
42
|
let realW = parseInt(winWidth * b)
|
|
45
43
|
box.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
|
|
46
|
-
// console.log(html.style.fontSize);
|
|
47
44
|
}
|
|
@@ -76,10 +76,8 @@ export default {
|
|
|
76
76
|
this.unmountedDo()
|
|
77
77
|
},
|
|
78
78
|
mounted() {
|
|
79
|
-
this.
|
|
80
|
-
|
|
81
|
-
window.addEventListener('resize',this.setRootFontSize)
|
|
82
|
-
})
|
|
79
|
+
this.setRootFontSize()
|
|
80
|
+
window.addEventListener('resize',this.setRootFontSize)
|
|
83
81
|
this.init()
|
|
84
82
|
this.$watch('optionList',(nv)=>{
|
|
85
83
|
if(nv && nv.length){
|
|
@@ -171,22 +169,6 @@ export default {
|
|
|
171
169
|
let correct = this.questionInfo.answerMap.is_correct === '1' ? true : false
|
|
172
170
|
return correct
|
|
173
171
|
},
|
|
174
|
-
intervalFindEl(){
|
|
175
|
-
return new Promise((resolve,reject)=>{
|
|
176
|
-
console.log(this.$el,345);
|
|
177
|
-
debugger
|
|
178
|
-
if(this.$el){
|
|
179
|
-
resolve()
|
|
180
|
-
}else{
|
|
181
|
-
let interval = setInterval(()=>{
|
|
182
|
-
if(this.$el){
|
|
183
|
-
clearInterval(interval)
|
|
184
|
-
resolve()
|
|
185
|
-
}
|
|
186
|
-
},50)
|
|
187
|
-
}
|
|
188
|
-
})
|
|
189
|
-
},
|
|
190
172
|
parseLists(nv){
|
|
191
173
|
this.classify_question_info = nv.classify_question_info
|
|
192
174
|
let exam_options_data = nv.exam_options_data
|
|
@@ -223,15 +205,7 @@ export default {
|
|
|
223
205
|
},
|
|
224
206
|
setRootFontSize() {
|
|
225
207
|
// setRemFixedHeight(1000,140,1.08)
|
|
226
|
-
|
|
227
|
-
let baseNum = 100;
|
|
228
|
-
let winWidth = document.documentElement.clientWidth || document.body.clientWidth;
|
|
229
|
-
let winHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
230
|
-
winHeight = winHeight - this.screenRepairH
|
|
231
|
-
let frameBili = 4.3 / 3
|
|
232
|
-
let b = frameBili / (winWidth / winHeight)
|
|
233
|
-
let realW = parseInt(winWidth * b)
|
|
234
|
-
this.$el.style.fontSize = (realW / 1000) * baseNum * this.screenScale + 'px';
|
|
208
|
+
setRemFixedHeight(1000,this.screenRepairH,this.screenScale,this.$el)
|
|
235
209
|
},
|
|
236
210
|
unmountedDo(){
|
|
237
211
|
window.removeEventListener('resize',this.setRootFontSize)
|