1.0.1 • Published 5 years ago

vue-address-code-picker v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vue-address-code-picker

描述

这是一款基于mint-ui的地址选择器组件(地名+编码)

快速开始

  1. 安装插件: npm install -S vue-addr-picker

  2. 将插件加入Vue项目中:

  import Vue from 'vue';
  import CityPicker from 'vue-addr-picker';
  Vue.use(CityPicker)

3.然后在.vue 文件中使用组件

  <city-picker ref="citypicker" @confirm="getCity"></city-picker>

  <button @click="open('citypicker')"></button>
  export default {
    methods: {
      open(picker) {
        this.$refs[picker].open();
      }
    },
    getCity(city) {
      //处理选择的城市
      console.log(city) //得到选择的城市数据
    }
  }

仓库地址

码云仓库地址

1.0.1

5 years ago

1.0.0

5 years ago