Application scenarios
try to reconstruct traditional pages with vue 2.x for the first time. Create a project using vue init webpack xxx.
after logging in, there is a button on the index page to switch the page to signin, and return to index after the signin operation. As far as I understand it, there should be an upper page that provides < router-view >, calling this router-view view1. View1 is used to switch between index and signin in the < template > of the upper page.
there is a navigation bar in index that allows the content area to switch between different displays such as page1,page2. I understand that there should also be a < router-view > in index"s < template > to switch between page1 and page2, that this router-view is called view2.
after entering page1, there is a sidebar, which allows the content area to switch to different displays such as content1,content2. I understand that there should also be a < router-view > in page1"s < template > to switch between content1 and content2, that this router-view is called view3.
expected
index and signin can be switched in view1, page1 and page2 can be switched in view2, and content1 and content2 can be switched in view3.
these three switching entries exist on the same page.
question
from the display area: view1 > view2 > view3. After reading the documents of general routing, nested routing and named routing, I feel that I can"t find the design method, this.$router.push (".") How do you know which view change should be driven?
or is this situation not suitable for this.$router.push? should routing be implemented in other ways?