Haixing-Hu / vue-select

A Vue.js component implementing the select control with the jQuery select2 plugin.
http://haixing-hu.github.io/vue-select/
MIT License
133 stars 30 forks source link

Ignored on component because is a fragment instance #7

Open daverdalas opened 8 years ago

daverdalas commented 8 years ago

I try to use your package but I go this error:

[Vue warn]: Attribute "options" is ignored on component <vue-select> because the component is a fragment instance.

My code:

<template>
    <div class="comments__container">
        <div class="row">
            <div class="col-sm-6">
                <h3 class="comments__filters__title">
                    {{title}}
                </h3>
            </div>
            <div class="col-sm-6 comments__filters">
                <div class="row">
                    <div class="col-sm-6">
                        <vue-select options="opt">
                        </vue-select>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script type="text/babel" lang="babel">
    import VueSelect from 'vue-select2';
    export default{
        components: {VueSelect},
        data(){
            return {
                opt: ['foo','bar','baz', 'yep']
            }
        },
    }
</script>

Any idea what I'm doing wrong? Or is it a problem with the package?

oknoorap commented 8 years ago

same here..

Jamiek94 commented 8 years ago

I had the same issue, what i did is remove everything above the line: var DEFAULT_LANGUAGE = "en-US";

in the file dist/vue-select.js, make sure the package.json uses the vue-select.js instead of vue-select.min.js.

Haixing-Hu commented 8 years ago

Hi, all.

I checked the issue, and wrote a demo page for testing. See demo/issue7.html and demo/issue7.js. But it seems everything works well.

Could you please provide a complete test case for reproducing the bug?

Namek commented 8 years ago

Same issue. Modified main field in package.json from dist/vue-select.min.js to src/vue-select.js and error disappeared. @Haixing-Hu what probably you do wrong is testing locally only. Try creating a new Vue project, then npm install --save vue-select2 and import it to see the error.

fraincs commented 8 years ago

I am having the same issue

n37r06u3 commented 8 years ago

用不了 直接在项目里用就报这种错误