0

Haixing-Hu/vue-select in version vue-select2 not working in vue2 and need some help... I do everything like the doc but nothing happends this is my template 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>

this is my script code...

<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... The select2 do not show and got a uggly warning...

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

Imagen Result View

  • Does this answer your question? [Vue template or render function not defined yet I am using neither?](https://stackoverflow.com/questions/41983767/vue-template-or-render-function-not-defined-yet-i-am-using-neither) – reddiky Jun 29 '20 at 22:09
  • It could be..., but I'm not shure... I just know I'm following the instructions of https://www.npmjs.com/package/vue-select2 That's the plugin that I'm trying to use but do not work. In case of need i will update my post to include my package.jso. Thanks for all – Raciel Brito Dorta Jul 01 '20 at 14:40

0 Answers0