본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

빈 상태

원문 보기 위키 갱신

빈 상태 (Empty)

목록이나 데이터가 비어 있을 때 화면을 채워 주는 안내 컴포넌트예요. 이미지 종류를 바꾸거나 커스텀 이미지, 하단 콘텐츠를 넣을 수 있어요.

출처: 문서

설치 (Install)

import { createApp } from 'vue'
import { Empty } from '@nutui/nutui'

const app = createApp()
app.use(Empty)

사용 예제 (Usage)

기본 사용법 (Basic Usage)

demo: empty basic

이미지 종류 (Image Type)

demo: empty type

이미지 커스텀 (Custom Image)

demo: empty custom

하단 콘텐츠 (Bottom Content)

demo: empty bottom

Empty

Props

Attribute Description Type Default
image Image type, can be set to empty, error, network or image URL string empty
image-size Image size number | string -
description Description string -

Slots

Name Description
default Custom bottom content
image Custom image
description Custom description

Types v4.3.4

이 컴포넌트는 다음 타입 정의를 함께 내보내요:

import type {
  EmptyImage,
  EmptyProps,
  EmptyInstance
} from '@nutui/nutui'

테마 (Theming)

CSS 변수 (CSS Variables)

컴포넌트는 스타일을 커스터마이징할 때 쓸 수 있는 CSS 변수를 제공해요. 자세한 사용법은 ConfigProvider 컴포넌트 문서를 참고하세요.

Name Default Value
--nut-empty-padding 32px 0
--nut-empty-image-size 170px
--nut-empty-description-margin-top 4px
--nut-empty-description-color #666666
--nut-empty-description-font-size 14px
--nut-empty-description-line-height 20px
--nut-empty-description-padding 0 40px

더 알아보기 (Learn more)

이 글은 NutUI 공식 문서의 영문 원문을 한국어로 번역한 내용이에요. 최신 내용과 전체 문서는 아래 링크에서 확인할 수 있어요: