Open K33k0 opened 7 years ago
Can someone shed some light on how to get the @click to accept a prop. I've been googling for about an hour without any success
Vue.component('submit', { props: ['id', 'text'], template: '<button :id="id" @click="id" >{{ text }}</button>', methods: { login: function(e){ e.preventDefault() e.stopPropagation() let data = { username: document.getElementById('username').value, password: document.getElementById('password').value, engineer: document.getElementById('engineer').value }; console.log(data); } } })
Can someone shed some light on how to get the @click to accept a prop. I've been googling for about an hour without any success