refactor: clean code and handle

This commit is contained in:
puri-ph4tt 2023-11-28 09:22:44 +07:00 committed by Methapon2001
parent aa63e9c8c5
commit e682485bce
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
3 changed files with 40 additions and 28 deletions

View file

@ -1,5 +1,4 @@
<script setup lang="ts">
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import { useFileInfoStore } from '@/stores/file-info-data'
@ -89,8 +88,13 @@ const { getType, getFormatDate, getSize } = useFileInfoStore()
<div class="col-2">
<span>กล/หมวดหม</span>
</div>
<div class="col-grow" v-for="category in fileInfo?.category" :key="category">
<span class="text-grey">{{ category }}</span>
<div class="col-grow">
<span
class="text-grey"
v-for="category in fileInfo?.category"
:key="category"
>{{ category }}</span
>
</div>
</div>
<q-separator />
@ -98,8 +102,13 @@ const { getType, getFormatDate, getSize } = useFileInfoStore()
<div class="col-2">
<span>คำสำค</span>
</div>
<div class="col-grow" v-for="keyword in fileInfo?.keyword" :key="keyword">
<span class="text-grey">{{ keyword }}</span>
<div class="col-grow">
<span
class="text-grey"
v-for="keyword in fileInfo?.keyword"
:key="keyword"
>{{ keyword }}</span
>
</div>
</div>
<q-separator />
@ -126,7 +135,9 @@ const { getType, getFormatDate, getSize } = useFileInfoStore()
<span>นทปโหลด</span>
</div>
<div class="col-grow">
<span class="text-grey">{{ getFormatDate(fileInfo?.createdAt) }}</span>
<span class="text-grey">{{
getFormatDate(fileInfo?.createdAt)
}}</span>
</div>
</div>
</div>