Skip to content

Commit c172ac0

Browse files
authored
Merge pull request #395 from jxxghp/cursor/add-default-all-filter-for-subscription-styles-ad8f
2 parents 188f8b3 + 01a6649 commit c172ac0

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/views/subscribe/SubscribePopularView.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const currData = ref<MediaInfo[]>([])
3636
3737
// 筛选参数
3838
const filterParams = reactive({
39-
genre_id: '',
39+
genre_id: '', // 空字符串表示选中"全部"
4040
min_rating: 0,
4141
max_rating: 10,
4242
min_sub: 1,
@@ -225,6 +225,14 @@ async function fetchData({ done }: { done: any }) {
225225
<VLabel>{{ t('tmdb.genre') }}</VLabel>
226226
</div>
227227
<VChipGroup v-model="filterParams.genre_id">
228+
<VChip
229+
:color="filterParams.genre_id == '' ? 'primary' : ''"
230+
filter
231+
tile
232+
value=""
233+
>
234+
{{ t('common.all') }}
235+
</VChip>
228236
<VChip
229237
:color="filterParams.genre_id == key ? 'primary' : ''"
230238
filter

src/views/subscribe/SubscribeShareView.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const keyword = ref(props.keyword)
3030
3131
// 筛选参数
3232
const filterParams = reactive({
33-
genre_id: '',
33+
genre_id: '', // 空字符串表示选中"全部"
3434
min_rating: 0,
3535
max_rating: 10,
3636
sort_type: 'time', // 默认按时间排序
@@ -244,6 +244,14 @@ function removeData(id: number) {
244244
<VLabel>{{ t('tmdb.genre') }}</VLabel>
245245
</div>
246246
<VChipGroup v-model="filterParams.genre_id">
247+
<VChip
248+
:color="filterParams.genre_id == '' ? 'primary' : ''"
249+
filter
250+
tile
251+
value=""
252+
>
253+
{{ t('common.all') }}
254+
</VChip>
247255
<VChip
248256
:color="filterParams.genre_id == key ? 'primary' : ''"
249257
filter

0 commit comments

Comments
 (0)