@zykjcommon/questions 0.0.28 → 0.0.30

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.28",
3
+ "version": "0.0.30",
4
4
  "main": "src/components/questions/entry.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -32,17 +32,15 @@ export let setRem = function(){
32
32
  //动态设置html的font-size ----end
33
33
  }
34
34
 
35
- export let setRemFixedHeight = function(designWidth=1440,repairH = 0,scale=1){
35
+ export let setRemFixedHeight = function(designWidth=1440,repairH = 0,scale=1,parent){
36
36
  let baseNum = 100;
37
37
  let winWidth = document.documentElement.clientWidth || document.body.clientWidth;
38
38
  let winHeight = document.documentElement.clientHeight || document.body.clientHeight;
39
39
  winHeight = winHeight - repairH
40
40
  let html = document.getElementsByTagName('html')[0];
41
- let frameBili = 4 / 3
41
+ let frameBili = 4.3 / 3
42
42
  let b = frameBili / (winWidth / winHeight)
43
43
  let realW = parseInt(winWidth * b)
44
- let parent = document.querySelector('.zykjcommon-question')
45
44
  parent.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
46
- // html.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
47
45
  console.log(html.style.fontSize);
48
46
  }
@@ -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%;
@@ -203,7 +203,7 @@ export default {
203
203
  },
204
204
  setRootFontSize() {
205
205
  // setRemFixedHeight(1000,140,1.08)
206
- setRemFixedHeight(1000,this.screenRepairH,this.screenScale)
206
+ setRemFixedHeight(1000,this.screenRepairH,this.screenScale,this.$el)
207
207
  },
208
208
  unmountedDo(){
209
209
  window.removeEventListener('resize',this.setRootFontSize)
@@ -7,7 +7,6 @@
7
7
  :questionInfo="responsiveObj.curQuestionInfo"
8
8
  :screenRepairH="140"
9
9
  @getIsAnswered="getIsAnswered"
10
- :screenScale="1.08"
11
10
  :ref="'question'"/>
12
11
  </div>
13
12
  <div class="footer" @click="submit">{{isAnswered}}</div>