From a17ca909a9052aaa13c6991479262c337c8ee2fe Mon Sep 17 00:00:00 2001 From: zhh Date: Mon, 25 Sep 2023 02:16:58 +0800 Subject: [PATCH 1/2] add VirtualList for EpisodesPicker --- .../video/download/inputs/EpisodesPicker.vue | 65 +++++--- .../video/download/inputs/VirtualList.vue | 152 ++++++++++++++++++ .../video/download/inputs/bangumi/batch.ts | 2 +- 3 files changed, 197 insertions(+), 22 deletions(-) create mode 100644 registry/lib/components/video/download/inputs/VirtualList.vue diff --git a/registry/lib/components/video/download/inputs/EpisodesPicker.vue b/registry/lib/components/video/download/inputs/EpisodesPicker.vue index a2b62308f..e6fbc4e8a 100644 --- a/registry/lib/components/video/download/inputs/EpisodesPicker.vue +++ b/registry/lib/components/video/download/inputs/EpisodesPicker.vue @@ -32,36 +32,46 @@ -
-
- - - {{ item.title }} - - - {{ item.durationText }} - - -
-
+ + + + + + + diff --git a/registry/lib/components/video/download/inputs/bangumi/batch.ts b/registry/lib/components/video/download/inputs/bangumi/batch.ts index e1284c96f..7337535a5 100644 --- a/registry/lib/components/video/download/inputs/bangumi/batch.ts +++ b/registry/lib/components/video/download/inputs/bangumi/batch.ts @@ -45,7 +45,7 @@ export const bangumiBatchInput: DownloadVideoInput = { return { key: it.cid, title: `${nText} - ${title}`, - isChecked: index < instance.maxCheckedItems, + isChecked: index < instance.maxCheckedItems && totalLength <= instance.maxCheckedItems, inputItem: { aid: it.aid, cid: it.cid, From e1454b673c2d0f73e1f05a44be94fded75c49a9c Mon Sep 17 00:00:00 2001 From: zhh Date: Mon, 25 Sep 2023 02:30:09 +0800 Subject: [PATCH 2/2] lint-fix --- .../video/download/inputs/EpisodesPicker.vue | 14 +-- .../video/download/inputs/VirtualList.vue | 92 ++++++++++--------- 2 files changed, 56 insertions(+), 50 deletions(-) diff --git a/registry/lib/components/video/download/inputs/EpisodesPicker.vue b/registry/lib/components/video/download/inputs/EpisodesPicker.vue index e6fbc4e8a..c89b69906 100644 --- a/registry/lib/components/video/download/inputs/EpisodesPicker.vue +++ b/registry/lib/components/video/download/inputs/EpisodesPicker.vue @@ -32,13 +32,15 @@ - + :focuse-item-index="currentEpisodeIndex" + >