【发布时间】:2020-08-21 14:16:36
【问题描述】:
我正在尝试在 vuejs 应用程序中使用
浏览器告诉我错误:
[Vue warn]: Unknown custom element: <b-form-datepicker> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
我正在使用其他 bootstrap-vue 组件没有问题。 给它一个“名称”属性不会改变任何事情。
我在这里缺少什么?
https://bootstrap-vue.org/docs/components/form-datepicker 上的文档没有讨论注册任何组件。 (我是否错过了何时以及如何使用组件的基本基本模式?)
我正在使用模板脚本样式模式来构建这部分 gui。
在我的main.js Í 确实有import BootstrapVue from 'bootstrap-vue'; 的声明
据我所见,在使用 bootstrap-vue 元素的其他位置,它开箱即用。
对我来说最接近的其他问题是https://stackoverflow.com/a/51410592/845117。
但是我错过了命名组件文档的链接以及带有“自定义”路径的导入语句:import { Alert } from 'bootstrap-vue/es/components';
我错过了一个主要部分吗?我这里缺少什么链接?
【问题讨论】:
-
在
v2.5.0中添加了日期选择器。你用的是什么版本的Bootstrap-Vue?
标签: vuejs2