App.vue 1.8 KB
Newer Older
H
init.  
hdx 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
<script>
  export default {
    onLaunch: function() {
      console.log('App Launch')

      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() {
      console.log('App Show')
    },
    onHide: function() {
      console.log('App Hide')
    }
  }
</script>

<style>
  /* @font-face {
    font-family: uniicons;
    font-weight: normal;
    font-style: normal;
    src: url('./static/fonts/uni.ttf') format('truetype');
  } */

  .page {
    padding: 15px;
  }

  .uni-panel {
    margin-bottom: 12px;
  }

  .uni-panel-h {
    background-color: #ffffff;
    flex-direction: row;
    align-items: center;
    padding: 12px;
  }

  .uni-panel-h-on {
    background-color: #f0f0f0;
  }

  .uni-panel-text {
    color: #000000;
    font-size: 14px;
    font-weight: normal;
  }

  .uni-panel-icon {}

  .uni-panel-icon-on {
    transform: rotate(180deg);
  }

  .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;
  }

  .uni-navigate-item:active {
    background-color: #f8f8f8;
  }

  .uni-navigate-text {
    color: #000000;
    font-size: 12px;
    opacity: 0.8;
  }

  .uni-navigate-icon {
    margin-left: 15px;
    color: #999999;
    font-size: 14px;
    font-weight: normal;
  }

  .split-title {
    margin: 20px 0 5px;
    padding: 5px 0;
    border-bottom: 1px solid #dfdfdf;
  }
</style>