uview-plus 3.1.11 → 3.1.12

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/changelog.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## 3.1.12(2022-09-15)
2
+ check-box组件清空数组时无法更新视图的问题
1
3
  ## 3.1.11(2022-09-14)
2
4
  修复u-checkbox-group等
3
5
  ## 3.1.10(2022-09-14)
@@ -73,7 +73,12 @@
73
73
  activeColor: null,
74
74
  inactiveColor: null,
75
75
  size: 18,
76
+ // #ifdef VUE2
76
77
  value: null,
78
+ // #endif
79
+ // #ifdef VUE3
80
+ modelValue: null,
81
+ // #endif
77
82
  iconColor: null,
78
83
  placement: 'row',
79
84
  borderBottom: false,
@@ -183,12 +188,18 @@
183
188
  if (!this.parent) {
184
189
  uni.$u.error('u-checkbox必须搭配u-checkbox-group组件使用')
185
190
  }
191
+ // #ifdef VUE2
192
+ const value = this.parentData.value
193
+ // #endif
194
+ // #ifdef VUE3
195
+ const value = this.parentData.modelValue
196
+ // #endif
186
197
  // 设置初始化时,是否默认选中的状态,父组件u-checkbox-group的value可能是array,所以额外判断
187
198
  if (this.checked) {
188
199
  this.isChecked = true
189
- } else if (uni.$u.test.array(this.parentData.value)) {
200
+ } else if (uni.$u.test.array(value)) {
190
201
  // 查找数组是是否存在this.name元素值
191
- this.isChecked = this.parentData.value.some(item => {
202
+ this.isChecked = value.some(item => {
192
203
  return item === this.name
193
204
  })
194
205
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "uview-plus3.0重磅发布,利剑出鞘,一统江湖",
5
- "version": "3.1.11",
5
+ "version": "3.1.12",
6
6
  "description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",