0👍
You must use an Arrow Function to get local scope. Try this:
<template>
<div id="app">
<div>
<button @click="test">TEST</button>
</div>
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
methods: {
test() {
this.$toast.show('Welcome!', 'Hey', {
position: 'topCenter',
buttons: [
[
'<button>Change Router</button>',
(instance, toast) => {
this.$router.push({ name: 'About' });
},
true,
],
],
});
},
},
};
</script>
- [Vuejs]-Vue Fullcalender: Be able to have different prices on each day grid based on their day
- [Vuejs]-How to properly configure my backend in order to receive data from my form? I'm using Vue.js
Source:stackexchange.com