When to use this skill
Use this skill whenever the user wants to:
- Build uni-app applications with uView UI components
- Use uView UI components (Button, Input, Form, Table, Modal, etc.)
- Use uView UI tools ($u.toast, $u.http, etc.)
- Customize uView UI theme
- Integrate uView UI with uni-app
- Create responsive layouts with uView UI
- Use uView UI form components
- Display data with uView UI components
- Handle navigation with uView UI
- Use uView UI utilities and helpers
How to use this skill
This skill is organized to match the uView UI official documentation structure (https://www.uviewui.com/guide/demo.html, https://www.uviewui.com/components/intro.html). When working with uView UI:
Identify the topic from the user's request:
- Getting started/快速开始 →
examples/getting-started/installation.md or examples/getting-started/basic-usage.md
- Button/按钮 →
examples/components/button.md
- Input/输入框 →
examples/components/input.md
- Form/表单 →
examples/components/form.md
- Table/表格 →
examples/components/table.md
- Modal/模态框 →
examples/components/modal.md
- Toast/提示 →
examples/tools/toast.md
- Http/请求 →
examples/tools/http.md
- Theme/主题 →
examples/advanced/theme-customization.md
Load the appropriate example file from the examples/ directory:
Getting Started (快速开始) - examples/getting-started/:
examples/getting-started/installation.md - Installing uView UI and basic setup
examples/getting-started/basic-usage.md - Basic component usage
examples/getting-started/design-principles.md - Design principles and best practices
Components (组件) - examples/components/:
examples/components/button.md - Button component
examples/components/input.md - Input component
examples/components/form.md - Form component
examples/components/table.md - Table component
examples/components/modal.md - Modal component
examples/components/toast.md - Toast component
examples/components/loading.md - Loading component
examples/components/picker.md - Picker component
examples/components/tabs.md - Tabs component
examples/components/navbar.md - Navbar component
examples/components/grid.md - Grid component
examples/components/card.md - Card component
examples/components/badge.md - Badge component
examples/components/swiper.md - Swiper component
examples/components/list.md - List component
Tools (工具) - examples/tools/:
examples/tools/toast.md - Toast tool ($u.toast)
examples/tools/http.md - Http tool ($u.http)
examples/tools/storage.md - Storage tool ($u.storage)
examples/tools/route.md - Route tool ($u.route)
examples/tools/debounce.md - Debounce tool
examples/tools/throttle.md - Throttle tool
Advanced (高级) - examples/advanced/:
examples/advanced/theme-customization.md - Customizing uView UI theme
examples/advanced/uniapp-integration.md - UniApp integration
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- All examples follow uView UI Vue 2.0 API
- Examples use uni-app syntax
- Each example file includes key concepts, code examples, and key points
- Always check the example file for best practices and common patterns
- uView UI is designed for uni-app (H5, 小程序, App)
Reference API documentation in the api/ directory when needed:
api/components.md - Component API reference
api/tools.md - Tools API reference ($u methods)
api/theme-variables.md - Theme variables API
Use templates from the templates/ directory:
templates/project-setup.md - Project setup templates
templates/component-template.md - Component usage templates
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 UI API documentation structure:
Components API (api/components.md)
- All component props and APIs
- Component events and slots
- Component types and interfaces
Tools API (api/tools.md)
- $u object methods
- Toast, Http, Storage, Route tools
- Utility functions
Theme Variables API (api/theme-variables.md)
- SCSS variables
- Theme customization variables
- Color variables
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
- Import uView UI: Import uView UI in main.js with Vue.use()
- Import styles: Import uView UI styles in App.vue
- Use easycom: Configure easycom in pages.json for automatic component registration
- Use $u tools: Use $u object for utility functions
- Theme customization: Customize theme via SCSS variables
- UniApp compatibility: Test on multiple platforms (H5, 小程序, App)
- Responsive design: Use rpx units for responsive layouts
- Component composition: Compose components for complex UIs
- Performance: Optimize for uni-app performance
- Accessibility: Follow uni-app accessibility guidelines
Resources
Keywords
uView UI, uView, uni-app, Vue 2, components, Button, Input, Form, Table, Modal, Toast, $u, tools, theme, customization, 组件库, 按钮, 输入框, 表单, 表格, 模态框, 提示, 工具函数, 主题定制
能力边界
✅ 适用场景
- 当你需要使用此技能对应的技术栈时
- 当项目需要遵循最佳实践时
- 当需要快速上手或深入理解核心概念时
⚠️ 需要注意
- 复杂业务逻辑需要结合具体场景调整
- 性能优化需要根据实际数据量评估
❌ 不适用场景
常见陷阱 (Gotchas)
- 版本兼容性:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异
- 配置文件格式:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查
- 环境变量:确保所有必要的环境变量已正确设置,敏感信息不要硬编码
- 依赖冲突:多版本共存时注意依赖冲突,使用 lock 文件锁定版本
- 性能陷阱:大数据量场景下注意性能优化,避免 N+1 查询等常见问题
使用流程
Step 1: 环境准备
确保开发环境已安装必要的依赖和工具。
Step 2: 配置初始化
根据项目需求进行基础配置。
Step 3: 核心功能使用
按照示例代码实现核心功能。
Step 4: 测试验证
运行测试确保功能正常。
Step 5: 部署上线
完成开发后进行部署和监控。
1---2name: uview-vue23description: Provides comprehensive guidance for uView Vue 2 component library including components, tools, and layouts. Use when the user asks about uView for Vue 2, needs to build Vue 2 applications with uView, or use uView components.4license: Complete terms in LICENSE.txt5---67## When to use this skill89Use this skill whenever the user wants to:10- Build uni-app applications with uView UI components11- Use uView UI components (Button, Input, Form, Table, Modal, etc.)12- Use uView UI tools ($u.toast, $u.http, etc.)13- Customize uView UI theme14- Integrate uView UI with uni-app15- Create responsive layouts with uView UI16- Use uView UI form components17- Display data with uView UI components18- Handle navigation with uView UI19- Use uView UI utilities and helpers2021## How to use this skill2223This skill is organized to match the uView UI official documentation structure (https://www.uviewui.com/guide/demo.html, https://www.uviewui.com/components/intro.html). When working with uView UI:24251. **Identify the topic** from the user's request:26 - Getting started/快速开始 → `examples/getting-started/installation.md` or `examples/getting-started/basic-usage.md`27 - Button/按钮 → `examples/components/button.md`28 - Input/输入框 → `examples/components/input.md`29 - Form/表单 → `examples/components/form.md`30 - Table/表格 → `examples/components/table.md`31 - Modal/模态框 → `examples/components/modal.md`32 - Toast/提示 → `examples/tools/toast.md`33 - Http/请求 → `examples/tools/http.md`34 - Theme/主题 → `examples/advanced/theme-customization.md`35362. **Load the appropriate example file** from the `examples/` directory:3738 **Getting Started (快速开始) - `examples/getting-started/`**:39 - `examples/getting-started/installation.md` - Installing uView UI and basic setup40 - `examples/getting-started/basic-usage.md` - Basic component usage41 - `examples/getting-started/design-principles.md` - Design principles and best practices4243 **Components (组件) - `examples/components/`**:44 - `examples/components/button.md` - Button component45 - `examples/components/input.md` - Input component46 - `examples/components/form.md` - Form component47 - `examples/components/table.md` - Table component48 - `examples/components/modal.md` - Modal component49 - `examples/components/toast.md` - Toast component50 - `examples/components/loading.md` - Loading component51 - `examples/components/picker.md` - Picker component52 - `examples/components/tabs.md` - Tabs component53 - `examples/components/navbar.md` - Navbar component54 - `examples/components/grid.md` - Grid component55 - `examples/components/card.md` - Card component56 - `examples/components/badge.md` - Badge component57 - `examples/components/swiper.md` - Swiper component58 - `examples/components/list.md` - List component5960 **Tools (工具) - `examples/tools/`**:61 - `examples/tools/toast.md` - Toast tool ($u.toast)62 - `examples/tools/http.md` - Http tool ($u.http)63 - `examples/tools/storage.md` - Storage tool ($u.storage)64 - `examples/tools/route.md` - Route tool ($u.route)65 - `examples/tools/debounce.md` - Debounce tool66 - `examples/tools/throttle.md` - Throttle tool6768 **Advanced (高级) - `examples/advanced/`**:69 - `examples/advanced/theme-customization.md` - Customizing uView UI theme70 - `examples/advanced/uniapp-integration.md` - UniApp integration71723. **Follow the specific instructions** in that example file for syntax, structure, and best practices7374 **Important Notes**:75 - All examples follow uView UI Vue 2.0 API76 - Examples use uni-app syntax77 - Each example file includes key concepts, code examples, and key points78 - Always check the example file for best practices and common patterns79 - uView UI is designed for uni-app (H5, 小程序, App)80814. **Reference API documentation** in the `api/` directory when needed:82 - `api/components.md` - Component API reference83 - `api/tools.md` - Tools API reference ($u methods)84 - `api/theme-variables.md` - Theme variables API85865. **Use templates** from the `templates/` directory:87 - `templates/project-setup.md` - Project setup templates88 - `templates/component-template.md` - Component usage templates899091### Doc mapping (one-to-one with official documentation)9293**Guide (指南)**:94- See guide files in `examples/guide/` or `examples/getting-started/` → https://www.uviewui.com/guide/demo.html9596**Components (组件)**:97- See component files in `examples/components/` → https://www.uviewui.com/components/intro.html9899## Examples and Templates100101This skill includes detailed examples organized to match the official documentation structure. All examples are in the `examples/` directory (see mapping above).102103**To use examples:**104- Identify the topic from the user's request105- Load the appropriate example file from the mapping above106- Follow the instructions, syntax, and best practices in that file107- Adapt the code examples to your specific use case108109**To use templates:**110- Reference templates in `templates/` directory for common scaffolding111- Adapt templates to your specific needs and coding style112113## API Reference114115Detailed API documentation is available in the `api/` directory, organized to match the official uView UI API documentation structure:116117### Components API (`api/components.md`)118- All component props and APIs119- Component events and slots120- Component types and interfaces121122### Tools API (`api/tools.md`)123- $u object methods124- Toast, Http, Storage, Route tools125- Utility functions126127### Theme Variables API (`api/theme-variables.md`)128- SCSS variables129- Theme customization variables130- Color variables131132**To use API reference:**1331. Identify the API you need help with1342. Load the corresponding API file from the `api/` directory1353. Find the API signature, parameters, return type, and examples1364. Reference the linked example files for detailed usage patterns1375. All API files include links to relevant example files in the `examples/` directory138139## Best Practices1401411. **Import uView UI**: Import uView UI in main.js with Vue.use()1422. **Import styles**: Import uView UI styles in App.vue1433. **Use easycom**: Configure easycom in pages.json for automatic component registration1444. **Use $u tools**: Use $u object for utility functions1455. **Theme customization**: Customize theme via SCSS variables1466. **UniApp compatibility**: Test on multiple platforms (H5, 小程序, App)1477. **Responsive design**: Use rpx units for responsive layouts1488. **Component composition**: Compose components for complex UIs1499. **Performance**: Optimize for uni-app performance15010. **Accessibility**: Follow uni-app accessibility guidelines151152## Resources153154- **Official Website**: https://www.uviewui.com/155- **Getting Started**: https://www.uviewui.com/guide/demo.html156- **Components**: https://www.uviewui.com/components/intro.html157- **UniApp Plugin**: https://ext.dcloud.net.cn/plugin?id=1593158- **GitHub Repository**: https://github.com/umicro/uView159160## Keywords161162uView UI, uView, uni-app, Vue 2, components, Button, Input, Form, Table, Modal, Toast, $u, tools, theme, customization, 组件库, 按钮, 输入框, 表单, 表格, 模态框, 提示, 工具函数, 主题定制163164## 能力边界165166### ✅ 适用场景167- 当你需要使用此技能对应的技术栈时168- 当项目需要遵循最佳实践时169- 当需要快速上手或深入理解核心概念时170171### ⚠️ 需要注意172- 复杂业务逻辑需要结合具体场景调整173- 性能优化需要根据实际数据量评估174175### ❌ 不适用场景176- 不相关的技术栈或框架177- 需要完全自定义的特殊场景178179## 常见陷阱 (Gotchas)1801811. **版本兼容性**:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异1822. **配置文件格式**:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查1833. **环境变量**:确保所有必要的环境变量已正确设置,敏感信息不要硬编码1844. **依赖冲突**:多版本共存时注意依赖冲突,使用 lock 文件锁定版本1855. **性能陷阱**:大数据量场景下注意性能优化,避免 N+1 查询等常见问题186187## 使用流程188189### Step 1: 环境准备190确保开发环境已安装必要的依赖和工具。191192### Step 2: 配置初始化193根据项目需求进行基础配置。194195### Step 3: 核心功能使用196按照示例代码实现核心功能。197198### Step 4: 测试验证199运行测试确保功能正常。200201### Step 5: 部署上线202完成开发后进行部署和监控。