lhdcitypicker
v0.0.2
Published
this is a vue plus
Downloads
3
Readme
lhdcitypicker
这是基于element-ui进行二次开发的cms后台系统的省市选择组件
效果图
插件的安装
NPM
npm i lhdcitypicker
引入插件
import Vue from 'vue';
import cityPicker from 'lhdcitypicker';
Vue.use(cityPicker);
基本用法
<template>
<div id="app">
<city-picker
:selectData="selectData"
@selectChange="selectChange">
</city-picker>
</div>
</template>
<script>
export default {
name: "App",
data() {
return {
selectData:['210300']
};
},
methods: {
selectChange(data){
console.log(data)
}
}
};
</script>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
user-select: none;
}
</style>
API
| 参数 | 说明 | 类型 |
| - | :- | :- | :-: |
| selectData | 已选省市code | Array |
| selectChange | 选择事件 | Function |