bootstrap-vue3

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to use this skill

何时使用本技能

Use this skill whenever the user wants to:
  • Build Vue 3 applications with Bootstrap Vue components
  • Use Bootstrap UI components (Button, Form, Table, Modal, etc.)
  • Create responsive layouts with Bootstrap grid
  • Use Bootstrap Vue directives (v-b-tooltip, v-b-popover, v-b-modal)
  • Implement forms with Bootstrap styling
  • Display data in Bootstrap tables
  • Create modals and alerts
  • Use Bootstrap navigation components
  • Customize Bootstrap themes
  • Migrate from Bootstrap Vue 2.x to 3.0
当用户有以下需求时,可使用本技能:
  • 使用Bootstrap Vue组件构建Vue 3应用
  • 使用Bootstrap UI组件(Button、Form、Table、Modal等)
  • 利用Bootstrap栅格创建响应式布局
  • 使用Bootstrap Vue指令(v-b-tooltip、v-b-popover、v-b-modal)
  • 实现带有Bootstrap样式的表单
  • 在Bootstrap表格中展示数据
  • 创建模态框和警告框
  • 使用Bootstrap导航组件
  • 自定义Bootstrap主题
  • 从Bootstrap Vue 2.x迁移到3.0版本

How to use this skill

如何使用本技能

