App.vue 1.3 KB
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1
<script lang="ts">
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
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 {
19 20 21 22
    uni.showToast({
      title: "再按一次退出应用",
      position: "bottom",
    });
23 24 25
    return null;
  },
};
Y
init  
yurj26 已提交
26 27 28
</script>

<style>
29 30 31 32 33 34 35 36 37 38 39 40
/*每个页面公共css */
@import "./common/uni.css";

/* #ifdef H5 */
@media screen and (min-width: 768px) {
  body {
    overflow-y: scroll;
  }
}

/* 顶栏通栏样式 */
/* .uni-top-window {
Y
yurj26 已提交
41 42 43 44
  	    left: 0;
  	    right: 0;
  	} */

45 46 47 48 49
uni-page-body {
  background-color: #f5f5f5 !important;
  min-height: 100% !important;
  height: auto !important;
}
Y
yurj26 已提交
50

51 52 53
.uni-top-window uni-tabbar .uni-tabbar {
  background-color: #fff !important;
}
Y
yurj26 已提交
54

55 56 57
.uni-app--showleftwindow .hideOnPc {
  display: none !important;
}
Y
yurj26 已提交
58

59 60
/* #endif */
</style>