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/aside/comp/Upload.vue b/src/views/home/aside/comp/Upload.vue index 7c4970f..f723701 100644 --- a/src/views/home/aside/comp/Upload.vue +++ b/src/views/home/aside/comp/Upload.vue @@ -1,12 +1,11 @@ - + @@ -72,7 +102,8 @@ const imageGroupThemeOverrides = computed(() => { 上传格式为:.png .jpg .bmp 20M以内 - + @@ -133,7 +164,7 @@ const imageGroupThemeOverrides = computed(() => { justify-content: center; width: 100%; height: 100%; - background-color:rgba(102, 102, 102, 0.2) + background-color: rgba(102, 102, 102, 0.2) } &-line { 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; } }