@mptw/skylens-ui 1.4.76 → 1.4.78

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.
@@ -30,6 +30,8 @@ import {
30
30
  import { CanvasRenderer } from "echarts/renderers";
31
31
  import type { ECBasicOption } from "echarts/types/dist/shared";
32
32
 
33
+ type EChartsType = InstanceType<typeof ECharts>;
34
+
33
35
  use([
34
36
  MapChart,
35
37
  GridComponent,
@@ -104,6 +106,7 @@ export default defineComponent({
104
106
  setup(props, { emit }) {
105
107
  const { option } = toRefs(props);
106
108
 
109
+ const chartComp = shallowRef<EChartsType | null>(null);
107
110
  const mapJsonLoaded = ref(false);
108
111
 
109
112
  const formatedOption = computed(() => {
@@ -153,6 +156,7 @@ export default defineComponent({
153
156
  });
154
157
 
155
158
  return {
159
+ chartComp,
156
160
  formatedOption,
157
161
  onClicked,
158
162
  onMouseOvered,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.76",
4
+ "version": "1.4.78",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",
package/utils/index.ts CHANGED
@@ -370,7 +370,7 @@ export const toFixed = (value: number | null, fixedTo: number = 0, { NaNString =
370
370
 
371
371
  if (valueParts[1]) {
372
372
  if (toNumber) {
373
- return Number(`${Number(valueParts[0]).toLocaleString()}.${valueParts[1]}`);
373
+ return Number(`${Number(valueParts[0])}.${valueParts[1]}`);
374
374
  }
375
375
  return `${Number(valueParts[0]).toLocaleString()}.${valueParts[1]}${unit}`;
376
376
  }