Answers for "vue.create component"

-1

component in vue

// Define a new component called button-counter
Vue.component('button-counter', {
  data: function () {
    return {
      count: 0
    }
  },
  template: '<button v-on:click="count++">You clicked me {{ count }} times.</button>'
})
Posted by: Guest on May-25-2021

Browse Popular Code Answers by Language