Answer the question
In order to leave comments, you need to log in
Why are Vue component events not working in conjunction with Laravel?
Hello I
started learning Vue in conjunction with Laravel and came across the inability to make an elementary click on a button in a component.
The simplest button click component does not work at all, nothing errors
<template>
<div class="container">
<button id="colorButton" @click="start">Выбор по цвету</button>
</div>
</template>
<script>
export default {
name: "ColorButton",
methods: {
start() {
alert('');
},
},
mounted() {
},
}
</script>
<style scoped>
</style>
Vue.component('color-button', require('./components/ColorButton.vue').default);
const app = new Vue({
el: '#app',
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question