uview-vue2
Original:🇺🇸 English
Translated
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.
8installs
Sourceteachingai/agent-skills
Added on
NPX Install
npx skill4agent add teachingai/agent-skills uview-vue2Tags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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/快速开始 → or
examples/getting-started/installation.mdexamples/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
- Getting started/快速开始 →
-
Load the appropriate example file from thedirectory:
examples/Getting Started (快速开始) -:examples/getting-started/- - Installing uView UI and basic setup
examples/getting-started/installation.md - - Basic component usage
examples/getting-started/basic-usage.md - - Design principles and best practices
examples/getting-started/design-principles.md
Components (组件) -:examples/components/- - Button component
examples/components/button.md - - Input component
examples/components/input.md - - Form component
examples/components/form.md - - Table component
examples/components/table.md - - Modal component
examples/components/modal.md - - Toast component
examples/components/toast.md - - Loading component
examples/components/loading.md - - Picker component
examples/components/picker.md - - Tabs component
examples/components/tabs.md - - Navbar component
examples/components/navbar.md - - Grid component
examples/components/grid.md - - Card component
examples/components/card.md - - Badge component
examples/components/badge.md - - Swiper component
examples/components/swiper.md - - List component
examples/components/list.md
Tools (工具) -:examples/tools/- - Toast tool ($u.toast)
examples/tools/toast.md - - Http tool ($u.http)
examples/tools/http.md - - Storage tool ($u.storage)
examples/tools/storage.md - - Route tool ($u.route)
examples/tools/route.md - - Debounce tool
examples/tools/debounce.md - - Throttle tool
examples/tools/throttle.md
Advanced (高级) -:examples/advanced/- - Customizing uView UI theme
examples/advanced/theme-customization.md - - UniApp integration
examples/advanced/uniapp-integration.md
-
Follow the specific instructions in that example file for syntax, structure, and best practicesImportant 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 thedirectory when needed:
api/- - Component API reference
api/components.md - - Tools API reference ($u methods)
api/tools.md - - Theme variables API
api/theme-variables.md
-
Use templates from thedirectory:
templates/- - Project setup templates
templates/project-setup.md - - Component usage templates
templates/component-template.md
Doc mapping (one-to-one with official documentation)
Guide (指南):
- See guide files in or
examples/guide/→ https://www.uviewui.com/guide/demo.htmlexamples/getting-started/
Components (组件):
- See component files in → https://www.uviewui.com/components/intro.html
examples/components/
Examples and Templates
This skill includes detailed examples organized to match the official documentation structure. All examples are in the directory (see mapping above).
examples/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 directory for common scaffolding
templates/ - Adapt templates to your specific needs and coding style
API Reference
Detailed API documentation is available in the directory, organized to match the official uView UI API documentation structure:
api/Components API (api/components.md
)
api/components.md- All component props and APIs
- Component events and slots
- Component types and interfaces
Tools API (api/tools.md
)
api/tools.md- $u object methods
- Toast, Http, Storage, Route tools
- Utility functions
Theme Variables API (api/theme-variables.md
)
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 directory
api/ - 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 directory
examples/
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
- Official Website: https://www.uviewui.com/
- Getting Started: https://www.uviewui.com/guide/demo.html
- Components: https://www.uviewui.com/components/intro.html
- UniApp Plugin: https://ext.dcloud.net.cn/plugin?id=1593
- GitHub Repository: https://github.com/umicro/uView
Keywords
uView UI, uView, uni-app, Vue 2, components, Button, Input, Form, Table, Modal, Toast, $u, tools, theme, customization, 组件库, 按钮, 输入框, 表单, 表格, 模态框, 提示, 工具函数, 主题定制