mali-applet-ui 0.1.68 → 0.1.70

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.
@@ -176,16 +176,22 @@ export default {
176
176
  this.updateChecked()
177
177
  },
178
178
  setCheckboxRow (label, checked) {
179
- if (checked) {
180
- if (!this.selection.includes(label)) {
181
- this.selection.push(label)
182
- }
183
- } else {
184
- const index = this.selection.indexOf(label)
185
- if (index > -1) {
186
- this.selection.splice(index, 1)
187
- }
179
+ let labels = label
180
+ if (!XEUtils.isArray(label)) {
181
+ labels = [label]
188
182
  }
183
+ labels.forEach(val => {
184
+ if (checked) {
185
+ if (!this.selection.includes(val)) {
186
+ this.selection.push(val)
187
+ }
188
+ } else {
189
+ const index = this.selection.indexOf(val)
190
+ if (index > -1) {
191
+ this.selection.splice(index, 1)
192
+ }
193
+ }
194
+ })
189
195
  this.updateChecked()
190
196
  },
191
197
  clearCheckboxRow () {
@@ -69,16 +69,22 @@ export default {
69
69
  this.updateChecked()
70
70
  },
71
71
  setCheckboxRow (label, checked) {
72
- if (checked) {
73
- if (!this.selection.includes(label)) {
74
- this.selection.push(label)
75
- }
76
- } else {
77
- const index = this.selection.indexOf(label)
78
- if (index > -1) {
79
- this.selection.splice(index, 1)
80
- }
72
+ let labels = label
73
+ if (!XEUtils.isArray(label)) {
74
+ labels = [label]
81
75
  }
76
+ labels.forEach(val => {
77
+ if (checked) {
78
+ if (!this.selection.includes(val)) {
79
+ this.selection.push(val)
80
+ }
81
+ } else {
82
+ const index = this.selection.indexOf(val)
83
+ if (index > -1) {
84
+ this.selection.splice(index, 1)
85
+ }
86
+ }
87
+ })
82
88
  this.updateChecked()
83
89
  },
84
90
  clearCheckboxRow () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.68",
3
+ "version": "0.1.70",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",