App.vue 2.0 KB
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1 2 3 4 5 6
<script lang="ts">
import { state, setLifeCycleNum } from './store/index.uts'
export default {
  onLaunch: function () {
    setLifeCycleNum(state.lifeCycleNum + 1000)
    console.log('App Launch')
H
init.  
hdx 已提交
7

DCloud-WZF's avatar
DCloud-WZF 已提交
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    const performance: Performance = uni.getPerformance()
    const observer: PerformanceObserver = performance.createObserver((entryList: PerformanceObserverEntryList) => {
      console.log("observer:entryList.getEntries()")
      console.log(entryList.getEntries())
    })
    observer.observe({ entryTypes: ['render', 'navigation'] } as PerformanceObserverOptions)
  },
  onShow: function () {
    setLifeCycleNum(state.lifeCycleNum + 100)
    console.log('App Show')
  },
  onHide: function () {
    setLifeCycleNum(state.lifeCycleNum - 100)
    console.log('App Hide')
  },
  onLastPageBackPress(): boolean | null {
    setLifeCycleNum(state.lifeCycleNum - 1000)
    console.log('App onLastPageBackPress')
    return null
  },
}
H
init.  
hdx 已提交
29 30 31
</script>

<style>
DCloud-WZF's avatar
DCloud-WZF 已提交
32
/* @font-face {
H
init.  
hdx 已提交
33 34 35 36 37 38
    font-family: uniicons;
    font-weight: normal;
    font-style: normal;
    src: url('./static/fonts/uni.ttf') format('truetype');
  } */

DCloud-WZF's avatar
DCloud-WZF 已提交
39 40 41
.page {
  padding: 15px;
}
H
init.  
hdx 已提交
42

DCloud-WZF's avatar
DCloud-WZF 已提交
43 44 45
.uni-panel {
  margin-bottom: 12px;
}
H
init.  
hdx 已提交
46

DCloud-WZF's avatar
DCloud-WZF 已提交
47 48 49 50 51 52
.uni-panel-h {
  background-color: #ffffff;
  flex-direction: row;
  align-items: center;
  padding: 12px;
}
H
init.  
hdx 已提交
53

DCloud-WZF's avatar
DCloud-WZF 已提交
54 55 56
.uni-panel-h-on {
  background-color: #f0f0f0;
}
H
init.  
hdx 已提交
57

DCloud-WZF's avatar
DCloud-WZF 已提交
58 59 60 61 62
.uni-panel-text {
  color: #000000;
  font-size: 14px;
  font-weight: normal;
}
H
init.  
hdx 已提交
63

DCloud-WZF's avatar
DCloud-WZF 已提交
64
.uni-panel-icon {}
H
init.  
hdx 已提交
65

DCloud-WZF's avatar
DCloud-WZF 已提交
66 67 68
.uni-panel-icon-on {
  transform: rotate(180deg);
}
H
init.  
hdx 已提交
69

DCloud-WZF's avatar
DCloud-WZF 已提交
70 71 72 73 74 75 76 77 78 79
.uni-navigate-item {
  flex-direction: row;
  align-items: center;
  background-color: #FFFFFF;
  border-top-style: solid;
  border-top-color: #f0f0f0;
  border-top-width: 1px;
  padding: 12px;
  justify-content: space-between;
}
H
init.  
hdx 已提交
80

DCloud-WZF's avatar
DCloud-WZF 已提交
81 82 83
.uni-navigate-item:active {
  background-color: #f8f8f8;
}
H
init.  
hdx 已提交
84

DCloud-WZF's avatar
DCloud-WZF 已提交
85 86 87 88 89
.uni-navigate-text {
  color: #000000;
  font-size: 12px;
  opacity: 0.8;
}
H
init.  
hdx 已提交
90

DCloud-WZF's avatar
DCloud-WZF 已提交
91 92 93 94 95 96
.uni-navigate-icon {
  margin-left: 15px;
  color: #999999;
  font-size: 14px;
  font-weight: normal;
}
H
init.  
hdx 已提交
97

DCloud-WZF's avatar
DCloud-WZF 已提交
98 99 100 101 102
.split-title {
  margin: 20px 0 5px;
  padding: 5px 0;
  border-bottom: 1px solid #dfdfdf;
}
H
init.  
hdx 已提交
103
</style>