Skip to content

Commit

Permalink
feat: add wx simple entry
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoHe authored and kkxxkk2019 committed Nov 22, 2023
1 parent 2319370 commit ececdf7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ bower_components
build/Release
output
dist
!**/packages/vchart/dist
esm
es
cjs
Expand Down
4 changes: 4 additions & 0 deletions packages/vchart/bundler.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ const crossEnvs = {
wx: {
input: 'index-wx',
output: '../wx-vchart/miniprogram/src/vchart/index.js'
},
'index-wx-simple':{
input:'index-wx-simple',
output:'./dist/index-wx-simple.min.js'
}
};
const umdEntries = Object.keys(crossEnvs)
Expand Down
42 changes: 42 additions & 0 deletions packages/vchart/src/index-wx-simple.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* @description 包含基础的折柱饼图,提供坐标轴、离散图例以及 tooltip、crosshair、label 组件
*/
import { VChart } from './core';
import { registerLineChart } from './chart/line/line';
import { registerBarChart } from './chart/bar/bar';
import { registerAreaChart } from './chart/area/area';
import { registerPieChart } from './chart/pie/pie';
import { registerCommonChart } from './chart/common/common';

import { registerLabel } from './component/label/label';
import { registerCartesianCrossHair } from './component/crosshair/cartesian';
import { registerTooltip } from './component/tooltip/tooltip';
import { registerDiscreteLegend } from './component/legend/discrete/legend';
import { registerCartesianBandAxis } from './component/axis/cartesian/band-axis';
import { registerCartesianLinearAxis } from './component/axis/cartesian/linear-axis';
import { registerWXEnv } from './env';

export * from './core';

VChart.useRegisters([
// charts
registerLineChart,
registerAreaChart,
registerBarChart,
registerPieChart,
registerCommonChart,

// components
registerCartesianLinearAxis,
registerCartesianBandAxis,
registerDiscreteLegend,
registerTooltip,
registerCartesianCrossHair,
registerLabel
]);

VChart.useRegisters([registerWXEnv]);

export { VChart };

export default VChart;

0 comments on commit ececdf7

Please sign in to comment.