how to run method in method vue js on load
<template>
<div>
<!-- Your Vue component template goes here -->
</div>
</template>
<script>
export default {
methods: {
// Your method definition goes here
myMethod() {
// Your method logic goes here
}
},
mounted() {
// Call the method on component mount
this.myMethod();
}
}
</script>