0π
To hide your button, use the v-if
directive.
<button v-if="dataFilter && dataFilter.length < dataEvents.length" @click="limit*=2">Show More</button>
This will only show the button if there are events, and the filtered events are less than the total.
You can also use the v-show
directive.
- [Vuejs]-Calling an Async Function from Mounted Hook in Vuejs
- [Vuejs]-Use sinon spy on Vue on a function on a component
Source:stackexchange.com