简体   繁体   English

如何使用 vue.js 在所有页面上触发刷新方法

[英]How to trigger a method on refresh on all pages using vue.js

The below function needs to execute on all pages on refresh no matter which route currently is.下面的 function 需要在刷新时在所有页面上执行,无论当前是哪个路由。

example: this.executeonEverypage()示例: this.executeonEverypage()

In your App.vue the created / mounted methods allways will be triggered on refresh, you can call this method there.在您的App.vue中,创建/安装的方法总是会在刷新时触发,您可以在那里调用此方法。

If it's not enough please give more details.如果还不够,请提供更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM