@zykjcommon/questions 0.0.33 → 0.0.34

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.33",
3
+ "version": "0.0.34",
4
4
  "main": "src/components/questions/entry.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -33,6 +33,7 @@ export let setRem = function(){
33
33
  }
34
34
 
35
35
  export let setRemFixedHeight = function(designWidth=1440,repairH = 0,scale=1,box){
36
+
36
37
  let baseNum = 100;
37
38
  let winWidth = document.documentElement.clientWidth || document.body.clientWidth;
38
39
  let winHeight = document.documentElement.clientHeight || document.body.clientHeight;
@@ -48,7 +48,9 @@ export default {
48
48
  },
49
49
  bus: {
50
50
  type: Object,
51
- default: {}
51
+ default(){
52
+ return {}
53
+ }
52
54
  },
53
55
  mode: {
54
56
  type: String,
@@ -221,7 +223,15 @@ export default {
221
223
  },
222
224
  setRootFontSize() {
223
225
  // setRemFixedHeight(1000,140,1.08)
224
- setRemFixedHeight(1000,this.screenRepairH,this.screenScale,this.$el)
226
+ // setRemFixedHeight(1000,this.screenRepairH,this.screenScale,this.$el)
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';
225
235
  },
226
236
  unmountedDo(){
227
237
  window.removeEventListener('resize',this.setRootFontSize)