Update for Vue2
I want to show some ways to work with data, and not use filters, since they are deprecated in Vue2:
inside computed property
Using computed properties instead of filters, which is much better because you can use this data throughout the component, not just the template: jsFiddle
computed: { reverseItems() { return this.items.slice().reverse(); } }
inside the Vuex getter property
If you use Vuex and save your data in the store.state object. The best way to do some transformations with data stored in state is to do it in a getters object (for example, filter through a list of elements and count them, reverse order, etc.)
getters: { reverseItems: state => { return state.items.slice().reverse(); } }
and get the state from the getters in the computed component:
computed: { showDialogCancelMatch() { return this.$store.state.reverseItems; } }
t_dom93
source share