@v-charts2/amap

echarts 高德地图

Usage no npm install needed!

<script type="module">
  import vCharts2Amap from 'https://cdn.skypack.dev/@v-charts2/amap';
</script>

README

mark text

@v-charts2/amap

npm version install size GitHub stars GitHub issues
jsdelivr npm NPM

:tada: 高德地图

下载

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

安装

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

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

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

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

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