@devops-web/cs-chart
Version:
## 更新流程 1. 切换源到npm官方源https://registry.npmjs.org/ 2. npm login 3. npm run lib 4. 修改package.json中的版本号 5. npm publish --access public
25 lines (19 loc) • 500 B
JavaScript
import CsChart, { ChartList, MyChart } from './CsChart';
const plugins = {};
const componentArray = [
CsChart, // 简化图表组件
MyChart, // 接收echart原始option的组件
];
const install = function (Vue, opt = {}) {
if (plugins.installed) return;
plugins.installed = true;
componentArray.forEach((item) => {
Vue.component(item.name, item);
});
ChartList.config(opt);
};
export default {
install,
// 获取当前支持图表列表
getChartList: ChartList.get,
};