fix: isPreview 2 isFilePreview & getFileNameFormat

This commit is contained in:
puri-ph4tt 2023-11-29 11:16:50 +07:00 committed by Methapon2001
parent 3e570b71aa
commit bc0212b0f1
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
7 changed files with 40 additions and 43 deletions

View file

@ -7,8 +7,8 @@ import { useFileInfoStore } from '@/stores/file-info-data'
import FileIcon from '@/components/FileIcon.vue'
const { isPreview, fileInfo } = storeToRefs(useFileInfoStore())
const { getType, getFormatDate, getSize } = useFileInfoStore()
const { isFilePreview, fileInfo } = storeToRefs(useFileInfoStore())
const { getType, getFormatDate, getSize, getFileNameFormat } = useFileInfoStore()
async function downloadSubmit(path: any) {
const [cabinet, drawer, folder, file] = path.split('/')
@ -47,7 +47,7 @@ async function downloadSubmit(path: any) {
flat
dense
class="q-mr-sm q-px-sm"
@click="() => (isPreview = false)"
@click="() => (isFilePreview = false)"
>
<q-icon
class="pointer"
@ -56,7 +56,7 @@ async function downloadSubmit(path: any) {
color="primary"
/>
</q-btn>
{{ fileInfo?.title }}</span
{{ getFileNameFormat(fileInfo?.fileName) }}</span
>
</div>
<div class="row">
@ -70,7 +70,7 @@ async function downloadSubmit(path: any) {
:fileMimeType="fileInfo?.fileType"
/>
<span class="text-center q-pt-md text-h6">{{
fileInfo?.title
getFileNameFormat(fileInfo?.fileName)
}}</span>
</q-card-section>
</q-card>