watch: {
'$route'(){
this.startComponent()
}
}
<input v-model="login">
<input v-model="password">
<button @click="regUser()">Зарегестрироваться</button>
<script>
...
methods:{
regUser(){
if (this.login == this.password) {
alert('логин не должен быть равен паролю');
return;
}
// ... остальной код для регистрации
}
}
...
</script>
let data = new FormData();
data.append('file', thi.image);
axios.post('/file', data)
.then(function(res) {
console.log(res);
});
<logo @handleAction="moveTo"></logo>
trigger: function () {
this.$emit('handleAction')
}
trigger: function () {
this.$emit('handleAction', someParam)
}