zzz-pc-view 0.0.91 → 0.0.92
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/package.json +1 -1
- package/src/index.es.js +17 -0
- package/src/index.umd.js +1 -1
- package/src/utils/operator/selectCtrl.d.ts +18 -0
package/package.json
CHANGED
package/src/index.es.js
CHANGED
|
@@ -1949,9 +1949,26 @@ const selectCtrlByInvert = (param) => {
|
|
|
1949
1949
|
}, [])
|
|
1950
1950
|
);
|
|
1951
1951
|
};
|
|
1952
|
+
const selectCtrlByClear = (param) => {
|
|
1953
|
+
const { keyProp } = param;
|
|
1954
|
+
return param.toMap ? (
|
|
1955
|
+
// 如果 toMap 为真,则使用 reduce 方法将列表转换为键值对对象,所有键对应的选择状态都设为 false
|
|
1956
|
+
param.list.reduce(
|
|
1957
|
+
(map2, item) => {
|
|
1958
|
+
map2[item[keyProp]] = false;
|
|
1959
|
+
return map2;
|
|
1960
|
+
},
|
|
1961
|
+
{}
|
|
1962
|
+
)
|
|
1963
|
+
) : (
|
|
1964
|
+
// 如果 toMap 为假或未提供,则返回一个空数组
|
|
1965
|
+
[]
|
|
1966
|
+
);
|
|
1967
|
+
};
|
|
1952
1968
|
const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1953
1969
|
__proto__: null,
|
|
1954
1970
|
selectCtrlByAll,
|
|
1971
|
+
selectCtrlByClear,
|
|
1955
1972
|
selectCtrlByInvert
|
|
1956
1973
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1957
1974
|
const ZUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|