yuche / vue-strap

Bootstrap components built with Vue.js
http://yuche.github.io/vue-strap/
MIT License
4.71k stars 932 forks source link

Using Vue 2 - Component Instance Not Found #451

Closed mailnike closed 7 years ago

mailnike commented 7 years ago

Hi,

Sorry - I am bit of a rookie here and trying to use VueStrap 2 for Vue 2. I have below code on my HTML page:


<mySelect name="fruitOptions[]" limit="3" search justified required disabled clear-button close-on-select>
                                                </mySelect>

and this is in my component:

import mySelect from 'vue-strap/src/Select';

Vue.component('contact-api', {
    props: ['user'],
    components: {
        mySelect
    },
    data() {
        return {
            fruitOptions: [ {value:'Apple', label:'Apple'}, {value:'Banana', label:'Banana'}, {value:'Cherry', label:'Cherry'}, {value:'Orange', label:'Orange'}, {value:'Grape', label:'Grape'} ],

However, I am getting below errors: 1)) Unknown custom element: - did you register the component correctly? 2)) Cannot read property 'name' of undefined

any idea what am i missing?

wffranco commented 7 years ago

For vue 2 use my fork: https://wffranco.github.io/vue-strap