Skip to content

Chip 標籤

Chip 標籤用於顯示實體資訊,支持圖示、標籤文字和圖片。

基本用法

基本的 Chip 標籤,可以設定標籤文字和移除功能。

動作
喜劇
懸疑
驚悚

圖示 Chip

可以在標籤文字旁邊顯示圖示。

Apple
Brand Facebook
Brand Google
Brand Windows
Brand GitHub

圖片 Chip

使用 image 屬性顯示頭像等圖片。

Amy Elsner
Asiya Javayant
Onyama Limba
Xuxue Feng

自定義模板

使用預設插槽可以自定義 Chip 內容。

PPRIME
SSHELTER
最愛

屬性

屬性名說明類型默認值
label標籤文字string''
image圖片網址string''
icon圖示組件Component-
removable是否可移除booleanfalse
removeIcon移除圖示組件ComponentIconX

事件

事件名說明回調參數
remove移除事件event: Event
removeicon移除圖示點擊事件event: Event

插槽

插槽名說明插槽屬性
default預設內容-
icon圖示內容-
removeicon移除圖示內容{ removeCallback: (event: Event) => void, keydownCallback: (event: Event) => void }

Released under the MIT License.