Compare commits

...

5 Commits

Author SHA1 Message Date
skie1997
cb533a379c fix: register charts animation 2025-02-24 15:29:17 +08:00
skie1997
00578479e3 fix: register charts and components to avoid build error 2025-02-24 15:00:48 +08:00
奔跑的面条
88e3cc19c8 build: 更新依赖 2025-02-21 10:04:09 +08:00
奔跑的面条
345c4020a6 build: 修改打包错误 2025-02-20 23:38:12 +08:00
奔跑的面条
7d0beec210 !255 feat: supply more chart types into vchart libs
Merge pull request !255 from Skie Chen/dev-vchart-supply-types
2025-02-20 14:38:27 +00:00
5 changed files with 5119 additions and 4310 deletions

View File

@@ -6,7 +6,7 @@
},
"scripts": {
"dev": "vite --host",
"build": "vue-tsc --noEmit && vite build",
"build": "vite build",
"preview": "vite preview",
"new": "plop --plopfile ./plop/plopfile.js",
"postinstall": "husky install",
@@ -77,7 +77,7 @@
"mockjs": "^1.1.0",
"plop": "^3.0.5",
"prettier": "^2.6.2",
"sass": "^1.49.11",
"sass": "~1.49.11",
"sass-loader": "^12.6.0",
"typescript": "4.6.3",
"vite": "4.3.6",

9388
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,9 +9,13 @@
<script setup lang="ts">
import { ref, PropType, watch, onBeforeUnmount, nextTick, toRaw, toRefs } from 'vue'
import { VChart, type IVChart, type IInitOption, type ISpec } from '@visactor/vchart'
import { VChart, type IVChart, type IInitOption } from '@visactor/vchart'
import { transformHandler } from './transformProps'
import { IOption } from '@/packages/components/VChart/index.d'
import { registerChartsAndComponents } from './register'
// VChart按需加载: 注册图表及组件
registerChartsAndComponents()
// 事件说明 v1.13.0 https://www.visactor.io/vchart/api/API/event
const event = [

View File

@@ -0,0 +1,29 @@
import { VChart } from '@visactor/vchart/esm/core';
import { registerBarChart, registerAreaChart, registerLineChart, registerPieChart, registerFunnelChart, registerWordCloudChart, registerScatterChart } from '@visactor/vchart/esm/chart';
import { registerTooltip, registerCartesianCrossHair, registerDiscreteLegend, registerLabel } from '@visactor/vchart/esm/component';
import { registerDomTooltipHandler } from '@visactor/vchart/esm/plugin/components';
import { registerAnimate } from '@visactor/vchart';
export const registerChartsAndComponents = () => {
VChart.useRegisters([
// 图表
registerBarChart,
registerAreaChart,
registerLineChart,
registerPieChart,
registerScatterChart,
registerFunnelChart,
registerWordCloudChart,
// 组件
registerTooltip,
registerDomTooltipHandler,
registerCartesianCrossHair,
registerDiscreteLegend,
registerLabel,
// 动画
registerAnimate
]);
}

View File

@@ -76,7 +76,7 @@ export default defineConfig({
})
],
build: {
target: 'es2015',
target: 'es2020',
outDir: OUTPUT_DIR,
// minify: 'terser', // 如果需要用terser混淆可打开这两行
// terserOptions: terserOptions,