0👍
Try this:
test () {
setTimeout(() => {
alert('test btn');
}, 2000);
this.loader = !this.loader;
},
Make sure to remove the v-bind
on loader
, so just loader="false"
instead of :loader="false"
. Vue will treat true
as primitives without v-bind, otherwise as variables or methods
Source:stackexchange.com