탄막 채팅
탄막 채팅 (Barrage)
단어나 문구를 화면에 회전하며 띄우는 탄막(댄스무, bullet chat) 컴포넌트예요. 영상 위에 댓글이 흐르듯 표시할 때 어울려요.
출처: 문서
설치 (Install)
import { createApp } from 'vue'
import { Barrage } from '@nutui/nutui'
const app = createApp()
app.use(Barrage)
사용 예제 (Usage)
기본 사용법 (Basic usage)
demo: barrage basic
API
Props
| Parameter | Description | Type | Default |
|---|---|---|---|
| danmu | Danmaku list data | Array | [] |
| frequency | the time interval of each barrage in the visible area | number | 500 |
| speeds | scrolling time of each barrage | number | 5000 |
| rows | Number of bullet chatting lines, displayed in several lines | number | 3 |
| top | vertical distance of the barrage | number | 10 |
| loop | Whether to play in a loop | boolean | true |
Events
| Event Name | Description | Callback Parameters |
|---|---|---|
| add | add data(used via ref instance) | - |
더 알아보기 (Learn more)
이 글은 NutUI 공식 문서의 영문 원문을 한국어로 번역한 내용이에요. 최신 내용과 전체 문서는 아래 링크에서 확인할 수 있어요:
- 원문 문서: barrage doc.en-US.md
- NutUI GitHub 저장소: https://github.com/jd-opensource/nutui