mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
optimize ios home screen app experience
This commit is contained in:
+15
-2
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<f7-app :params="f7params">
|
<f7-app :params="f7params">
|
||||||
<f7-view id="main-view" class="safe-areas" main url="/" :push-state="true" :push-state-animate="false"></f7-view>
|
<f7-view id="main-view" class="safe-areas" main url="/"></f7-view>
|
||||||
</f7-app>
|
</f7-app>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -51,10 +51,23 @@ export default {
|
|||||||
disableContextMenu: true
|
disableContextMenu: true
|
||||||
},
|
},
|
||||||
view: {
|
view: {
|
||||||
animate: self.$settings.isEnableAnimate()
|
animate: self.$settings.isEnableAnimate(),
|
||||||
|
pushState: !self.isiOSHomeScreenMode(),
|
||||||
|
pushStateAnimate: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
isiOSHomeScreenMode() {
|
||||||
|
if ((/iphone|ipod|ipad/gi).test(navigator.platform) && (/Safari/i).test(navigator.appVersion) &&
|
||||||
|
window.matchMedia && window.matchMedia('(display-mode: standalone)').matches
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user