1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-09-12 16:40:40 +08:00
Files
2026-08-31 07:58:23 +08:00

950 B

Project Setup Templates

uni-app Project Setup

# Create uni-app project
# Using HBuilderX or CLI

# Install uView Pro
npm install uview-pro

pages.json Configuration

{
  "easycom": {
    "autoscan": true,
    "custom": {
      "^u-(.*)": "uview-pro/components/u-$1/u-$1.vue"
    }
  },
  "pages": [
    {
      "path": "pages/index/index",
      "style": {
        "navigationBarTitleText": "首页"
      }
    }
  ]
}

main.js Setup

import { createSSRApp } from 'vue'
import uView from 'uview-pro'
import App from './App.vue'

export function createApp() {
  const app = createSSRApp(App)
  app.use(uView)
  return {
    app
  }
}

App.vue Setup

<template>
  <view id="app">
    <!-- Your app content -->
  </view>
</template>

<script>
export default {
  onLaunch() {
    console.log('App Launch')
  }
}
</script>

<style lang="scss">
@import 'uview-pro/index.scss';
</style>