[+] Encapsulate get selectedArtworks()
This commit is contained in:
@@ -110,6 +110,14 @@ export default class App extends Vue
|
|||||||
this.artworks.sort((a, b) => b.date.getTime() - a.date.getTime());
|
this.artworks.sort((a, b) => b.date.getTime() - a.date.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter out artworks of selected type
|
||||||
|
*/
|
||||||
|
get selectedArtworks()
|
||||||
|
{
|
||||||
|
return this.artworks.filter(a => a.type.type == this.selectedType);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update on resize
|
* Update on resize
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user