zydx-plus 1.28.135 → 1.28.136

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.28.135",
3
+ "version": "1.28.136",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -25,7 +25,6 @@
25
25
  </div>
26
26
  </div>
27
27
  </div>
28
- <button @click="getContent">成功</button>
29
28
  </div>
30
29
  </template>
31
30
 
@@ -6,7 +6,7 @@
6
6
  <input type="number" :value="inputValue" @input="numbers" @keypress="isNumberKey($event)" />
7
7
  </div>
8
8
  </div>
9
- <div class="preface-right">
9
+ <div class="preface-right" v-if="radioValue !== null">
10
10
  <span>难易设置:</span>
11
11
  <div class="preface-list" v-for="(item,index) in radioList">
12
12
  <label>
@@ -57,11 +57,11 @@ export default {
57
57
  emits: ['change'],
58
58
  methods: {
59
59
  updateData(v) {
60
- this.radioValue = v.diffLeve;
60
+ this.radioValue = (v.diffLeve === undefined)? null :v.diffLeve;
61
61
  this.radioList.map(x => {
62
62
  x.checked = x.value === v.diffLeve;
63
63
  })
64
- this.inputValue = v.quesNo;
64
+ this.inputValue = (v.quesNo === undefined)? '': v.quesNo;
65
65
  },
66
66
  radioTao(v) {
67
67
  this.radioValue = v;
@@ -86,9 +86,15 @@
86
86
  display: flex;
87
87
  align-items: center;
88
88
  }
89
- .subject span{
89
+ .subject-title{
90
90
  flex: 1;
91
91
  }
92
+ .subject-title label{
93
+ display: flex;
94
+ }
95
+ .subject span em{
96
+ font-style: normal;
97
+ }
92
98
  .choice-box{
93
99
  text-indent: 2em;
94
100
  line-height: 25px;
@@ -128,4 +134,9 @@
128
134
  cursor: pointer;
129
135
  min-width: 60px;
130
136
  height: 21px;
137
+ }
138
+ input[name='check'] {
139
+ width: 15px;
140
+ height: 15px;
141
+ margin: 5px 5px 0 0;
131
142
  }
@@ -3,7 +3,12 @@
3
3
  <div class="parer-cont">
4
4
  <div class="paper-choice" :class="{'array-ch': !styleText(item.testKey)}" v-for="(item,index) in data">
5
5
  <div class="subject">
6
- <span>{{ index + 1 }}.{{ item.title }}</span>
6
+ <div class="subject-title">
7
+ <label>
8
+ <input v-if="multipleShow" type="checkbox" @change="checkboxChange($event,index)" name="check" />
9
+ <span>{{ index + 1 }}.<em v-html="item.title"></em></span>
10
+ </label>
11
+ </div>
7
12
  <div class="subject-but">
8
13
  <button class="but" @click="modify(item)">修改</button>
9
14
  <button class="but" @click="del(item)">删除</button>
@@ -28,7 +33,8 @@ export default {
28
33
  name: "zydx-seek",
29
34
  data() {
30
35
  return {
31
- value: this.data
36
+ value: this.data,
37
+ multipleShow: this.multiple
32
38
  }
33
39
  },
34
40
  props: {
@@ -43,6 +49,10 @@ export default {
43
49
  butShow: {
44
50
  type: Boolean,
45
51
  default: true
52
+ },
53
+ multiple: {
54
+ type: Boolean,
55
+ default: false
46
56
  }
47
57
  },
48
58
  watch: {
@@ -51,9 +61,21 @@ export default {
51
61
  this.value = val
52
62
  },
53
63
  deep: true
64
+ },
65
+ multiple: {
66
+ handler: function (val, oldVal) {
67
+ this.multipleShow = val
68
+ },
69
+ deep: true
54
70
  }
55
71
  },
56
72
  methods: {
73
+ checkboxChange(e,index) {
74
+ this.$emit('change', {
75
+ data: this.value[index],
76
+ value: e.target.checked
77
+ })
78
+ },
57
79
  modify(v) {
58
80
  this.$emit('modify',v)
59
81
  },
package/src/index.js CHANGED
@@ -67,7 +67,7 @@ function install(app) {
67
67
  }
68
68
 
69
69
  export default {
70
- version: '1.28.135',
70
+ version: '1.28.136',
71
71
  install,
72
72
  Calendar,
73
73
  Message,