When to use this skill
Use this skill whenever the user wants to:
- Install and set up uView Pro in a uni-app project
- Use uView Pro components in Vue 3 / uni-app applications
- Configure uView Pro (theme, i18n, etc.)
- Use form components (Button, Input, Form, etc.)
- Use data display components (List, Card, etc.)
- Use feedback components (Toast, Modal, etc.)
- Use navigation components (Tabs, NavBar, etc.)
- Use uView Pro tools and utilities
- Use uView Pro layout templates
- Customize component styles and themes
- Handle component events
- Understand uView Pro API and methods
- Troubleshoot uView Pro issues
How to use this skill
This skill is organized to match the uView Pro official documentation structure (https://uviewpro.cn/, https://uviewpro.cn/zh/guide/intro.html, https://uviewpro.cn/zh/components/intro.html, https://uviewpro.cn/zh/tools/intro.html, https://uviewpro.cn/zh/layout/intro.html). When working with uView Pro:
Identify the topic from the user's request:
- Installation/安装 →
examples/guide/installation.md
- Quick Start/快速开始 →
examples/guide/quick-start.md
- Components/组件 →
examples/components/
- Tools/工具 →
examples/tools/
- Layout/布局 →
examples/layout/
- API/API 文档 →
api/
Load the appropriate example file from the examples/ directory:
Guide (使用指南):
examples/guide/intro.md - Introduction
examples/guide/installation.md - Installation guide
examples/guide/quick-start.md - Quick start guide
examples/guide/theme.md - Theme customization
examples/guide/i18n.md - Internationalization
examples/guide/config.md - Configuration
Components (组件):
examples/components/intro.md - Components introduction
examples/components/button.md - Button component
examples/components/input.md - Input component
examples/components/form.md - Form component
examples/components/list.md - List component
examples/components/card.md - Card component
examples/components/toast.md - Toast component
examples/components/modal.md - Modal component
examples/components/tabs.md - Tabs component
examples/components/navbar.md - NavBar component
examples/components/date-picker.md - DatePicker component
examples/components/select.md - Select component
examples/components/switch.md - Switch component
examples/components/checkbox.md - Checkbox component
examples/components/radio.md - Radio component
examples/components/upload.md - Upload component
examples/components/pagination.md - Pagination component
examples/components/avatar.md - Avatar component
examples/components/badge.md - Badge component
examples/components/tag.md - Tag component
examples/components/empty.md - Empty component
examples/components/loading.md - Loading component
examples/components/popup.md - Popup component
examples/components/dropdown.md - Dropdown component
examples/components/drawer.md - Drawer component
Tools (工具):
examples/tools/intro.md - Tools introduction
examples/tools/http.md - HTTP request
examples/tools/storage.md - Storage utilities
examples/tools/router.md - Router utilities
examples/tools/validator.md - Validator utilities
examples/tools/format.md - Format utilities
examples/tools/color.md - Color utilities
Layout (布局):
examples/layout/intro.md - Layout introduction
examples/layout/grid.md - Grid layout
examples/layout/flex.md - Flex layout
examples/layout/container.md - Container layout
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- uView Pro is for Vue 3 and uni-app
- Components use Vue 3 Composition API
- Examples include both Options API and Composition API
- Each example file includes key concepts, code examples, and key points
Reference API documentation in the api/ directory when needed:
api/component-api.md - Component API reference
api/props-and-events.md - Props and events reference
api/tools-api.md - Tools API reference
api/config-api.md - Configuration API
Use templates from the templates/ directory:
templates/installation.md - Installation templates
templates/component-usage.md - Component usage templates
templates/project-setup.md - Project setup templates
1. Understanding uView Pro
uView Pro is a Vue 3 component library designed for uni-app development, providing rich components and utility methods.
Key Concepts:
- Vue 3 Support: Built for Vue 3 with Composition API
- uni-app Support: Optimized for uni-app development
- Rich Components: 100+ components for various use cases
- Theme Customization: Support for theme customization
- i18n: Internationalization support
- Tools: Rich utility methods
2. Installation
Using npm:
npm install uview-pro
Using yarn:
yarn add uview-pro
Using pnpm:
pnpm add uview-pro
3. Basic Setup
// main.js
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
}
}
Doc mapping (one-to-one with official documentation)
Guide (指南):
Components (组件):
Examples and Templates
This skill includes detailed examples organized to match the official documentation structure. All examples are in the examples/ directory (see mapping above).
To use examples:
- Identify the topic from the user's request
- Load the appropriate example file from the mapping above
- Follow the instructions, syntax, and best practices in that file
- Adapt the code examples to your specific use case
To use templates:
- Reference templates in
templates/ directory for common scaffolding
- Adapt templates to your specific needs and coding style
API Reference
Detailed API documentation is available in the api/ directory, organized to match the official uView Pro API documentation structure:
Component API (api/component-api.md)
- Component props and events
- Component methods
- Component slots
Props and Events (api/props-and-events.md)
- Common props
- Common events
- Event handling
Tools API (api/tools-api.md)
- HTTP request methods
- Storage methods
- Router methods
- Validator methods
- Format methods
- Color methods
Configuration API (api/config-api.md)
- Global configuration options
- Theme configuration
- i18n configuration
To use API reference:
- Identify the API you need help with
- Load the corresponding API file from the
api/ directory
- Find the API signature, parameters, return type, and examples
- Reference the linked example files for detailed usage patterns
- All API files include links to relevant example files in the
examples/ directory
Best Practices
- Use on-demand import: Import only the components you need to reduce bundle size
- Use Composition API: Prefer Composition API for better code organization
- Handle events properly: Use proper event handlers for component interactions
- Customize theme: Use theme variables for customization
- Follow design specs: Follow uView Pro design specifications
- Use tools: Leverage uView Pro tools for common operations
- Use layouts: Use layout templates for consistent page structure
Resources
Keywords
uView Pro, uview-pro, Vue 3, Vue3, uni-app, UI components, component library, 组件库, 按钮, 表单, 列表, 卡片, 提示, 弹窗, 标签页, 导航栏, 日期选择器, 选择器, 开关, 复选框, 单选框, 上传, 分页, 头像, 徽标, 标签, 空状态, 加载, 弹出层, 下拉菜单, 抽屉, HTTP, 存储, 路由, 验证, 格式化, 颜色, 网格布局, 弹性布局, 容器布局, Button, Form, List, Card, Toast, Modal, Tabs, NavBar, DatePicker, Select, Switch, Checkbox, Radio, Upload, Pagination, Avatar, Badge, Tag, Empty, Loading, Popup, Dropdown, Drawer
能力边界
✅ 适用场景
- 当你需要使用此技能对应的技术栈时
- 当项目需要遵循最佳实践时
- 当需要快速上手或深入理解核心概念时
⚠️ 需要注意
- 复杂业务逻辑需要结合具体场景调整
- 性能优化需要根据实际数据量评估
❌ 不适用场景
常见陷阱 (Gotchas)
- 版本兼容性:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异
- 配置文件格式:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查
- 环境变量:确保所有必要的环境变量已正确设置,敏感信息不要硬编码
- 依赖冲突:多版本共存时注意依赖冲突,使用 lock 文件锁定版本
- 性能陷阱:大数据量场景下注意性能优化,避免 N+1 查询等常见问题
使用流程
Step 1: 环境准备
确保开发环境已安装必要的依赖和工具。
Step 2: 配置初始化
根据项目需求进行基础配置。
Step 3: 核心功能使用
按照示例代码实现核心功能。
Step 4: 测试验证
运行测试确保功能正常。
Step 5: 部署上线
完成开发后进行部署和监控。
1---2name: uview-pro-vue33description: Provides comprehensive guidance for uView Pro Vue 3 component library including components, tools, layouts, and templates. Use when the user asks about uView Pro, needs to build Vue 3 applications with uView Pro, or implement mobile-first UI components.4license: Complete terms in LICENSE.txt5---67## When to use this skill89Use this skill whenever the user wants to:10- Install and set up uView Pro in a uni-app project11- Use uView Pro components in Vue 3 / uni-app applications12- Configure uView Pro (theme, i18n, etc.)13- Use form components (Button, Input, Form, etc.)14- Use data display components (List, Card, etc.)15- Use feedback components (Toast, Modal, etc.)16- Use navigation components (Tabs, NavBar, etc.)17- Use uView Pro tools and utilities18- Use uView Pro layout templates19- Customize component styles and themes20- Handle component events21- Understand uView Pro API and methods22- Troubleshoot uView Pro issues2324## How to use this skill2526This skill is organized to match the uView Pro official documentation structure (https://uviewpro.cn/, https://uviewpro.cn/zh/guide/intro.html, https://uviewpro.cn/zh/components/intro.html, https://uviewpro.cn/zh/tools/intro.html, https://uviewpro.cn/zh/layout/intro.html). When working with uView Pro:27281. **Identify the topic** from the user's request:29 - Installation/安装 → `examples/guide/installation.md`30 - Quick Start/快速开始 → `examples/guide/quick-start.md`31 - Components/组件 → `examples/components/`32 - Tools/工具 → `examples/tools/`33 - Layout/布局 → `examples/layout/`34 - API/API 文档 → `api/`35362. **Load the appropriate example file** from the `examples/` directory:3738 **Guide (使用指南)**:39 - `examples/guide/intro.md` - Introduction40 - `examples/guide/installation.md` - Installation guide41 - `examples/guide/quick-start.md` - Quick start guide42 - `examples/guide/theme.md` - Theme customization43 - `examples/guide/i18n.md` - Internationalization44 - `examples/guide/config.md` - Configuration4546 **Components (组件)**:47 - `examples/components/intro.md` - Components introduction48 - `examples/components/button.md` - Button component49 - `examples/components/input.md` - Input component50 - `examples/components/form.md` - Form component51 - `examples/components/list.md` - List component52 - `examples/components/card.md` - Card component53 - `examples/components/toast.md` - Toast component54 - `examples/components/modal.md` - Modal component55 - `examples/components/tabs.md` - Tabs component56 - `examples/components/navbar.md` - NavBar component57 - `examples/components/date-picker.md` - DatePicker component58 - `examples/components/select.md` - Select component59 - `examples/components/switch.md` - Switch component60 - `examples/components/checkbox.md` - Checkbox component61 - `examples/components/radio.md` - Radio component62 - `examples/components/upload.md` - Upload component63 - `examples/components/pagination.md` - Pagination component64 - `examples/components/avatar.md` - Avatar component65 - `examples/components/badge.md` - Badge component66 - `examples/components/tag.md` - Tag component67 - `examples/components/empty.md` - Empty component68 - `examples/components/loading.md` - Loading component69 - `examples/components/popup.md` - Popup component70 - `examples/components/dropdown.md` - Dropdown component71 - `examples/components/drawer.md` - Drawer component7273 **Tools (工具)**:74 - `examples/tools/intro.md` - Tools introduction75 - `examples/tools/http.md` - HTTP request76 - `examples/tools/storage.md` - Storage utilities77 - `examples/tools/router.md` - Router utilities78 - `examples/tools/validator.md` - Validator utilities79 - `examples/tools/format.md` - Format utilities80 - `examples/tools/color.md` - Color utilities8182 **Layout (布局)**:83 - `examples/layout/intro.md` - Layout introduction84 - `examples/layout/grid.md` - Grid layout85 - `examples/layout/flex.md` - Flex layout86 - `examples/layout/container.md` - Container layout87883. **Follow the specific instructions** in that example file for syntax, structure, and best practices8990 **Important Notes**:91 - uView Pro is for Vue 3 and uni-app92 - Components use Vue 3 Composition API93 - Examples include both Options API and Composition API94 - Each example file includes key concepts, code examples, and key points95964. **Reference API documentation** in the `api/` directory when needed:97 - `api/component-api.md` - Component API reference98 - `api/props-and-events.md` - Props and events reference99 - `api/tools-api.md` - Tools API reference100 - `api/config-api.md` - Configuration API1011025. **Use templates** from the `templates/` directory:103 - `templates/installation.md` - Installation templates104 - `templates/component-usage.md` - Component usage templates105 - `templates/project-setup.md` - Project setup templates106107### 1. Understanding uView Pro108109uView Pro is a Vue 3 component library designed for uni-app development, providing rich components and utility methods.110111**Key Concepts**:112- **Vue 3 Support**: Built for Vue 3 with Composition API113- **uni-app Support**: Optimized for uni-app development114- **Rich Components**: 100+ components for various use cases115- **Theme Customization**: Support for theme customization116- **i18n**: Internationalization support117- **Tools**: Rich utility methods118119### 2. Installation120121**Using npm**:122123```bash124npm install uview-pro125```126127**Using yarn**:128129```bash130yarn add uview-pro131```132133**Using pnpm**:134135```bash136pnpm add uview-pro137```138139### 3. Basic Setup140141```javascript142// main.js143import { createSSRApp } from 'vue'144import uView from 'uview-pro'145import App from './App.vue'146147export function createApp() {148 const app = createSSRApp(App)149 app.use(uView)150 return {151 app152 }153}154```155156157### Doc mapping (one-to-one with official documentation)158159**Guide (指南)**:160- See guide files in `examples/guide/` or `examples/getting-started/` → https://uviewpro.cn/zh/guide/intro.html161162**Components (组件)**:163- See component files in `examples/components/` → https://uviewpro.cn/zh/components/intro.html164165## Examples and Templates166167This skill includes detailed examples organized to match the official documentation structure. All examples are in the `examples/` directory (see mapping above).168169**To use examples:**170- Identify the topic from the user's request171- Load the appropriate example file from the mapping above172- Follow the instructions, syntax, and best practices in that file173- Adapt the code examples to your specific use case174175**To use templates:**176- Reference templates in `templates/` directory for common scaffolding177- Adapt templates to your specific needs and coding style178179## API Reference180181Detailed API documentation is available in the `api/` directory, organized to match the official uView Pro API documentation structure:182183### Component API (`api/component-api.md`)184- Component props and events185- Component methods186- Component slots187188### Props and Events (`api/props-and-events.md`)189- Common props190- Common events191- Event handling192193### Tools API (`api/tools-api.md`)194- HTTP request methods195- Storage methods196- Router methods197- Validator methods198- Format methods199- Color methods200201### Configuration API (`api/config-api.md`)202- Global configuration options203- Theme configuration204- i18n configuration205206**To use API reference:**2071. Identify the API you need help with2082. Load the corresponding API file from the `api/` directory2093. Find the API signature, parameters, return type, and examples2104. Reference the linked example files for detailed usage patterns2115. All API files include links to relevant example files in the `examples/` directory212213## Best Practices2142151. **Use on-demand import**: Import only the components you need to reduce bundle size2162. **Use Composition API**: Prefer Composition API for better code organization2173. **Handle events properly**: Use proper event handlers for component interactions2184. **Customize theme**: Use theme variables for customization2195. **Follow design specs**: Follow uView Pro design specifications2206. **Use tools**: Leverage uView Pro tools for common operations2217. **Use layouts**: Use layout templates for consistent page structure222223## Resources224225- **Official Documentation**: https://uviewpro.cn/226- **Guide**: https://uviewpro.cn/zh/guide/intro.html227- **Components**: https://uviewpro.cn/zh/components/intro.html228- **Tools**: https://uviewpro.cn/zh/tools/intro.html229- **Layout**: https://uviewpro.cn/zh/layout/intro.html230231## Keywords232233uView Pro, uview-pro, Vue 3, Vue3, uni-app, UI components, component library, 组件库, 按钮, 表单, 列表, 卡片, 提示, 弹窗, 标签页, 导航栏, 日期选择器, 选择器, 开关, 复选框, 单选框, 上传, 分页, 头像, 徽标, 标签, 空状态, 加载, 弹出层, 下拉菜单, 抽屉, HTTP, 存储, 路由, 验证, 格式化, 颜色, 网格布局, 弹性布局, 容器布局, Button, Form, List, Card, Toast, Modal, Tabs, NavBar, DatePicker, Select, Switch, Checkbox, Radio, Upload, Pagination, Avatar, Badge, Tag, Empty, Loading, Popup, Dropdown, Drawer234235## 能力边界236237### ✅ 适用场景238- 当你需要使用此技能对应的技术栈时239- 当项目需要遵循最佳实践时240- 当需要快速上手或深入理解核心概念时241242### ⚠️ 需要注意243- 复杂业务逻辑需要结合具体场景调整244- 性能优化需要根据实际数据量评估245246### ❌ 不适用场景247- 不相关的技术栈或框架248- 需要完全自定义的特殊场景249250## 常见陷阱 (Gotchas)2512521. **版本兼容性**:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异2532. **配置文件格式**:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查2543. **环境变量**:确保所有必要的环境变量已正确设置,敏感信息不要硬编码2554. **依赖冲突**:多版本共存时注意依赖冲突,使用 lock 文件锁定版本2565. **性能陷阱**:大数据量场景下注意性能优化,避免 N+1 查询等常见问题257258## 使用流程259260### Step 1: 环境准备261确保开发环境已安装必要的依赖和工具。262263### Step 2: 配置初始化264根据项目需求进行基础配置。265266### Step 3: 核心功能使用267按照示例代码实现核心功能。268269### Step 4: 测试验证270运行测试确保功能正常。271272### Step 5: 部署上线273完成开发后进行部署和监控。