admin管理员组文章数量:1025337
方法一: we码用了,生效
mounted () {
this.$nextTick(()=>{
//首页跳转至门诊或者商城返回 IOS不兼容页面自动刷新问题
var u = navigator.userAgent,
app = navigator.appVersion;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isiOS){
window.onpageshow = function(event) {
if (event.persisted) {
window.location.reload()
}
};
}
})
},
方法二:
mounted(){
var _this = this;
window.addEventListener('pageshow',function(){
if(_this.isPageHide) {
window.location.reload();
}
});
window.addEventListener('pagehide', function(){
_this.isPageHide = true;
});
}
方法一: we码用了,生效
mounted () {
this.$nextTick(()=>{
//首页跳转至门诊或者商城返回 IOS不兼容页面自动刷新问题
var u = navigator.userAgent,
app = navigator.appVersion;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isiOS){
window.onpageshow = function(event) {
if (event.persisted) {
window.location.reload()
}
};
}
})
},
方法二:
mounted(){
var _this = this;
window.addEventListener('pageshow',function(){
if(_this.isPageHide) {
window.location.reload();
}
});
window.addEventListener('pagehide', function(){
_this.isPageHide = true;
});
}
版权声明:本文标题:Vue IOS端跳转后返回页面不刷新问题解决 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1741054419a1820584.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论