@zykjcommon/questions 0.0.34 → 0.0.35
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.
|
|
3
|
+
"version": "0.0.35",
|
|
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){
|
|
@@ -223,15 +221,7 @@ export default {
|
|
|
223
221
|
},
|
|
224
222
|
setRootFontSize() {
|
|
225
223
|
// 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';
|
|
224
|
+
setRemFixedHeight(1000,this.screenRepairH,this.screenScale,this.$el)
|
|
235
225
|
},
|
|
236
226
|
unmountedDo(){
|
|
237
227
|
window.removeEventListener('resize',this.setRootFontSize)
|