Vue realizes refreshing the page after adding, deleting and modifying operations

Vue realizes refreshing the page after adding, deleting and modifying operations

It is common to realize the automatic update of the page after the delete operation is performed.

First, you need to set it globally in APP.VUE,
insert image description here
then set it in the script,
insert image description here
and then write a refresh method
insert image description here
. Inject inject into the operation page that needs to be refreshed: ['reload']
insert image description here
After calling the interface successfully, this.reload( )

For example, after the deletion interface is called successfully: enter
insert image description here

Guess you like

Origin blog.csdn.net/unique_sir/article/details/123894368