Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
How to make dropdown list with Vue 3?

I was searching whole internet but that didn't help me to resolve issue. With this code below I'm encountering 'Uncaught ReferenceError: VueSelect is not defined' What's wrong with the code?

        var productForm = Vue.createApp ({
            data: function() {
                return {
                    product: {
                        sku: 0,
                        name: 'asdf',
                        price: 0
                    }
                }
            }
        })
        
        productForm.component('custom-form', {
            props: ['value', 'options'],
            template: `
                <label>SKU<input type="text" :value=this.sku></label>
                <label>Name<input type="text" :value=this.name></label>
                <label>Price<input type="text" :value=this.price></label>
                <vue-select :options="options" label="option"
                  ></vue-select>
            ` ,
            
            data: function() {
                return {
                    sku: 0,
                    name: 'asdf',
                    price: 0,
                    options: [
                        { option: "Size" },
                        { option: "Weight" },
                        { option: "Dimensions" }
                    ]
                }
            }
        })
        
        const vm = productForm.mount('#product_form')
        vm.component('vue-select', VueSelect )
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Anyway, I managed successfully to do following without VueSelect:

var productForm = Vue.createApp ({})

        productForm.component('custom-form', {
                template: `
                <label>SKU<input type="text" v-model="this.product.sku"></label>
                <label>Name<input type="text" v-model="this.product.name"></label>
                <label>Price<input type="text" v-model="this.product.price"></label>
                <label>Attributes<select v-model="selected">
                    <option 
                        v-for="item in options" 
                        >{{item}}
                    </option>
                </select></label>
                ` ,
            
            data: function() {
                return {
                    product: {
                        sku: 0,
                        name: 'asdf',
                        price: 0
                    },
                    options: ['Size', 'Weight', 'Dimensions'],
                    selected: 'Size'
                }
            }
        })
       
        productForm.mount('#product_form')
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!