[Vuejs]-How to solve problem with vuejs not detected

2👍

Just used this code:

new Vue({
  el: "#j",
  data: {
    name: "welcome to vue",
  },
})

Don’t use ele , just use el

0👍

you can set an event listener:

document.addEventListener('DOMContentLoaded', function () {
  new Vue({
    el: '#j',
    // define data - initial display text
    data: {
      name: "welcome to vue",
    }
  })
})

Leave a comment