Blame view

App.vue 486 Bytes
c293da23   刘淇   新园林init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <script setup>
  // 错误:import { onLaunch } from 'vue';
  // 正确:从 uni-app 导入应用生命周期钩子
  import { onLaunch } from '@dcloudio/uni-app';
  
  onLaunch(() => {
    console.log('App Launch');
  });
  </script>
  
  <style lang="scss">
  /* 注意要写在第一行,注意不能引入至uni.scss,同时给style标签加入lang="scss"属性 */
  @import "@/uni_modules/uview-plus/index.scss";
  
  /* 你的全局样式 */
  page {
    background-color: #f8f8f8;
    height: 100%;
  }
  </style>