evui 3.3.66 → 3.3.67

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": "evui",
3
- "version": "3.3.66",
3
+ "version": "3.3.67",
4
4
  "description": "A EXEM Library project",
5
5
  "author": "exem <dev_client@ex-em.com>",
6
6
  "license": "MIT",
@@ -18,7 +18,17 @@
18
18
  </template>
19
19
 
20
20
  <script>
21
- import { onMounted, onBeforeUnmount, watch, onDeactivated, inject, toRef, computed } from 'vue';
21
+ import {
22
+ onMounted,
23
+ onBeforeUnmount,
24
+ onActivated,
25
+ onDeactivated,
26
+ inject,
27
+ watch,
28
+ ref,
29
+ toRef,
30
+ computed,
31
+ } from 'vue';
22
32
  import { cloneDeep, isEqual, debounce } from 'lodash-es';
23
33
  import EvChart from './chart.core';
24
34
  import EvChartToolbar from './ChartToolbar';
@@ -76,6 +86,7 @@
76
86
  ],
77
87
  setup(props) {
78
88
  let evChart = null;
89
+ const isMounted = ref(false);
79
90
  const injectIsChartGroup = inject('isChartGroup', false);
80
91
  const injectBrushSeries = inject('brushSeries', { list: [], chartIdx: null });
81
92
  const injectGroupSelectedLabel = inject('groupSelectedLabel', null);
@@ -242,6 +253,8 @@
242
253
 
243
254
  await createChart();
244
255
  await drawChart();
256
+
257
+ isMounted.value = true;
245
258
  });
246
259
 
247
260
  onBeforeUnmount(() => {
@@ -252,6 +265,8 @@
252
265
  if (injectEvChartPropsInGroup?.value?.length) {
253
266
  injectEvChartPropsInGroup.value.length = 0;
254
267
  }
268
+
269
+ isMounted.value = false;
255
270
  });
256
271
 
257
272
  onDeactivated(() => {
@@ -275,6 +290,12 @@
275
290
  }
276
291
  }, props.resizeTimeout);
277
292
 
293
+ onActivated(() => {
294
+ if (isMounted.value) {
295
+ onResize();
296
+ }
297
+ });
298
+
278
299
  return {
279
300
  wrapper,
280
301
  wrapperStyle,
@@ -9,7 +9,17 @@
9
9
  </template>
10
10
 
11
11
  <script>
12
- import { inject, watch, computed, onMounted, onBeforeUnmount, onDeactivated, onUpdated } from 'vue';
12
+ import {
13
+ inject,
14
+ watch,
15
+ ref,
16
+ computed,
17
+ onMounted,
18
+ onBeforeUnmount,
19
+ onDeactivated,
20
+ onActivated,
21
+ onUpdated,
22
+ } from 'vue';
13
23
  import { cloneDeep, debounce, isEqual } from 'lodash-es';
14
24
  import EvChart from '../chart/chart.core';
15
25
  import { useModel, useWrapper } from '../chart/uses';
@@ -28,6 +38,7 @@ export default {
28
38
  let evChart = null;
29
39
  let evChartBrush = null;
30
40
 
41
+ const isMounted = ref(false);
31
42
  const injectEvChartClone = inject('evChartClone', { data: [] });
32
43
  const injectEvChartInfo = inject('evChartInfo', { props: { options: [] } });
33
44
  const injectBrushIdx = inject('brushIdx', {
@@ -235,6 +246,8 @@ export default {
235
246
  createChartBrush();
236
247
  drawChartBrush();
237
248
  }
249
+
250
+ isMounted.value = true;
238
251
  });
239
252
 
240
253
  onUpdated(async () => {
@@ -266,6 +279,8 @@ export default {
266
279
  if (evChartBrush) {
267
280
  evChartBrush.destroy();
268
281
  }
282
+
283
+ isMounted.value = false;
269
284
  });
270
285
 
271
286
  onDeactivated(() => {
@@ -291,6 +306,12 @@ export default {
291
306
  }
292
307
  }, 0);
293
308
 
309
+ onActivated(() => {
310
+ if (isMounted.value) {
311
+ onResize();
312
+ }
313
+ });
314
+
294
315
  return {
295
316
  evChartBrushOptions,
296
317
  evChartBrushRef,