Home > Web Front-end > JS Tutorial > Example of executing function after leaving the vue page

Example of executing function after leaving the vue page

亚连
Release: 2018-05-30 17:17:44
Original
2651 people have browsed it

Below I will share with you an example of executing a function after leaving the vue page. It has a good reference value and I hope it will be helpful to everyone.

is as follows:

destroyed: function () {
   console.log("我已经离开了!");
 
this.doSomething();
 },
Copy after login

Explanation: destroyed is at the same level as methods and mounted

#The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

vue Sample code for developing a button component

##jQuery ajax reads json data and sorts by price example

vue data control view source code analysis

The above is the detailed content of Example of executing function after leaving the vue page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template