From eca40d10c27e6cdc3dc34f8562cdedbf796953c3 Mon Sep 17 00:00:00 2001 From: clkim Date: Fri, 6 Mar 2026 15:06:01 +0900 Subject: [PATCH] =?UTF-8?q?fix.=20loading,=20preload=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layers/components/atoms/Img.vue | 24 ++++++++++++++++++++---- layers/components/atoms/Video.vue | 12 ++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/layers/components/atoms/Img.vue b/layers/components/atoms/Img.vue index da421f5..00cb55a 100644 --- a/layers/components/atoms/Img.vue +++ b/layers/components/atoms/Img.vue @@ -3,7 +3,15 @@ interface Props { src: string | { pc?: string; mo?: string } alt?: string imageType?: 'public' | 'cdn' + /** + * 브라우저 네이티브 priority 값 + * - 'high' : fold 내 반드시 보여야 하는 이미지 + * - 'low' : 중요도 낮은 이미지 + * - 'auto' : 기본값, 브라우저에 위임 + */ priority?: 'high' | 'low' | 'auto' + /** 실제 이미지 로드 전까지 표시할 placeholder 이미지 경로 */ + placeholder?: string } const props = withDefaults(defineProps(), { @@ -37,14 +45,22 @@ const imagePaths = computed(() => { : '', } }) + +const placeholderSrc = computed(() => props.placeholder ?? '')