Im new to Vuejs and I get the error unknown custom element -
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
}
},
}
Im new to Vuejs and I get the error unknown custom element -
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
}
},
}
Share
Improve this question
asked Jul 18, 2018 at 20:05
Naishu BabuNaishu Babu
612 silver badges14 bronze badges
1 Answer
Reset to default 6You will have to register the ponent as in Component registration
import { Alert } from 'bootstrap-vue/es/ponents';
ponents: { BAlert }
Since all html tags are turned into dashed by camelcase BAlert
= '<b-alert>'
Alertenativly you can also use
ponents: { 'b-alert': BAlert }
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745118245a4612259.html
评论列表(0条)