NoticeBar
Install
Usage
Basic Usage
Scrollable
Wrapable
Mode
Custom Style
Vertical Scroll
API
Props
| Attribute |
Description |
Type |
Default |
| mode |
Mode, can be set to closeable link |
string |
'' |
| text |
Notice text content |
string |
'' |
| color |
Text color |
string |
#f60 |
| background |
Background color |
string |
#fff7cc |
| left-icon |
Left Icon |
string |
- |
| delay |
Animation delay (s) |
number | string |
1 |
| speed |
Scroll speed (px/s) |
number | string |
60 |
| scrollable |
Whether to scroll content |
boolean |
- |
| wrapable |
Whether to enable text wrap |
boolean |
false |
Events
| Event |
Description |
Arguments |
| click |
Emitted when NoticeBar is clicked |
event: Event |
| close |
Emitted when NoticeBar is closed |
event: Event |
replay v2.6.2 |
Emitted when NoticeBar is replayed |
- |
Slots
| Name |
Description |
| default |
Notice text content |
| left-icon |
Custom left icon |
| right-icon |
Custom right icon |
Methods
Use ref to get Field instance and call instance methods.
| Name |
Description |
Attribute |
Return value |
reset v2.12.32 |
Reset NoticeBar |
- |
- |
Less Variables
How to use: Custom Theme.
| Name |
Default Value |
Description |
| @notice-bar-height |
40px |
- |
| @notice-bar-padding |
0 @padding-md |
- |
| @notice-bar-wrapable-padding |
@padding-xs @padding-md |
- |
| @notice-bar-text-color |
@orange-dark |
- |
| @notice-bar-font-size |
@font-size-md |
- |
| @notice-bar-line-height |
24px |
- |
| @notice-bar-background-color |
@orange-light |
- |
| @notice-bar-icon-size |
16px |
- |
| @notice-bar-icon-min-width |
24px |
- |