# uniapp-framework **Repository Path**: oraclegao/uniapp-framework ## Basic Information - **Project Name**: uniapp-framework - **Description**: unapp 移动端脚手架 集成uni-ui和uview-plus - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-23 - **Last Updated**: 2025-10-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # unapp 移动端脚手架 - 集成uni-ui和uview-plus ### 脚手架安装 #### 安装uview-plus - 安装npm依赖 ``` powershell npm i sass@1.63.2 -D npm i sass-loader@10.4.1 -D npm install dayjs npm install clipboard npm install uview-plus ``` - 修改main.js ``` js import uviewPlus from 'uview-plus' //【添加】 // #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) app.use(uviewPlus) //【添加】 return { app } } // #endif ``` - 修改uni.scss ``` scss @import 'uview-plus/theme.scss'; //【添加】 ``` - 修改App.vue ``` ``` - 修改page.json ``` json // pages.json { "easycom": { "autoscan": true, // 注意一定要放在custom里,否则无效,https://ask.dcloud.net.cn/question/131175 "custom": { "^u--(.*)": "uview-plus/components/u-$1/u-$1.vue", "^up-(.*)": "uview-plus/components/u-$1/u-$1.vue", "^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue" } }, // 此为本身已有的内容 "pages": [ // ...... ] } ``` #### 安装uni-ui ``` powershell npm i @dcloudio/uni-ui ``` - 修改page.json ``` json { "easycom": { "autoscan": true, "custom": { // uni-ui 规则如下配置 "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" } }, // 其他内容 pages:[ // ... ] } ```