# taro开发模板 **Repository Path**: superleven/taro-development-template ## Basic Information - **Project Name**: taro开发模板 - **Description**: 一个基于Taro框架的开发模板,适用于多端(微信小程序、H5、React Native等)应用快速开发,包含常用组件和基础配置。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-06-24 - **Last Updated**: 2026-06-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Taro Development Template 基于 Taro 3.6.40 的快速开发模板,集成了 ColorUI 和常用工具/组件封装。 ## 项目结构 ``` taro-development-template/ ├── config/ # Taro 配置文件 ├── src/ │ ├── pages/ # 页面 │ │ ├── index/ # 首页(占位) │ │ └── mine/ # 我的(占位) │ ├── styles/ # 样式 │ │ ├── colorui.less # ColorUI 核心样式 │ │ ├── icon.css # ColorUI 图标 │ │ └── animation.css # ColorUI 动画 │ ├── utils/ # 工具函数 │ │ ├── index.ts # 通用工具 │ │ ├── request.ts # HTTP 请求封装 │ │ └── storage.ts # 存储封装 │ ├── App.tsx # 应用入口 │ ├── app.config.ts # 应用配置 │ └── app.less # 全局样式 ├── package.json ├── tsconfig.json └── babel.config.js ``` ## 技术栈 - **框架**: Taro 3.6.40 + React 18 - **UI 组件**: ColorUI (原生小程序样式库) - **样式**: Less ## 快速开始 ```bash # 安装依赖 npm install # 开发微信小程序 npm run dev:weapp # 开发 H5 npm run dev:h5 # 构建微信小程序 npm run build:weapp # 构建 H5 npm run build:h5 ``` ## 主要功能 ### 工具函数 (`src/utils/`) - `request.ts` - HTTP 请求封装,支持拦截器 - `storage.ts` - 本地存储封装 - `index.ts` - 通用工具函数(formatDate, debounce, throttle 等) ### 样式 (`src/styles/`) - `colorui.less` - ColorUI 核心样式(按钮、徽章、头像、列表、卡片等) - `icon.css` - ColorUI 图标字体 - `animation.css` - ColorUI 微动画 ## 页面说明 - **首页** (`pages/index/index`) - 占位页面 - **我的** (`pages/mine/mine`) - 占位页面 可根据业务需求自行扩展页面。 ## 注意事项 1. tabBar 图标需在 `src/static/` 目录下放置对应图片 2. 请根据实际后端 API 修改 `src/utils/request.ts` 中的配置 3. ColorUI 组件使用 class 方式,如 `cu-btn`, `cu-tag`, `cu-avatar` 等