[Bug Report] popup-picker 组件异步请求数据,不渲染
- Ngôn ngữ chính
- Vue
- Star
- 17.5k
- Fork
- 3.6k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### VUX version
2.9.2
### OS/Browsers version
Windows Google浏览器
### Vue version
2.5.2
### Code
```html
文件index.vue
export default {
data(){
return{
cityTitle: '18-07-08',
cityValue:[],
citysList: [],
}
},
methods:{
/**
* parentId: 父级id,默认为0
* type: 子节点类型 省:province 市:city 区:district
*/
getChildCitys(id,type){
this.$api.get(this.$interface.apiurl.getChildCitys,{
parentId: id,
type: type
},res=>{
console.log(res);
if(type === 'province'){
this.nowProvince = res.data;
this.citysList[0] = [];
this.getChildCitys(res.data[0].id,"city");
this.$nextTick(()=>{
for (let i = 0; i < res.data.length; i ) {
this.citysList[0].push(res.data[i].name);
}
})
}else if(type === 'city'){
this.citysList[1] = [];
this.$nextTick(()=>{
for (let i = 0; i < res.data.length; i ) {
this.citysList[1].push(res.data[i].name);
}
})
}
})
}
},
activated() {
this.getChildCitys(0,'province');
},
}
```
### Steps to reproduce
进入页面,点击popup-picker
### What is Expected?
数据正常渲染
### What is actually happening?
数据不正常渲染
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.