2👍
✅
Use the structure shown in the docs:
export default {
name: 'MyComponent',
methods: {
myMethod: function () {
console.log("asd123")
}
},
created: function() {
this.myMethod();
}
}
Source:stackexchange.com