vue-orderBy mixin
Sort a array object with a custom field
Install
$ npm install vue-orderby-mixin
Usage
this Array object A custom field for sorting ASC or DESC
Example
{ return users: id: 1 name: 'John' id: 2 name: 'Jane' } mixins: orderBy methods: { this }
Result
id | name |
---|---|
2 | Jane |
1 | John |