Feature: optimize filename display in gallery page

This commit is contained in:
萌萌哒赫萝
2023-09-16 01:30:44 -07:00
parent f55b0a85a4
commit 0abfeff2b7
2 changed files with 10 additions and 5 deletions

View File

@@ -34,16 +34,16 @@
"lint:dpdm": "dpdm -T --tsconfig ./tsconfig.json --no-tree --no-warning --exit-code circular:1 src/background.ts"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.413.0",
"@aws-sdk/lib-storage": "^3.413.0",
"@aws-sdk/s3-request-presigner": "^3.413.0",
"@aws-sdk/client-s3": "^3.414.0",
"@aws-sdk/lib-storage": "^3.414.0",
"@aws-sdk/s3-request-presigner": "^3.414.0",
"@element-plus/icons-vue": "^2.1.0",
"@highlightjs/vue-plugin": "^2.1.0",
"@nodelib/fs.walk": "^2.0.0",
"@octokit/rest": "^19.0.7",
"@picgo/i18n": "^1.0.0",
"@picgo/store": "^2.1.0",
"@smithy/node-http-handler": "^2.1.3",
"@smithy/node-http-handler": "^2.1.4",
"@types/mime-types": "^2.1.1",
"@videojs-player/vue": "^1.0.0",
"ali-oss": "^6.18.1",

View File

@@ -262,7 +262,7 @@
class="gallery-list__file-name"
:title="item.fileName"
>
{{ item.fileName }}
{{ formatFileName(item.fileName || '') }}
</div>
<el-row
class="gallery-list__tool-panel"
@@ -477,6 +477,7 @@ import ALLApi from '@/apis/allApi'
// 工具函数
import { customRenameFormatTable, customStrMatch, customStrReplace } from '../manage/utils/common'
import { picBedsCanbeDeleted } from '#/utils/static'
import path from 'path'
const images = ref<ImgInfo[]>([])
const dialogVisible = ref(false)
@@ -578,6 +579,10 @@ const isAllSelected = computed(() => {
}
})
function formatFileName (name: string) {
return path.basename(name)
}
function getPicBeds (event: IpcRendererEvent, picBeds: IPicBedType[]) {
picBed.value = picBeds
}