This skill is organized to match the Bootstrap Vue 3.0 official documentation structure (https://bootstrap-vue.org/docs, https://bootstrap-vue.org/docs/components). When working with Bootstrap Vue 3.0:
  1. 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
    • Form/表单 →
      examples/components/form.md
    • Table/表格 →
      examples/components/table.md
    • Modal/模态框 →
      examples/components/modal.md
    • Alert/警告框 →
      examples/components/alert.md
    • Navbar/导航栏 →
      examples/components/navbar.md
    • Grid/栅格 →
      examples/components/grid.md
    • Directives/指令 →
      examples/directives/tooltip.md
      or
      examples/directives/modal.md
  2. Load the appropriate example file from the
    examples/
    directory:
    Getting Started (快速开始) -
    examples/getting-started/
    :
    • examples/getting-started/installation.md
      - Installing Bootstrap Vue and basic setup
    • examples/getting-started/basic-usage.md
      - Basic component usage
    Components (组件) -
    examples/components/
    :
    • examples/components/button.md
      - Button component
    • examples/components/form.md
      - Form components
    • examples/components/input.md
      - Input component
    • examples/components/table.md
      - Table component
    • examples/components/modal.md
      - Modal component
    • examples/components/alert.md
      - Alert component
    • examples/components/navbar.md
      - Navbar component
    • examples/components/grid.md
      - Grid system (Container, Row, Col)
    • examples/components/card.md
      - Card component
    • examples/components/badge.md
      - Badge component
    • examples/components/dropdown.md
      - Dropdown component
    • examples/components/pagination.md
      - Pagination component
    • examples/components/tabs.md
      - Tabs component
    • examples/components/collapse.md
      - Collapse component
    • examples/components/popover.md
      - Popover component
    • examples/components/tooltip.md
      - Tooltip component
    Directives (指令) -
    examples/directives/
    :
    • examples/directives/tooltip.md
      - v-b-tooltip directive
    • examples/directives/popover.md
      - v-b-popover directive
    • examples/directives/modal.md
      - v-b-modal directive
    • examples/directives/toggle.md
      - v-b-toggle directive
    Advanced (高级) -
    examples/advanced/
    :
    • examples/advanced/theme-customization.md
      - Customizing Bootstrap theme
    • examples/advanced/composables.md
      - Using composables (useToast, useModal)
  3. Follow the specific instructions in that example file for syntax, structure, and best practices
    Important Notes:
    • All examples follow Bootstrap Vue 3.0 API (Vue 3 + Bootstrap 5)
    • Examples use Composition API syntax
    • Each example file includes key concepts, code examples, and key points
    • Always check the example file for best practices and common patterns
  4. Reference API documentation in the
    api/
    directory when needed:
    • api/components.md
      - Component API reference
    • api/directives.md
      - Directives API reference
    • api/composables.md
      - Composables API reference
  5. Use templates from the
    templates/
    directory:
    • templates/project-setup.md
      - Project setup templates
    • templates/component-template.md
      - Component usage templates
本技能的组织结构与Bootstrap Vue 3.0官方文档结构一致(https://bootstrap-vue.org/docs,https://bootstrap-vue.org/docs/components)。使用Bootstrap Vue 3.0时:
  1. 从用户请求中确定主题
    • 快速开始 →
      examples/getting-started/installation.md
      examples/getting-started/basic-usage.md
    • 按钮 →
      examples/components/button.md
    • 表单 →
      examples/components/form.md
    • 表格 →
      examples/components/table.md
    • 模态框 →
      examples/components/modal.md
    • 警告框 →
      examples/components/alert.md
    • 导航栏 →
      examples/components/navbar.md
    • 栅格 →
      examples/components/grid.md
    • 指令 →
      examples/directives/tooltip.md
      examples/directives/modal.md
  2. examples/
    目录加载对应的示例文件
    快速开始 -
    examples/getting-started/
    • examples/getting-started/installation.md
      - Bootstrap Vue的安装与基础配置
    • examples/getting-started/basic-usage.md
      - 组件基础使用方法
    组件 -
    examples/components/
    • examples/components/button.md
      - Button组件
    • examples/components/form.md
      - 表单组件
    • examples/components/input.md
      - Input组件
    • examples/components/table.md
      - Table组件
    • examples/components/modal.md
      - Modal组件
    • examples/components/alert.md
      - Alert组件
    • examples/components/navbar.md
      - Navbar组件
    • examples/components/grid.md
      - 栅格系统(Container、Row、Col)
    • examples/components/card.md
      - Card组件
    • examples/components/badge.md
      - Badge组件
    • examples/components/dropdown.md
      - Dropdown组件
    • examples/components/pagination.md
      - Pagination组件
    • examples/components/tabs.md
      - Tabs组件
    • examples/components/collapse.md
      - Collapse组件
    • examples/components/popover.md
      - Popover组件
    • examples/components/tooltip.md
      - Tooltip组件
    指令 -
    examples/directives/
    • examples/directives/tooltip.md
      - v-b-tooltip指令
    • examples/directives/popover.md
      - v-b-popover指令
    • examples/directives/modal.md
      - v-b-modal指令
    • examples/directives/toggle.md
      - v-b-toggle指令
    高级 -
    examples/advanced/
    • examples/advanced/theme-customization.md
      - 自定义Bootstrap主题
    • examples/advanced/composables.md
      - 使用组合式函数(useToast、useModal)
  3. 遵循示例文件中的具体说明,包括语法、结构和最佳实践
    重要提示
    • 所有示例均遵循Bootstrap Vue 3.0 API(Vue 3 + Bootstrap 5)
    • 示例使用Composition API语法
    • 每个示例文件包含核心概念、代码示例和关键点
    • 请务必查看示例文件中的最佳实践和常见模式
  4. 必要时参考
    api/
    目录中的API文档
    • api/components.md
      - 组件API参考
    • api/directives.md
      - 指令API参考
    • api/composables.md
      - 组合式函数API参考
  5. 使用
    templates/
    目录中的模板
    • templates/project-setup.md
      - 项目配置模板
    • templates/component-template.md
      - 组件使用模板

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
本技能包含详细的示例,其组织结构与官方文档一致。所有示例均位于
examples/
目录中(见上文映射)。
使用示例
  • 从用户请求中确定主题
  • 根据上述映射加载对应的示例文件
  • 遵循文件中的说明、语法和最佳实践
  • 根据具体用例调整代码示例
使用模板
  • 参考
    templates/
    目录中的模板进行通用脚手架搭建
  • 根据具体需求和编码风格调整模板

API Reference

API参考

Detailed API documentation is available in the
api/
directory, organized to match the official Bootstrap Vue 3.0 API documentation structure:
详细的API文档位于
api/
目录中,其组织结构与Bootstrap Vue 3.0官方API文档一致:

Components API (
api/components.md
)

组件API(
api/components.md

  • All component props and APIs
  • Component events and slots
  • Component types and interfaces
  • 所有组件的属性和API
  • 组件事件与插槽
  • 组件类型与接口

Directives API (
api/directives.md
)

指令API(
api/directives.md

  • Directive syntax and usage
  • Directive modifiers
  • Directive options
  • 指令语法与使用方法
  • 指令修饰符
  • 指令选项

Composables API (
api/composables.md
)

组合式函数API(
api/composables.md

  • useToast composable
  • useModal composable
  • usePopover composable
To use API reference:
  1. Identify the API you need help with
  2. Load the corresponding API file from the
    api/
    directory
  3. Find the API signature, parameters, return type, and examples
  4. Reference the linked example files for detailed usage patterns
  5. All API files include links to relevant example files in the
    examples/
    directory
  • useToast组合式函数
  • useModal组合式函数
  • usePopover组合式函数
使用API参考
  1. 确定需要帮助的API
  2. api/
    目录加载对应的API文件
  3. 查找API签名、参数、返回类型和示例
  4. 参考链接的示例文件获取详细使用模式
  5. 所有API文件均包含指向
    examples/
    目录中相关示例文件的链接

Best Practices

最佳实践

  1. Import Bootstrap CSS: Import Bootstrap CSS in your entry file
  2. Use Composition API: Prefer Composition API for Vue 3 projects
  3. Tree-shaking: Import components individually for better tree-shaking
  4. Responsive design: Use Bootstrap grid system for responsive layouts
  5. Accessibility: Follow Bootstrap accessibility guidelines
  6. Theme customization: Use Bootstrap variables for consistent theming
  7. Directives: Use directives for programmatic component control
  8. Composables: Use composables for programmatic API access
  9. Component composition: Compose components for complex UIs
  10. Performance: Optimize bundle size with tree-shaking
  1. 导入Bootstrap CSS:在入口文件中导入Bootstrap CSS
  2. 使用Composition API:Vue 3项目优先使用Composition API
  3. Tree-shaking(摇树优化):单独导入组件以实现更好的摇树优化
  4. 响应式设计:使用Bootstrap栅格系统实现响应式布局
  5. 可访问性:遵循Bootstrap可访问性指南
  6. 主题定制:使用Bootstrap变量实现统一主题
  7. 指令:使用指令实现组件的程序化控制
  8. 组合式函数:使用组合式函数访问程序化API
  9. 组件组合:通过组件组合构建复杂UI
  10. 性能:通过摇树优化减小包体积

Resources

资源

Keywords

关键词

Bootstrap Vue, Bootstrap Vue 3.0, Vue 3, Bootstrap 5, components, Button, Form, Table, Modal, Alert, Navbar, Grid, directives, v-b-tooltip, v-b-popover, v-b-modal, composables, useToast, useModal, 组件库, 按钮, 表单, 表格, 模态框, 警告框, 导航栏, 栅格, 指令
Bootstrap Vue、Bootstrap Vue 3.0、Vue 3、Bootstrap 5、components、Button、Form、Table、Modal、Alert、Navbar、Grid、directives、v-b-tooltip、v-b-popover、v-b-modal、composables、useToast、useModal、组件库、按钮、表单、表格、模态框、警告框、导航栏、栅格、指令