0👍
new Vue
is the syntax for Vue version 2.x, For Vue 3 you need to do this:
Vue.createApp({
el: '#vendorTable',
...
})
0👍
Change your code with new vue3 sytax
const vendorTable = {
data() {
return {
rows: [
{
vcode: "VC001",
vname: "ABC Pvt Ltd",
},
{
vcode: "VC002",
vname: "XYZ Pvt Ltd",
},
],
}
}
}
Vue.createApp(vendorTable).mount('#vendorTable')
and
<tr v-for="row in rows" :key="row.vendorTable">
"row.vendorTable" wrong use change it with this "row.vcode"
- [Vuejs]-A problem in serve in vue with Traversy Media vue course
- [Vuejs]-Validate form using Vuelidate on page load
Source:stackexchange.com