[Vuejs]-Couldn't fetch the dummy js data to my table in vue js

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"

Leave a comment