diff --git a/src/config/home.ts b/src/config/home.ts index b769d9c..1ddb665 100644 --- a/src/config/home.ts +++ b/src/config/home.ts @@ -23,11 +23,15 @@ export const timeOptions = [ export const viewOptions = [ { - label: '平铺', - value: 'tile', + label: '横版', + value: 'horizontalVersion', }, { - label: '竖版', + label: '平铺', value: 'masonry', }, + { + label: '3:4', + value: '3:4', + }, ] diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index a6acb86..eaf308e 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -161,7 +161,15 @@ async function loadMore() { } const gridHeight = computed(() => { - return viewMode.value !== 'masonry' ? '145px' : '' + let height = "" + if(viewMode.value ==='masonry'){ + height ='' + }else if(viewMode.value ==='horizontalVersion'){ + height ='145px' + }else if(viewMode.value ==='3:4'){ + height ='240px' + } + return height }) async function oneCheck() { @@ -299,7 +307,7 @@ function sortHandler() { > -->
@@ -389,6 +397,14 @@ function sortHandler() { width: 100%; overflow: hidden; } + .img-full { + width: 100%; + overflow: hidden; + ::v-deep(img) { + height: 100%; + width: 100%; + } + } .info { display: flex;