hy-app 0.3.14 → 0.3.15

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.
@@ -113,9 +113,15 @@ watch(
113
113
  () => props.checked,
114
114
  (newValue) => {
115
115
  isChecked.value = newValue;
116
- if (props.checked) {
117
- checkboxGroup?.setCheckedStatus(props.value);
118
- }
116
+ if (props.checked) checkboxGroup?.setCheckedStatus(props.value);
117
+ },
118
+ { immediate: true },
119
+ );
120
+
121
+ watch(
122
+ () => checkboxGroup?.modelValue,
123
+ (newVal) => {
124
+ if (newVal?.length) isChecked.value = newVal.includes(props.value);
119
125
  },
120
126
  { immediate: true },
121
127
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.3.14",
4
- "description": "修改小问题,新增复选框分开组件",
3
+ "version": "0.3.15",
4
+ "description": "fix: 修复复选框默认值没有选中bug",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},