https://github.com/PengBoUESTC/vite-plugin-bullet-msg
show target msg on screen like bullet chat
https://github.com/PengBoUESTC/vite-plugin-bullet-msg
Last synced: about 2 months ago
JSON representation
show target msg on screen like bullet chat
- Host: GitHub
- URL: https://github.com/PengBoUESTC/vite-plugin-bullet-msg
- Owner: PengBoUESTC
- Created: 2022-09-02T13:42:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-21T10:22:24.000Z (over 2 years ago)
- Last Synced: 2025-03-13T16:43:20.996Z (about 2 months ago)
- Language: TypeScript
- Size: 168 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# vite-plugin-bullet-msg
vite-plugin-bullet-msg## get the target str from your code to dispaly in screen like bullet-chat
- get the target str and then send event by ws, client will create dom with the msg
```javascript
bulletMsgPlugin({
wsProtocol: 'vite-hmr', // ws protocol
wsPath: 'xxx', // link
targetKey: 'TODO',
rootPath: __dirname,
duration: 50, // 动画时长 s
})
```+ or U can handle the target data yourself
```javascript
bulletMsgPlugin({
wsProtocol: 'vite-hmr', // ws protocol
wsPath: 'xxx', // link
targetKey: 'TODO',
rootPath: __dirname,
duration: 50, // 动画时长 s
dataHandler: (data) => {
// U can create a Vue instance to show your data in browser
console.log(data)
}
})
```