fix: isPreview 2 isFilePreview & getFileNameFormat
This commit is contained in:
parent
3e570b71aa
commit
bc0212b0f1
7 changed files with 40 additions and 43 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue