vue3-eacharts_map
v1.0.6
Published
vue3+ts+echarts 地图组件
Downloads
10
Readme
vue3-eacharts_map
vue3 + vite + ts + echarts 地图
Vue 3 + TypeScript + Vite
Installation
npm i vue3-eacharts_map --save
Usage
main.ts
// script
import { createApp } from 'vue';
import App from './App.vue';
import EachrtsMap from "vue3-eacharts_map"
const app = createApp(App);
app.use(EachrtsMap); //全局注册
app.mount('#app');
App.vue
<template>
<div class="box">
<EachrtsMap :config="config" @onChange="handleChange" />
</div>
</template>
<script setup lang="ts">
import {ref} from "vue";
const config = reactive({
getAddreeUrl: 'http://127.0.0.1:5173', // 地址
data: data // 地图数据
});
// 数据
const data = [
{
"name": "临沧市",
"area_code": "530900",
"school_num": "2",
"student_num": "2"
}
]
</script>