Discussion icon indicating copy to clipboard operation
Discussion copied to clipboard

@click not accepting prop

Open K33k0 opened this issue 8 years ago • 0 comments

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);
            }
	}
})

K33k0 avatar Jun 29 '17 09:06 K33k0