On the problem of vuex modifying the State of a layer in Recursive components

The

clipboard.png
;
clipboard.png
menu is not given to me at a time, but only one level at a time. For example, there is a small arrow in personnel management to prove the existence of a submenu. Click the arrow to send a request to get the next level menu of the current menu. If there is still an arrow in the submenu, you can right-click on the menu and add the menu again. Now, assuming that there is already a second-level menu, you are ready to create a new three-level menu. The question is how to show the small arrow sign that there is a three-level menu on the second-level menu? Ask for a train of thought!
if there are 10 levels that will only tell you whether the isparent of each menu is TRUE, of course, there is also a parentID value; the problem is that my new menu is successful, and the form on the right can modify the data in vuex, but if you pass this value to the tree menu, how does this recursive component identify the level?

Mar.23,2021
Menu