zydx-plus 1.32.276 → 1.32.277

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.32.276",
3
+ "version": "1.32.277",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -241,3 +241,25 @@ input[name='check'] {
241
241
  font-weight: 700;
242
242
  flex: 1;
243
243
  }
244
+ .choice-ico{
245
+ width: 15px;
246
+ height: 15px;
247
+ display: inline-block;
248
+ border: 1px solid #666;
249
+ border-radius: 3px;
250
+ position: absolute;
251
+ top: 4px;
252
+ left: 2em;
253
+ z-index: 1;
254
+ }
255
+ .check-active{
256
+ background-color: #007acc;
257
+ border: 1px solid #007acc;
258
+ }
259
+ .check-dis{
260
+ background-color: #d0d0d0;
261
+ border: 1px solid #d0d0d0;
262
+ }
263
+ .check-dis-bor{
264
+ border: 1px solid #d0d0d0;
265
+ }
@@ -55,7 +55,7 @@
55
55
  @click="review(index)">{{ item.review ? reasoningBut[1].startName : reasoningBut[1].endName }}</button>
56
56
  </b>
57
57
  <b :style="{right: -item.right + 'px', top: item.top + 'px'}" v-if="customBut.length > 0" ref="b">
58
- <button class="but" v-for="(item,index) in customBut" :class="{'buts-actives': item.active}" @click="item.onClick(item)">{{ item.name }}</button>
58
+ <button class="but" v-for="(it,ind) in customBut" :class="{'buts-actives': it.active}" @click="customButTap(it,item)">{{ it.name }}</button>
59
59
  </b>
60
60
  </i>
61
61
  </span>
@@ -71,15 +71,25 @@
71
71
  </div>
72
72
  <div class="choice" v-if="item.testKey" v-show="item.open">
73
73
  <div class="choice-box" v-for="(ts,ind) in item.testKey">
74
- <label>
74
+ <label v-if="ques(item.quesType)">
75
75
  <input class="choice-input" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked"
76
- @change="answerChange($event,item,`${id}${index}`)" :type="ques(item.quesType)?'radio':'checkbox'"
76
+ @change="answerChange($event,item,`${id}${index}`,null)" type="radio"
77
77
  :name="`${id}${index}`"/>
78
78
  <span
79
79
  :class="{'choice-span': chooseAnswer,'choice-color': disabled&&ts.checked&&!item.error&&!nothing,'choice-red': disabled&&ts.checked&&item.error&&!nothing}">{{
80
80
  ts.index
81
81
  }}. {{ ts.content[0] }}</span>
82
82
  </label>
83
+ <label v-else>
84
+ <input class="choice-input" style="display: none;" v-if="chooseAnswer" :disabled="disabled" :checked="ts.checked"
85
+ @change="answerChange($event,item,`${id}${index}`,ts)" type="checkbox"
86
+ :name="`${id}${index}`"/>
87
+ <i class="choice-ico" :class="{'check-active': ts.checked, 'check-dis': disabled&&ts.checked,'check-dis-bor': disabled&&!ts.checked}"></i>
88
+ <span
89
+ :class="{'choice-span': chooseAnswer,'choice-color': disabled&&ts.checked&&!item.error&&!nothing,'choice-red': disabled&&ts.checked&&item.error&&!nothing}">{{
90
+ ts.index
91
+ }}. {{ ts.content[0] }}</span>
92
+ </label>
83
93
  </div>
84
94
  </div>
85
95
  <div class="table" v-if="item.replace&&item.itemList&&collapse&&item.quesType === '102_1'">
@@ -254,6 +264,10 @@ export default {
254
264
  },
255
265
  emits: ['change', 'modify', 'del', 'changeAll', 'replaceData', 'choiceData', 'judgeAnswer', 'openReasoning', 'review', 'subject'],
256
266
  methods: {
267
+ customButTap(e,d) {
268
+ if(e.key === 'option') d.open = !d.open
269
+ e.onClick(e)
270
+ },
257
271
  init() {
258
272
  this.value = JSON.parse(JSON.stringify(this.data))
259
273
  this.value.map((item, index) => { // 转换html
@@ -330,7 +344,8 @@ export default {
330
344
  statistics(i) {
331
345
  this.value[i].replace = !this.value[i].replace
332
346
  },
333
- answerChange(e, v, id) {
347
+ answerChange(e, v, id, check) {
348
+ if(check !== null) check.checked = e.target.checked
334
349
  let answerArr = []
335
350
  const ids = document.getElementsByName(id)
336
351
  ids.forEach((x, index) => {
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.276',
82
+ version: '1.32.277',
83
83
  install,
84
84
  Calendar,
85
85
  Message,