带有laravel的bootstrap-vue.js未知的自定义元素:< b-alert>错误 [英] bootstrap-vue.js with laravel Unknown custom element: <b-alert> error
本文介绍了带有laravel的bootstrap-vue.js未知的自定义元素:< b-alert>错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Vuejs的新手,并且收到错误未知的自定义元素-
Im new to Vuejs and I get the error unknown custom element -
我如何注册自定义元素-b-警报.我认为该元素来自bootstrapVue.
how do i register a custom element - b-alert. I think this element is from bootstrapVue.
<template>
<div>
<b-alert show>Default Alert</b-alert>
</div>
</template>
<script>
export default {
data () {
return {
dismissSecs: 10,
dismissCountDown: 0,
showDismissibleAlert: false
}
},
methods: {
countDownChanged (dismissCountDown) {
this.dismissCountDown = dismissCountDown
},
showAlert () {
this.dismissCountDown = this.dismissSecs
}
},
}
推荐答案
您将必须按照由于所有的html标记都被驼峰式BAlert
= '<b-alert>'
Since all html tags are turned into dashed by camelcase BAlert
= '<b-alert>'
另外,您还可以使用
components: { 'b-alert': BAlert }
这篇关于带有laravel的bootstrap-vue.js未知的自定义元素:< b-alert>错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文