Skip to content

squidCatx/vue2-chinamap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue2-chinamap

This is an example of a map of China can drill data.

QQ交流群:255965810

How to run demo

npm install
npm run dev

效果图

效果图 ::: demo

<template>
  <div id="app">
    <area-map :tipFormater="tipFormater"></area-map>
  </div>
</template>

<script>
import areaMap from './components/map/areaMap.vue'
export default {
  name: 'app',
  components: {
    areaMap
  },
  methods: {
    tipFormater (params) {
          return `<p style="color:orange">${params.name}</p>`;
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

props

参数 说明 类型 可选值 默认值
tipFormater 钻取级别数据提示格式化 Function 可以为空 null
labelLevel 默认文本开始显示层级,默认第一次不显示文本 Number 可以为空 1

About

极简的vue2中国地图钻取组件

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published