st-comp 0.0.32 → 0.0.33

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,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.32",
4
+ "version": "0.0.33",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -24,7 +24,7 @@
24
24
  config: {
25
25
  type: Object,
26
26
  default: () => ({})
27
- }
27
+ },
28
28
  })
29
29
 
30
30
  const chartRef = ref<HTMLElement>()
@@ -138,7 +138,7 @@
138
138
  fontSize: 20,
139
139
  formatter: (params: any) => {
140
140
  return `${params.data.name}
141
- ${params.data.percent > 0 ? '+' : ''}${params.data.percent}%`
141
+ ${params.data.colorValue}`
142
142
  },
143
143
  },
144
144
  }
@@ -530,8 +530,7 @@ onMounted(() => {
530
530
  return {
531
531
  name: child.name,
532
532
  value: child.value,
533
- colorValue: childPercent.toFixed(2),
534
- percent: childPercent.toFixed(2),
533
+ colorValue: `${childPercent > 0 ? '+' : ''}${childPercent.toFixed(2)}%`,
535
534
  color: linearLegendRef.value.numberToColor(childPercent)
536
535
  }
537
536
  })
package/vite.config.ts CHANGED
@@ -36,6 +36,11 @@ export default ({ mode }) => {
36
36
  },
37
37
  rollupOptions: {
38
38
  external: ['vue', 'echarts'],
39
+ output: {
40
+ globals: {
41
+ vue: 'Vue'
42
+ }
43
+ }
39
44
  }
40
45
  },
41
46
  resolve: {