zzz-pc-view 0.0.88 → 0.0.90
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 +27 -18
- package/src/index.umd.js +1 -1
- package/src/utils/operator/selectCtrl.d.ts +34 -0
package/package.json
CHANGED
package/src/index.es.js
CHANGED
|
@@ -1926,20 +1926,28 @@ const selectCtrlByAll = (param) => {
|
|
|
1926
1926
|
};
|
|
1927
1927
|
const selectCtrlByInvert = (param) => {
|
|
1928
1928
|
const { keyProp, selected, defaultBoolean } = param;
|
|
1929
|
-
return
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1929
|
+
return (
|
|
1930
|
+
// 根据 toMap 的值选择不同的处理方式
|
|
1931
|
+
param.toMap ? param.list.reduce(
|
|
1932
|
+
// 将列表转换为映射对象,反转每个元素的选择状态
|
|
1933
|
+
(map2, item) => {
|
|
1934
|
+
const key2 = item[keyProp];
|
|
1935
|
+
map2[key2] = Object.prototype.hasOwnProperty.call(selected, key2) ? !selected[key2] : defaultBoolean;
|
|
1936
|
+
return map2;
|
|
1937
|
+
},
|
|
1938
|
+
{}
|
|
1939
|
+
) : param.list.reduce(
|
|
1940
|
+
// 将列表转换为数组,只包含反转后选择状态为 true 的元素
|
|
1941
|
+
(list2, item) => {
|
|
1942
|
+
const key2 = item[keyProp];
|
|
1943
|
+
if (Object.prototype.hasOwnProperty.call(selected, key2) ? !selected[key2] : defaultBoolean) {
|
|
1944
|
+
list2.push(key2);
|
|
1945
|
+
}
|
|
1946
|
+
return list2;
|
|
1947
|
+
},
|
|
1948
|
+
[]
|
|
1949
|
+
)
|
|
1950
|
+
);
|
|
1943
1951
|
};
|
|
1944
1952
|
const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1945
1953
|
__proto__: null,
|
|
@@ -3960,14 +3968,15 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3960
3968
|
let chartInstance;
|
|
3961
3969
|
const setChartOption = () => {
|
|
3962
3970
|
chartInstance.resize();
|
|
3963
|
-
|
|
3971
|
+
const { chartOption } = props.renderParam;
|
|
3972
|
+
if (chartOption) {
|
|
3973
|
+
chartInstance.setOption(props.renderParam.chartOption);
|
|
3974
|
+
}
|
|
3964
3975
|
};
|
|
3965
3976
|
const init = () => {
|
|
3966
3977
|
chartInstance = ECharts.init(elRef.value, props.theme);
|
|
3967
3978
|
emit("ready", chartInstance);
|
|
3968
|
-
|
|
3969
|
-
setChartOption();
|
|
3970
|
-
}
|
|
3979
|
+
setChartOption();
|
|
3971
3980
|
};
|
|
3972
3981
|
const destroy = () => {
|
|
3973
3982
|
if (!chartInstance) {
|