< template >
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="" name="first"></el-tab-pane>
<el-tab-pane label="" name="second"></el-tab-pane>
<el-tab-pane label="" name="third"></el-tab-pane>
<el-tab-pane label="" name="fourth"></el-tab-pane>
</el-tabs>
< / template >
< script >
export default {
data() {
return {
activeName: "second"// ""
};
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
}
}
};
< / script >
as shown in the title, this is a tab example of element-ui, and the second item is displayed by default.
now, it will display normally in other interfaces by jumping (< router-link to= "/ tabPage" >) to this interface with tab.
however, when I jump to this interface, I want to specify that the fourth "timing compensation task" should be displayed. What should I do
ps: other interface jump buttons need to be redirected to the specified tab item