How does vue/ achieve the effect of switching active properties of buttons when clicking on a secondary menu?

take iView"s navigation menu as an example.

clipboard.png

Click new users / active users, and the active properties of the buttons will be switched rather than overlaid at random.
in this secondary menu of user management options, only one button can be active.

this is a simple effect in JQuery, but I"m not very good at it. How can I do an operation like Vue,?

I have this guess:
can emit a signal to the parent and let the parent handle the sequence problem of active.
but how do you let the parent know which button the user clicked?

Nov.14,2021

you can define a flag, write a loop, [I] .flag = false; this.flag = true

Menu