标签:选择 json 拷贝 src 搜索 tps blank lis change
1.首先导入组件
import Vue from ‘vue‘; import { AddressEdit } from ‘vant‘; Vue.use(AddressEdit);
使用组件
<van-address-edit :area-list="areaList" show-postal show-delete show-set-default show-search-result :search-result="searchResult" :area-columns-placeholder="[‘请选择‘, ‘请选择‘, ‘请选择‘]" @save="onSave" @delete="onDelete" @change-detail="onChangeDetail" />
2.找到vant的area省市区选择
搜索areaList找到 Area.json,点进去,github拷贝一份下来,命名为areaData.js
3.在用的组件中导入areaData.js文件
4.最后给areaList赋值
data() { return { areaList:areaData, searchResult: [], }; }
标签:选择 json 拷贝 src 搜索 tps blank lis change
原文地址:https://www.cnblogs.com/luyuandatabase/p/12699654.html