zzz-pc-view 0.0.94 → 0.0.96
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
CHANGED
package/src/index.es.js
CHANGED
|
@@ -3987,6 +3987,82 @@ const useBaseEChartViewUtil = (responseKey, eventHandler) => {
|
|
|
3987
3987
|
}
|
|
3988
3988
|
return response2;
|
|
3989
3989
|
};
|
|
3990
|
+
var LegendChangeType = /* @__PURE__ */ ((LegendChangeType2) => {
|
|
3991
|
+
LegendChangeType2[LegendChangeType2["CHART"] = 0] = "CHART";
|
|
3992
|
+
LegendChangeType2[LegendChangeType2["SELECT_BY_ALL"] = 1] = "SELECT_BY_ALL";
|
|
3993
|
+
LegendChangeType2[LegendChangeType2["SELECT_BY_INVERT"] = 2] = "SELECT_BY_INVERT";
|
|
3994
|
+
LegendChangeType2[LegendChangeType2["SELECT_BY_CLEAR"] = 3] = "SELECT_BY_CLEAR";
|
|
3995
|
+
return LegendChangeType2;
|
|
3996
|
+
})(LegendChangeType || {});
|
|
3997
|
+
const useLegendSelectCtrl = (param) => {
|
|
3998
|
+
const legendSelectedRef = shallowRef(
|
|
3999
|
+
param.defaultSelected ?? {}
|
|
4000
|
+
);
|
|
4001
|
+
const onLegendSelectChanged = (event) => {
|
|
4002
|
+
legendSelectedRef.value = event.selected;
|
|
4003
|
+
param.callback(
|
|
4004
|
+
0
|
|
4005
|
+
/* CHART */
|
|
4006
|
+
);
|
|
4007
|
+
};
|
|
4008
|
+
const onSelectByAllBtnClick = () => {
|
|
4009
|
+
legendSelectedRef.value = selectCtrlByAll({
|
|
4010
|
+
list: param.dimensions,
|
|
4011
|
+
keyProp: "id",
|
|
4012
|
+
toMap: true
|
|
4013
|
+
});
|
|
4014
|
+
param.callback(
|
|
4015
|
+
1
|
|
4016
|
+
/* SELECT_BY_ALL */
|
|
4017
|
+
);
|
|
4018
|
+
};
|
|
4019
|
+
const onSelectByInvertBtnClick = () => {
|
|
4020
|
+
legendSelectedRef.value = selectCtrlByInvert({
|
|
4021
|
+
list: param.dimensions,
|
|
4022
|
+
keyProp: "id",
|
|
4023
|
+
defaultBoolean: true,
|
|
4024
|
+
selected: legendSelectedRef.value,
|
|
4025
|
+
toMap: true
|
|
4026
|
+
});
|
|
4027
|
+
param.callback(
|
|
4028
|
+
2
|
|
4029
|
+
/* SELECT_BY_INVERT */
|
|
4030
|
+
);
|
|
4031
|
+
};
|
|
4032
|
+
const onSelectByClearBtnClick = () => {
|
|
4033
|
+
legendSelectedRef.value = selectCtrlByClear({
|
|
4034
|
+
list: param.dimensions,
|
|
4035
|
+
keyProp: "id",
|
|
4036
|
+
toMap: true
|
|
4037
|
+
});
|
|
4038
|
+
param.callback(
|
|
4039
|
+
3
|
|
4040
|
+
/* SELECT_BY_CLEAR */
|
|
4041
|
+
);
|
|
4042
|
+
};
|
|
4043
|
+
return {
|
|
4044
|
+
/**
|
|
4045
|
+
* 获取当前图例的选择状态。
|
|
4046
|
+
*
|
|
4047
|
+
* @returns 当前图例的选择状态。
|
|
4048
|
+
*/
|
|
4049
|
+
get legendSelected() {
|
|
4050
|
+
return legendSelectedRef.value;
|
|
4051
|
+
},
|
|
4052
|
+
/**
|
|
4053
|
+
* 设置当前图例的选择状态。
|
|
4054
|
+
*
|
|
4055
|
+
* @param legendSelected - 要设置的图例选择状态。
|
|
4056
|
+
*/
|
|
4057
|
+
set legendSelected(legendSelected) {
|
|
4058
|
+
legendSelectedRef.value = legendSelected;
|
|
4059
|
+
},
|
|
4060
|
+
onLegendSelectChanged,
|
|
4061
|
+
onSelectByAllBtnClick,
|
|
4062
|
+
onSelectByInvertBtnClick,
|
|
4063
|
+
onSelectByClearBtnClick
|
|
4064
|
+
};
|
|
4065
|
+
};
|
|
3990
4066
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
3991
4067
|
__name: "BaseEChartView",
|
|
3992
4068
|
props: {
|
|
@@ -4087,12 +4163,14 @@ const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
4087
4163
|
BaseEChartView: _sfc_main$n,
|
|
4088
4164
|
CN_TEXT_FONT_FAMILY,
|
|
4089
4165
|
EN_TEXT_FONT_FAMILY,
|
|
4166
|
+
LegendChangeType,
|
|
4090
4167
|
NUMBER_FONT_FAMILY,
|
|
4091
4168
|
getRelatedChartOption,
|
|
4092
4169
|
getTrendChartOption,
|
|
4093
4170
|
setLegend,
|
|
4094
4171
|
useBaseEChartViewUtil,
|
|
4095
4172
|
useChartStyleConfig,
|
|
4173
|
+
useLegendSelectCtrl,
|
|
4096
4174
|
yAxisFormatterMap
|
|
4097
4175
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4098
4176
|
const ZWebUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|