The problem of passing values from vue parent components to child components

I make a login interface using tabs in elementui to divide student login and teacher login

<el-tabs v-model="activeName" @tab-click="handleClick">
  <el-tab-pane label="" name="first">
    <tabs></tabs>
  </el-tab-pane>
  <el-tab-pane label="" name="second">
    <tabs></tabs>
  </el-tab-pane>
</el-tabs>

share a subcomponent tabs (this is just a subcomponent, not a tab, so I didn"t pay so much attention when writing), but I need to know which tabs the parent component clicked on in order to achieve different login. Tabs also comes with a click event handleClick to determine which tab to click on, but how can it be judged by the subcomponent? Ask the boss to answer for me ~

Feb.26,2021

through the tab-click event, then assign the currently selected tab to a variable in data to save the currently selected tab, and then judge the currently selected tab.

by judging the variable.
Menu