vue-address-tky

1.0.8 • Public • Published

vue-address

多级联动地址选择器

install

npm install vue-address-tky --save

import

import vueAddress from 'vue-address-tky'
import "vue-select/lib/vue-address.min.css";
...
 
Vue.component('vue-address-tky', vueAddress)

usage

<template>
  <div id="app">
    <img src="./assets/logo.png">
    <x-address @change="selectAddress"  @close="closeMask"></x-address>
    <div id="address" v-text="selectedAddress"></div>
  </div>
</template>
 
<script>
import xAddress from 'vue-address-tky'
 
export default {
  name: 'app',
  components: {
    xAddress
  },
  data: () => {
    return {
        selectedAddress: ''
    }
  },
  methods: {
    selectAddress(province, city, detail) {
        this.selectedAddress = `${province}${city}${detail}`
    }
  }
}
</script> 
 
<style>
#app {
  font-family: 'Avenir'HelveticaArialsans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style> 

特别感谢

Package Sidebar

Install

npm i vue-address-tky

Weekly Downloads

3

Version

1.0.8

License

ISC

Last publish

Collaborators

  • leeshimin