I\'m making a shopping cart system with Laravel and Vue. When I add an item to the basket, I display a confirmation message by toggling a Vue variable being watched by a v-if:>
vuejs 2
first add this to methods
methods:{ sayHi: function () { var v = this; setTimeout(function () { v.message = "Hi Vue!"; }, 3000); }
after that call this method on mounted
mounted () { this.sayHi() }