基于 Vue2 的中国行政区划选择器 v-region

基于 Vue2 的简洁、易用的中国行政区划选择器,包含常规表单下拉列表模式和UI下拉选择器模式;支持 “省/直辖市”-“市”-“区/县”-“乡/镇/街道”4级行政级别

插件预览

基础表单模式

选择器模式

安装插件

npm install v-region --save

在入口文件 main.js 中导入插件

import Vue from 'vue'import vRegion from 'v-region';Vue.use(vRegion);

在你的页面中使用(基础模式)

template code

<template> <v-region @values="regionChange" class="form-control"></v-region></template>

script code

export default { methods:{ //receive selected region data regionChange(data){ console.log(data); } }};

项目地址

https://gitee.com/TerryZ/v-region

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2018年10月10日
下一篇 2018年10月10日

相关推荐