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

vue 2 support? #11

Open tobros91 opened 8 years ago

tobros91 commented 8 years ago

Is this working with vue 2? I get error when trying to include it to my project.

module not found: Error: Can't resolve 'vue-select' in

baberuth22 commented 7 years ago

Change vue-select to vue-select2 in your require statement. But it still doesn't support vue 2

racielbd commented 4 years ago

not working in vue2 this is my code...

<template>
  <div>
    <div class="form-group">
        <label for="select2" class="col-sm-3 control-label">   
            A searchable select with names and localized in en-US:
         </label>
         <div class="col-sm-5">
               <vue-select
                  class="vue-select2"
                  name="select2"
                  :options="options2"
                  :model.sync="result2"
                  :searchable="true"
                  language="en-US"
                >
                </vue-select>
           </div>
           <div class="col-sm-4">
                <p class="form-control-static">
                       Selected Result: <span class="vue-result2">{{ result2 }}</span>
                </p>
           </div>
     </div>
  </div>
</template>
<script>
export default {
   components: {
    "vue-select": require("vue-select2")
   },
   data() {
        return {
           serverErrors: {},
           result2: '',
           options2: [
                 {
                    text: 'name1',
                    value: 'value1',
                  },
                  {
                     text: 'name2',
                     value: 'value2',
                   },
             ],
         }
     }
}
</script>

bud got this..

[Vue warn]: Failed to mount component: template or render function not defined.
found in
---> <VueSelect>

imagen

sugarman9907 commented 3 years ago

Try this. https://www.npmjs.com/package/v-select2-component