@sheinx/hooks 3.9.9-beta.5 → 3.9.9-beta.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.
- package/cjs/common/use-list-select/use-list-select-multiple.d.ts.map +1 -1
- package/cjs/common/use-list-select/use-list-select-multiple.js +23 -6
- package/esm/common/use-list-select/use-list-select-multiple.d.ts.map +1 -1
- package/esm/common/use-list-select/use-list-select-multiple.js +23 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-list-select-multiple.d.ts","sourceRoot":"","sources":["use-list-select-multiple.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAMtE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-list-select-multiple.d.ts","sourceRoot":"","sources":["use-list-select-multiple.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAMtE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;sDA6MK;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;;;;4BAjNzB,GAAG;;qCA6PqB,MAAM;;CAoC5D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -70,13 +70,30 @@ var useListSelectMultiple = function useListSelectMultiple(props) {
|
|
|
70
70
|
values.push(item.value);
|
|
71
71
|
continue;
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
var isDisabled = disabledCheck(item);
|
|
74
|
+
|
|
75
|
+
// childrenKey 参数由 treeCheckAll 属性控制:
|
|
76
|
+
// - 当 Table 组件设置 treeCheckAll=true 时, thead 全选会传入 childrenKey
|
|
77
|
+
// - 当 treeCheckAll=false 或 undefined 时, childrenKey 为 undefined
|
|
78
|
+
if (childrenKey) {
|
|
79
|
+
// 树形递归模式 (treeCheckAll=true):
|
|
80
|
+
// 即使父节点 disabled, 也要递归处理其子节点
|
|
81
|
+
// 这样可以选中 disabled 父节点下未 disabled 的子节点
|
|
82
|
+
if (!isDisabled) {
|
|
83
|
+
values.push(formatData(item));
|
|
84
|
+
}
|
|
85
|
+
// 递归处理子节点
|
|
86
|
+
if (item && item[childrenKey]) {
|
|
87
|
+
var children = item[childrenKey];
|
|
88
|
+
if (children.length) {
|
|
89
|
+
values.push.apply(values, _toConsumableArray(getFlatDataValue(children, childrenKey)));
|
|
90
|
+
}
|
|
79
91
|
}
|
|
92
|
+
} else {
|
|
93
|
+
// 非树形递归模式 (treeCheckAll=false 或 undefined):
|
|
94
|
+
// 保持原有逻辑, disabled 节点直接跳过, 不处理其子节点
|
|
95
|
+
if (isDisabled) continue;
|
|
96
|
+
values.push(formatData(item));
|
|
80
97
|
}
|
|
81
98
|
}
|
|
82
99
|
return values;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-list-select-multiple.d.ts","sourceRoot":"","sources":["use-list-select-multiple.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAMtE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-list-select-multiple.d.ts","sourceRoot":"","sources":["use-list-select-multiple.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAMtE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;sDA6MK;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;;;;4BAjNzB,GAAG;;qCA6PqB,MAAM;;CAoC5D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -60,13 +60,30 @@ var useListSelectMultiple = function useListSelectMultiple(props) {
|
|
|
60
60
|
values.push(item.value);
|
|
61
61
|
continue;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
var isDisabled = disabledCheck(item);
|
|
64
|
+
|
|
65
|
+
// childrenKey 参数由 treeCheckAll 属性控制:
|
|
66
|
+
// - 当 Table 组件设置 treeCheckAll=true 时, thead 全选会传入 childrenKey
|
|
67
|
+
// - 当 treeCheckAll=false 或 undefined 时, childrenKey 为 undefined
|
|
68
|
+
if (childrenKey) {
|
|
69
|
+
// 树形递归模式 (treeCheckAll=true):
|
|
70
|
+
// 即使父节点 disabled, 也要递归处理其子节点
|
|
71
|
+
// 这样可以选中 disabled 父节点下未 disabled 的子节点
|
|
72
|
+
if (!isDisabled) {
|
|
73
|
+
values.push(formatData(item));
|
|
74
|
+
}
|
|
75
|
+
// 递归处理子节点
|
|
76
|
+
if (item && item[childrenKey]) {
|
|
77
|
+
var children = item[childrenKey];
|
|
78
|
+
if (children.length) {
|
|
79
|
+
values.push.apply(values, _toConsumableArray(getFlatDataValue(children, childrenKey)));
|
|
80
|
+
}
|
|
69
81
|
}
|
|
82
|
+
} else {
|
|
83
|
+
// 非树形递归模式 (treeCheckAll=false 或 undefined):
|
|
84
|
+
// 保持原有逻辑, disabled 节点直接跳过, 不处理其子节点
|
|
85
|
+
if (isDisabled) continue;
|
|
86
|
+
values.push(formatData(item));
|
|
70
87
|
}
|
|
71
88
|
}
|
|
72
89
|
return values;
|