From f58ceeb14cb23c760d5b0c5f2bd84263e0cb2bc9 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Tue, 15 Feb 2022 23:00:22 +0700 Subject: [PATCH] fix #459 --- .../views/components/listitem-horizontal.ejs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/renderer/views/components/listitem-horizontal.ejs b/src/renderer/views/components/listitem-horizontal.ejs index a159f362..a8df81f4 100644 --- a/src/renderer/views/components/listitem-horizontal.ejs +++ b/src/renderer/views/components/listitem-horizontal.ejs @@ -41,6 +41,21 @@ catch (e){} }, + watch: { + items: function (items) { + // give every item an id + this.items.forEach(function (item, index) { + item.id = index; + }); + // split items into pages + this.itemPages = app.arrayToChunk(this.items, 4); + try{ + this.simplifiedParent = JSON.stringify(this.items.map ( function(x){return x.attributes.playParams})); + console.log("simplifiedParent: " + this.simplifiedParent); + } + catch (e){} + } + }, methods: { sayHello: function () { alert('Hello world!');