change: loading performance
This commit is contained in:
parent
7c8be0ccb9
commit
716b5535ae
14 changed files with 129 additions and 98 deletions
|
@ -4,10 +4,10 @@
|
|||
:class="allowNavigation ? '' : 'pointer-events-none'"
|
||||
:to="`${urlOverwrite ?? $route.path}/${data?.slug}`"
|
||||
>
|
||||
<div class="w-full h-56 relative">
|
||||
<div class="w-full h-56 min-h-56 relative">
|
||||
<NuxtPicture
|
||||
loading="lazy"
|
||||
class="w-full h-full object-cover object-center"
|
||||
class="w-full h-full min-h-full object-cover object-center"
|
||||
:src="data?.image?.url || logo?.url ? baseUrl + (data?.image?.url ?? logo?.url) : '/favicon.png'"
|
||||
:imgAttrs="{ class: 'w-full h-full object-cover object-center' }"
|
||||
/>
|
||||
|
@ -20,11 +20,11 @@
|
|||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="w-full h-44 relative bg-white px-2 py-5 flex flex-col justify-start items-start gap-2 overflow-y-auto">
|
||||
<div class="w-full grow relative bg-white p-2 pb-4 flex flex-col justify-start items-start gap-2 overflow-y-auto">
|
||||
<h1>
|
||||
{{ data?.title }}
|
||||
</h1>
|
||||
<p v-if="itemDate && lookup?.show_date" class="w-full text-[#5c5c5c]">
|
||||
<p class="w-full text-[#5c5c5c] line-clamp-2 overflow-hidden">
|
||||
{{ itemDate }}
|
||||
</p>
|
||||
<p class="w-full text-[#5c5c5c] line-clamp-2 overflow-hidden">
|
||||
|
@ -42,7 +42,7 @@ import type Lookup from "../../types/collection/lookup";
|
|||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
|
||||
const { logo } = await provideGlobal();
|
||||
const { logo } = useGlobal();
|
||||
|
||||
const props = defineProps({
|
||||
data: Object as PropType<BaseCollection>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue