English
fs-notice-bar
About 271 wordsLess than 1 minute
fs-notice-bar Notice Bar Component
The notice bar component is used to display important messages at the top of a page. It supports warning and error styles.
Usage
Import it locally by configuring it in the index.json of the page or component where it is needed.
"usingComponents": {
"fs-notice-bar": "ava-ui/fxui/fs-notice-bar/index"
}Code Demo
API
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| text | String | '' | Notice content |
| type | String | 'warning' | Notice type: warning (orange warning) / error (red error) |
| showIcon | Boolean | true | Whether to display the icon on the left |
| icon | String | '' | Custom icon. By default, the icon is selected automatically based on type |
| closable | Boolean | false | Whether to display the close button |
| marquee | Boolean/Object | false | Marquee effect. Set to true to enable the default configuration; use an object to customize the configuration |
| customStyle | String | '' | Custom style |
| textStyle | String | '' | Custom text style, such as font size and color |
marquee Configuration
When marquee is an object, the following configuration is supported:
| Property | Type | Default | Description |
|---|---|---|---|
| speed | Number | 50 | Scrolling speed (px/s) |
| loop | Number | -1 | Number of playback loops. -1 means infinite loop, and 0 means no looping |
| delay | Number | 0 | Delay before start (ms) |
Events
| Event | Description | Callback Parameters |
|---|---|---|
| click | Triggered when the notice bar is clicked | - |
| close | Triggered when the close button is clicked | - |
