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

feat(lifecycle): onLastPageBackPress

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