亲测 兼容微信小程序
使用
注意: 下载安装配置uview组件库,该插件基于uview的upicker组件
- 下载插件并导入到项目
- 页面中直接引入标签
import barrypicker from '@/uni_modules/barry-picker/components/barry-picker/barry-picker.vue'
components: {
barrypicker
},
- 标签使用
<barry-picker ref="dialog" @get-address="getAddress"></barry-picker>
- 方法使用
// 打开地址弹框
open() {
this.$refs.dialog.show = true
},
// 获取地址
getAddress(e) {
console.log('选择的地址是', e);
this.location = e
}