一个移动端地址选择组件
$ npm install v-area-picker --save
或
$ yarn add v-area-picker
import Vue from 'vue'
import VAreaPicker from 'v-area-picker'
Vue.use(VAreaPicker)
1、 安装babel-plugin-import
npm install babel-plugin-import --dev
2、 babel.config.js
module.exports = {
plugins: [
[
'import',
{
libraryName: 'v-area-picker',
customName: name => {
return `v-area-picker/dist/${name}`
}
},
'v-area-picker'
]
]
}
3、 按需加载 Tabs, Picker, ActionSheet组件
import Vue from 'vue'
import { VTabs, VPicker, VActionSheet } from 'v-area-picker'
Vue.use(VTabs)
Vue.use(VPicker)
Vue.use(VActionSheet)
手机扫描二维码