关于 bootstrap-vue3
面向 Vue 3 开发者的 Bootstrap Vue 3 文档技能,按组件、指令和 API 组织示例与模板,涵盖 Bootstrap 5 用法及从 2.x 迁移。
主要功能
- 01组件、指令与 API 示例
- 02Bootstrap 5 与 Vue 3 用法
- 03主题自定义与组合式函数
- 04项目及组件模板
适用场景
- 01构建响应式 Vue 3 界面
- 02实现表单、表格和模态框
- 03查阅指令或组件 API
- 04迁移 Bootstrap Vue 2.x 项目
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ partme-ai/ full-stack-skills --skill bootstrap-vue3安装后在 Claude Code 中输入/bootstrap-vue3确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
LICENSE.txtapi/components.mdexamples/components/button.mdform.mdgrid.mdmodal.mdtable.mdexamples/directives/tooltip.mdexamples/getting-started/basic-usage.mdinstallation.mdtemplates/component-template.mdproject-setup.md详细介绍
何时使用此技能
在用户希望执行以下操作时,使用此技能:
- 使用 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
如何使用此技能
此技能的组织结构与 Bootstrap Vue 3.0 官方文档结构一致(https://bootstrap-vue.org/docs、https://bootstrap-vue.org/docs/components)。使用 Bootstrap Vue 3.0 时:
-
根据用户请求确定主题:
- Getting started/快速开始 →
examples/getting-started/installation.md或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或examples/directives/modal.md
- Getting started/快速开始 →
-
从
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- Form 组件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)
-
遵循相应示例文件中的说明,了解语法、结构和最佳实践
重要说明:
- 所有示例均遵循 Bootstrap Vue 3.0 API(Vue 3 + Bootstrap 5)
- 示例使用 Composition API 语法
- 每个示例文件都包含核心概念、代码示例和要点
- 务必查看示例文件,了解最佳实践和常见模式
-
需要时参考
api/目录中的 API 文档:api/components.md- 组件 API 参考api/directives.md- 指令 API 参考api/composables.md- 组合式函数 API 参考
-
使用
templates/目录中的模板:templates/project-setup.md- 项目设置模板templates/component-template.md- 组件用法模板
文档映射(与官方文档一一对应)
指南(指南):
- 查看
examples/guide/或examples/getting-started/中的指南文件 → https://bootstrap-vue.org/docs
组件(组件):
- 查看
examples/components/中的组件文件 → https://bootstrap-vue.org/docs/components
示例和模板
此技能包含详细示例,按照官方文档结构组织。所有示例都位于 examples/ 目录中(见上方映射)。
使用示例:
- 根据用户的请求确定主题
- 从上方映射中加载相应的示例文件
- 遵循该文件中的说明、语法和最佳实践
- 根据具体用例调整代码示例
使用模板:
- 查看
templates/目录中的模板,了解常见的脚手架结构 - 根据具体需求和编码风格调整模板
API 参考
详细的 API 文档位于 api/ 目录中,按照官方 Bootstrap Vue 3.0 API 文档结构组织:
组件 API(api/components.md)
- 所有组件属性和 API
- 组件事件和插槽
- 组件类型和接口
指令 API(api/directives.md)
- 指令语法和用法
- 指令修饰符
- 指令选项
组合式函数 API(api/composables.md)
- useToast 组合式函数
- useModal 组合式函数
- usePopover 组合式函数
使用 API 参考:
- 确定需要了解的 API
- 从
api/目录加载相应的 API 文件 - 查找 API 签名、参数、返回类型和示例
- 参考链接中的示例文件,了解详细用法
- 所有 API 文件都包含指向
examples/目录中相关示例文件的链接
最佳实践
- 导入 Bootstrap CSS:在入口文件中导入 Bootstrap CSS
- 使用 Composition API:Vue 3 项目优先使用 Composition API
- 摇树优化:单独导入组件,以获得更好的摇树优化效果
- 响应式设计:使用 Bootstrap 栅格系统构建响应式布局
- 无障碍性:遵循 Bootstrap 无障碍指南
- 主题自定义:使用 Bootstrap 变量,确保主题风格一致
- 指令:使用指令以编程方式控制组件
- 组合式函数:使用组合式函数以编程方式访问 API
- 组件组合:组合组件以构建复杂 UI
- 性能:通过摇树优化来优化打包体积
资源
- 官方网站:https://bootstrap-vue.org
- 文档:https://bootstrap-vue.org/docs
- 组件:https://bootstrap-vue.org/docs/components
- GitHub 仓库:https://github.com/bootstrap-vue/bootstrap-vue-next
关键词
Bootstrap Vue, Bootstrap Vue 3.0, Vue 3, Bootstrap 5, 组件, Button, Form, Table, Modal, Alert, Navbar, Grid, 指令, v-b-tooltip, v-b-popover, v-b-modal, 组合式函数, useToast, useModal, 组件库, 按钮, 表单, 表格, 模态框, 警告框, 导航栏, 栅格, 指令