diff --git a/src/config/home.ts b/src/config/home.ts index 1ddb665..5ef6e55 100644 --- a/src/config/home.ts +++ b/src/config/home.ts @@ -30,6 +30,10 @@ export const viewOptions = [ label: '平铺', value: 'masonry', }, + { + label: '竖版', + value: 'verticalVersion', + }, { label: '3:4', value: '3:4', diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index 9b6ba34..e420cca 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -166,6 +166,8 @@ const gridHeight = computed(() => { height ='' }else if(viewMode.value ==='horizontalVersion'){ height ='145px' + }else if(viewMode.value ==='verticalVersion'){ + height ='320px' }else if(viewMode.value ==='3:4'){ height ='240px' } @@ -307,7 +309,7 @@ function sortHandler() { > -->
@@ -401,8 +403,9 @@ function sortHandler() { width: 100%; overflow: hidden; ::v-deep(img) { - height: 100%; width: 100%; + height: 100%; + object-fit: cover; } }