update: tooltip

This commit is contained in:
Methapon2001 2024-01-11 10:59:13 +07:00
parent 128eb2db56
commit 7ef9384717
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
2 changed files with 49 additions and 26 deletions

View file

@ -29,6 +29,9 @@ const { getFileInfo, getSize, getType } = useFileInfoStore()
const storageStore = useStorage()
const { deleteFile } = storageStore
const fileInfoStore = useFileInfoStore()
const { getFormatDate } = fileInfoStore
const fileFormComponent = ref<InstanceType<typeof FileFormWrapper>>()
const keywordList = ref<string[]>([])
@ -303,12 +306,29 @@ onMounted(() => {
<q-td class="justify-center">
<div>
<q-icon class="q-ma-sm" name="o_info" size="2em" color="primary" />
<q-tooltip
anchor="center left"
self="center right"
:offset="[5, 1]"
>
{{ getSize(actionData.row.fileSize) }}
<q-tooltip anchor="center left" self="center right">
<div class="flex" style="flex-direction: column; font-size: 120%">
<span>อไฟล: {{ actionData.row.fileName }}</span>
<span>
อเรอง:
{{ actionData.row.metadata.subject ?? actionData.row.title }}
</span>
<span>
เจาของผลงาน:
{{ actionData.row.metadata.author ?? actionData.row.author }}
</span>
<span>ขนาด: {{ getSize(actionData.row.fileSize) }}</span>
<span>
ประเภทของไฟล:
{{
getType(actionData.row.fileType, actionData.row.fileName)
}}
</span>
<span>
นทปโหลด:
{{ getFormatDate(actionData.row.createdAt) }}
</span>
</div>
</q-tooltip>
</div>
<div v-if="props.action">

View file

@ -342,26 +342,29 @@ const onRowClick = ((_, row) => {
size="2em"
color="primary"
/>
<q-tooltip
anchor="center left"
self="center right"
:offset="[5, 1]"
>
<div class="flex" style="flex-direction: column">
<span> อไฟล {{ data.row.fileName }}</span>
<span
>อเรอง
{{ data.row.metadata.subject ?? data.row.subject }}</span
>
<span
>เจาของผลงาน
{{ data.row.metadata.author ?? data.row.author }}</span
>
<span>ขนาดไฟล {{ getSize(data.row.fileSize) }}</span>
<span
>ประเภทไฟล
{{ getType(data.row.fileType, data.row.fileName) }}</span
>
<q-tooltip anchor="center left" self="center right">
<div
class="flex"
style="flex-direction: column; font-size: 120%"
>
<span>อไฟล: {{ data.row.fileName }}</span>
<span>
อเรอง:
{{ data.row.metadata.subject ?? data.row.title }}
</span>
<span>
เจาของผลงาน:
{{ data.row.metadata.author ?? data.row.author }}
</span>
<span>ขนาด: {{ getSize(data.row.fileSize) }}</span>
<span>
ประเภทของไฟล:
{{ getType(data.row.fileType, data.row.fileName) }}
</span>
<span>
นทปโหลด:
{{ getFormatDate(data.row.createdAt) }}
</span>
</div>
</q-tooltip>
</div>