scenario: list page: list; details page: detail (uses tabs, in the detail page and TabPane is dynamically generated)
Click "Commodity 1" in list to enter the detail page, click to activate the second TabPane, return to list, and then click "Commodity 2" to enter detial, TabPane unexpectedly stays at the second TabPane (it is expected to stay at the first TabPane), detail data is correct.
html
<Tabs :value="0" @on-click="clickTabs">
<TabPane v-for="(items,index) in processNameArray" :label="items.name" :key="items.id" :name="index+""">
<Table :height="tableHeight" size="small" border :columns="tableHeader" :data="items.tableData"></Table>
</TabPane>
</Tabs>
js
created(){
getDetailHttp(editId){
//
this.$fetch(
api.specSheetDetail() + editId
).then(res=>{
if(res.data.status === 200){
... //tabs
this.clickTabs("0") //
};
});
},
}