zzz-pc-view 0.0.99 → 0.0.101
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
|
@@ -4105,7 +4105,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4105
4105
|
chartInstance.resize();
|
|
4106
4106
|
const { chartOption } = props.renderParam;
|
|
4107
4107
|
if (chartOption) {
|
|
4108
|
-
chartInstance.setOption(props.renderParam.chartOption);
|
|
4108
|
+
chartInstance.setOption(props.renderParam.chartOption, true);
|
|
4109
4109
|
}
|
|
4110
4110
|
};
|
|
4111
4111
|
const init = () => {
|
|
@@ -4122,6 +4122,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4122
4122
|
chartInstance.dispose();
|
|
4123
4123
|
chartInstance = void 0;
|
|
4124
4124
|
};
|
|
4125
|
+
const resize = () => {
|
|
4126
|
+
chartInstance == null ? void 0 : chartInstance.resize();
|
|
4127
|
+
};
|
|
4125
4128
|
let windowResizeTimer;
|
|
4126
4129
|
const clearWindowResizeTimer = () => {
|
|
4127
4130
|
clearTimeout(windowResizeTimer);
|
|
@@ -4130,7 +4133,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4130
4133
|
clearWindowResizeTimer();
|
|
4131
4134
|
if (chartInstance) {
|
|
4132
4135
|
windowResizeTimer = window.setTimeout(() => {
|
|
4133
|
-
|
|
4136
|
+
resize();
|
|
4134
4137
|
}, 100);
|
|
4135
4138
|
}
|
|
4136
4139
|
};
|
|
@@ -4172,7 +4175,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4172
4175
|
*/
|
|
4173
4176
|
get chartEl() {
|
|
4174
4177
|
return elRef.value;
|
|
4175
|
-
}
|
|
4178
|
+
},
|
|
4179
|
+
// 暴露 resize 方法,供父组件调用,用于调整 ECharts 图表实例的大小
|
|
4180
|
+
resize
|
|
4176
4181
|
});
|
|
4177
4182
|
return (_ctx, _cache) => {
|
|
4178
4183
|
return openBlock(), createElementBlock("div", {
|