Created
May 5, 2019 01:19
-
-
Save gdbate/6f80c5c6ff06133e8bd22e6a76c51a34 to your computer and use it in GitHub Desktop.
Structuring Vuex Modules - Maintaining Record Order - Listing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| computed: { | |
| ordered(){ | |
| return Object.values(this.$store.state.albums.all).sort((a, b) => {return a.order - b.order}) | |
| }, | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment