@v-charts2/pie

1.0.1 • Public • Published

mark text

@v-chart2/pie

npm version install size GitHub stars GitHub issues
jsdelivr npm NPM

🎉 饼图

下载

yarn add @v-charts2/pie
# or
npm install @v-charts2/pie

安装

当你当前的打包工具为 webpack 时, 推荐你进行以下的安装步骤

传统的 webpack4.x 没有 Tree Shaking 的支持, 如果你想引入 @v-charts2/pie/vue2 或者 @v-charts2/pie/vue3 的话, 可能会报错

import Vue from "vue";
import VePie from "@v-charts2/pie"; // 兼容 vue2.x 和 vue3.x 的支持, 将会自动加载支持 vue2.x 的支持包或者支持 vue3.x 的支持包
Vue.use(VePie);

当你当前的打包工具为 vite 或者 rollup 时, 推荐你进行以下的安装步骤

  • Vue 2.x
import Vue from "vue";
import VePie from "@v-charts2/pie/vue2"; // 更好的 Tree Shaking 推荐引入 vue2.x 的专属支持包
import "@v-charts2/pie/v-charts.css"; // 需要手动引入样式
Vue.use(VePie);
  • Vue 3.x
import { createApp } from "vue";
const app = createApp();
import VePie from "@v-charts2/pie/vue3"; // 更好的 Tree Shaking 推荐引入 vue3.x 的专属支持包
import "@v-charts2/pie/v-charts.css"; // 需要手动引入样式
app.use(VePie);

Package Sidebar

Install

npm i @v-charts2/pie

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

122 kB

Total Files

12

Last publish

Collaborators

  • vxhly