Skip to content

Tag 태그 ​

기본 사용법 ​

vue
<template>
  <lh-tag>기본</lh-tag>
  <lh-tag type="primary">주요</lh-tag>
  <lh-tag type="success">성공</lh-tag>
  <lh-tag type="warning">경고</lh-tag>
  <lh-tag type="danger">위험</lh-tag>
</template>

스타일과 닫기 ​

vue
<template>
  <lh-tag round>둥근 모서리</lh-tag>
  <lh-tag hit>테두리</lh-tag>
  <lh-tag closable @close="onClose">닫기 가능</lh-tag>
</template>

<script setup lang="ts">
const onClose = () => console.log('닫았습니다')
</script>

Props ​

속성설명타입기본값
type유형'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info''default'
size크기'small' | 'medium' | 'large'—
closable닫기 가능booleanfalse
disabled비활성화booleanfalse
round둥근 모서리booleanfalse
hit테두리(채움 없음)booleanfalse
customClass커스텀 클래스명string—
sx빠른 레이아웃 속성LhSxProps—

Events ​

이벤트설명콜백 매개변수
close닫기 버튼 클릭—

Vue3 버전과의 차이

닫기 버튼의 인라인 SVG가 본 라이브러리에서는 lh-icon으로 교체되었습니다(iconfont 방식).