The background project of vue+element realizes that clicking on the left menu bar again refreshes the content on the right

In the vue project, how to click again and refresh the content on the right , I used [provide/inject] in vue, in simple terms. . Not much to say on the code

1. Set provide in the parent component
insert image description here
2. Don’t forget the reload() method in methods3 insert image description here
. Call it through inject in the left menu component

insert image description here

4. Just call the method directly where it needs to be executed

insert image description here

Guess you like

Origin blog.csdn.net/tq1711/article/details/108386307