zzz-pc-view 0.0.169 → 0.0.171

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zzz-pc-view",
3
- "version": "0.0.169",
3
+ "version": "0.0.171",
4
4
  "main": "src/index.umd.js",
5
5
  "module": "src/index.es.js",
6
6
  "types": "src/index.d.ts",
package/src/index.es.js CHANGED
@@ -4226,25 +4226,27 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
4226
4226
  const init = () => {
4227
4227
  const chartInstance = chartInstanceRef.value = ECharts.init(elRef.value, props.theme);
4228
4228
  const setOption = chartInstance.setOption;
4229
- const clear2 = chartInstance.clear;
4230
4229
  chartInstance.setOption = function(...args) {
4231
- setOption.call(chartInstance, ...args);
4230
+ setOption.call(this, ...args);
4232
4231
  chartOption = args[0];
4233
4232
  };
4233
+ const clear2 = chartInstance.clear;
4234
4234
  chartInstance.clear = function() {
4235
4235
  chartOption = void 0;
4236
- clear2.call(chartInstance);
4236
+ clear2.call(this);
4237
4237
  };
4238
4238
  emit("ready", chartInstance);
4239
4239
  setChartOption();
4240
4240
  };
4241
- const destroy = () => {
4241
+ const destroy = (clear2 = true) => {
4242
4242
  const chartInstance = chartInstanceRef.value;
4243
4243
  if (!chartInstance) {
4244
4244
  return;
4245
4245
  }
4246
4246
  emit("destroy", chartInstance);
4247
- chartInstance.clear();
4247
+ if (clear2) {
4248
+ chartInstance.clear();
4249
+ }
4248
4250
  chartInstance.dispose();
4249
4251
  chartInstanceRef.value = void 0;
4250
4252
  };
@@ -4272,7 +4274,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
4272
4274
  if (!chartInstance) {
4273
4275
  return;
4274
4276
  }
4275
- destroy();
4277
+ destroy(false);
4276
4278
  init();
4277
4279
  if (chartOption) {
4278
4280
  chartInstanceRef.value.setOption(chartOption, true);