zmdms-webui 2.6.6 → 2.6.7

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.
@@ -215,14 +215,15 @@ var DynamicDrawer = function (props, ref) {
215
215
  });
216
216
  newDynamicList[pIndex].children = changeCList;
217
217
  // 联动父元素
218
- var allChildrenChecked = changeCList.length > 0 && changeCList.every(function (child) { return child.checked; });
219
- changeCList.some(function (child) { return child.checked; });
220
- if (allChildrenChecked) {
221
- // 所有子元素都选中,父元素也选中
218
+ // const allChildrenChecked =
219
+ // changeCList.length > 0 && changeCList.every((child) => child.checked);
220
+ var someChildrenChecked = changeCList.some(function (child) { return child.checked; });
221
+ if (someChildrenChecked) {
222
+ // 只要有子元素选中,父元素就应该是 checked = true
222
223
  newDynamicList[pIndex].checked = true;
223
224
  }
224
225
  else {
225
- // 部分选中或全不选中,父元素取消选中(配合 indeterminate 显示半选状态)
226
+ // 所有子元素都不选中,父元素才取消选中
226
227
  newDynamicList[pIndex].checked = false;
227
228
  }
228
229
  setTempDynamicList(sortDynamicListByType(newDynamicList));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "2.6.6",
3
+ "version": "2.6.7",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",