|
@@ -284,6 +284,7 @@ export default {
|
|
|
const res=await apiVoiceSectionList()
|
|
|
if(res.code!==200) return
|
|
|
const arr=res.data||[]
|
|
|
+ let temarr=[]
|
|
|
this.options=arr.map(item=>{
|
|
|
let obj={
|
|
|
text:'',
|
|
@@ -291,7 +292,7 @@ export default {
|
|
|
}
|
|
|
obj.text=item.VarietyName
|
|
|
obj.children=item.Children.map(_item=>{
|
|
|
- this.tabsList.push(_item)
|
|
|
+ temarr.push(_item)
|
|
|
return {
|
|
|
text:_item.SectionName,
|
|
|
id:_item.SectionId
|
|
@@ -299,7 +300,8 @@ export default {
|
|
|
})
|
|
|
return obj
|
|
|
})
|
|
|
- this.activeId=this.tabsList[0].SectionId
|
|
|
+ this.tabsList=temarr||[]
|
|
|
+ this.activeId=temarr[0].SectionId
|
|
|
this.$nextTick(()=>{
|
|
|
this.selectComponent('#tabs').resize();// 解决初始渲染 vant tab 底部条
|
|
|
})
|