提交 d05bb5c2 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

feat(lifecycle): onLastPageBackPress

上级 b005f4c3
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function () {
console.log('App Launch') console.log("App Launch");
// const performance: Performance = uni.getPerformance() // const performance: Performance = uni.getPerformance()
// const observer1: PerformanceObserver = performance.createObserver((entryList: PerformanceObserverEntryList) => { // const observer1: PerformanceObserver = performance.createObserver((entryList: PerformanceObserverEntryList) => {
...@@ -9,45 +9,49 @@ ...@@ -9,45 +9,49 @@
// }) // })
// observer1.observe({ entryTypes: ['render', 'navigation'] } as PerformanceObserverOptions) // observer1.observe({ entryTypes: ['render', 'navigation'] } as PerformanceObserverOptions)
}, },
onShow: function() { onShow: function () {
console.log('App Show') console.log("App Show");
}, },
onHide: function() { onHide: function () {
console.log('App Hide') console.log("App Hide");
} },
} onLastPageBackPress: function (): boolean | null {
console.log("App LastPageBackPress");
return null;
},
};
</script> </script>
<style> <style>
/*每个页面公共css */ /*每个页面公共css */
@import './common/uni.css'; @import "./common/uni.css";
/* #ifdef H5 */ /* #ifdef H5 */
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
body { body {
overflow-y: scroll; overflow-y: scroll;
} }
} }
/* 顶栏通栏样式 */ /* 顶栏通栏样式 */
/* .uni-top-window { /* .uni-top-window {
left: 0; left: 0;
right: 0; right: 0;
} */ } */
uni-page-body { uni-page-body {
background-color: #F5F5F5 !important; background-color: #f5f5f5 !important;
min-height: 100% !important; min-height: 100% !important;
height: auto !important; height: auto !important;
} }
.uni-top-window uni-tabbar .uni-tabbar { .uni-top-window uni-tabbar .uni-tabbar {
background-color: #fff !important; background-color: #fff !important;
} }
.uni-app--showleftwindow .hideOnPc { .uni-app--showleftwindow .hideOnPc {
display: none !important; display: none !important;
} }
/* #endif */ /* #endif */
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册