zydx-plus 1.22.124 → 1.28.125

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": "zydx-plus",
3
- "version": "1.22.124",
3
+ "version": "1.28.125",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -25,6 +25,7 @@
25
25
  </div>
26
26
  </div>
27
27
  </div>
28
+ <button @click="getContent">成功</button>
28
29
  </div>
29
30
  </template>
30
31
 
@@ -37,12 +38,46 @@ export default {
37
38
  letter: {0:'A',1:'B',2:'C',3:'D',4:'E',5:'F',6:'G',7:'H'},
38
39
  }
39
40
  },
41
+ props: {
42
+ value: {
43
+ handler: function (val, oldVal) {
44
+ this.list = this.organize(val)
45
+ },
46
+ immediate: true
47
+ }
48
+ },
49
+ mounted() {
50
+ this.list = this.organize(this.value)
51
+ },
40
52
  methods: {
53
+ // 整理数据
54
+ organize() {
55
+ let arr = []
56
+ this.value.forEach(x => {
57
+ arr.push({
58
+ type: (x.isRight)? 'correct' : 'disturb',
59
+ letter: x.index,
60
+ title: (x.isRight)? '正确选项' : '干扰选项',
61
+ list: x.content.map(y => ({value: y}))
62
+ })
63
+ })
64
+ return arr
65
+ },
41
66
  getContent() {
42
- return this.list
67
+ let arr = []
68
+ this.list.forEach(x => {
69
+ arr.push({
70
+ index: x.letter,
71
+ isRight: x.title === '正确选项',
72
+ content: x.list.map(y => y.value)
73
+ })
74
+ })
75
+ console.log(arr)
76
+ return arr
43
77
  },
44
78
  add(str) {
45
79
  const index = this.list.length
80
+ if(index === 8) return
46
81
  this.list.push({
47
82
  type: str,
48
83
  letter: this.letter[index],
@@ -10,14 +10,6 @@
10
10
  </div>
11
11
  <div class="page-but-left" :style="{cursor: pageIndex === 1?'default':'pointer'}" @click="flipLeft(pageIndex-=1,false)"></div>
12
12
  <div class="page-but-right" :style="{cursor: pageIndex === pdfPages?'default':'pointer'}" @click="flipRight(pageIndex+=1,false)"></div>
13
- <!-- <div class="paper z-in" :class="{'data-right': pages}">-->
14
- <!-- <div class="page page-2" id="canvas-wrap1"></div>-->
15
- <!-- <div class="page page-2-back" id="canvas-wrap2"></div>-->
16
- <!-- </div>-->
17
- <!-- <div class="paper z-in-ac">-->
18
- <!-- <div class="page page-2" id="canvas-wrap3"></div>-->
19
- <!-- <div class="page page-2-back" id="canvas-wrap4"></div>-->
20
- <!-- </div>-->
21
13
  </div>
22
14
  </div>
23
15
  <div class="but-wrap" v-if="butShow">
@@ -95,6 +87,7 @@ export default {
95
87
  flipLeft(e,v) {
96
88
  if(e <= 1) {
97
89
  this.pageIndex = 1
90
+ return
98
91
  }else {
99
92
  this.pageIndex = e
100
93
  }
@@ -109,6 +102,7 @@ export default {
109
102
  flipRight(e,v) {
110
103
  if(e >= this.pdfPages) {
111
104
  this.pageIndex = this.pdfPages
105
+ return
112
106
  }else {
113
107
  this.pageIndex = e
114
108
  }
@@ -137,7 +131,7 @@ export default {
137
131
  let renderContext = {
138
132
  canvasContext: ctx,
139
133
  viewport: viewport,
140
- transform: [2, 0, 0, 2, 0, 0]//这里会进行放大,解决模糊问题
134
+ transform: [2, 0, 0, 2, 0, 0] //这里会进行放大,解决模糊问题
141
135
  }
142
136
  page.render(renderContext)
143
137
  that.loading = false
@@ -254,7 +248,7 @@ export default {
254
248
 
255
249
  @keyframes loading-animation {
256
250
  0% {
257
- width: 0%;
251
+ width: 0;
258
252
  }
259
253
 
260
254
  100% {
package/src/index.js CHANGED
@@ -67,7 +67,7 @@ function install(app) {
67
67
  }
68
68
 
69
69
  export default {
70
- version: '1.22.124',
70
+ version: '1.28.125',
71
71
  install,
72
72
  Calendar,
73
73
  Message,