From 4dba586e0963c3f7ef24acfa9a456f96fcba4e2a Mon Sep 17 00:00:00 2001 From: Mykyta Poturai Date: Tue, 25 Aug 2020 21:13:25 +0300 Subject: [PATCH] Fix lazy wrapper's height in list mode --- src/renderer/components/ft-element-list/ft-element-list.vue | 1 + .../ft-list-lazy-wrapper/ft-list-lazy-wrapper.css | 6 +++++- .../components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js | 4 ++++ .../ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue | 5 ++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ft-element-list/ft-element-list.vue b/src/renderer/components/ft-element-list/ft-element-list.vue index c615b3e7..b4b000ec 100644 --- a/src/renderer/components/ft-element-list/ft-element-list.vue +++ b/src/renderer/components/ft-element-list/ft-element-list.vue @@ -8,6 +8,7 @@ appearance="result" :data="result" :first-screen="index < 16" + :layout="listType" /> diff --git a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.css b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.css index d58d0725..95b1c7c7 100644 --- a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.css +++ b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.css @@ -1,3 +1,7 @@ -.lazyWrapper { +.grid { min-height: 264px; } + +.list { + min-height: 131px; +} diff --git a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js index 67c1fdb1..5ff6c2f7 100644 --- a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js +++ b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.js @@ -22,6 +22,10 @@ export default Vue.extend({ firstScreen: { type: Boolean, required: true + }, + layout: { + type: String, + default: 'grid' } }, data: function () { diff --git a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue index 40fc33d2..e49915e2 100644 --- a/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue +++ b/src/renderer/components/ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue @@ -4,7 +4,10 @@ callback: onVisibilityChanged, once: true, }" - class="lazyWrapper" + :class="{ + grid: layout === 'grid', + list: layout === 'list' + }" >