Split button
Overview
A split button consists of a main button and a dropdown menu. The main button performs the most common action, while the dropdown menu provides a list of secondary actions.
Configuration items
Category |
Configuration |
Example |
Description |
Content |
Right button data source |
The menu list on the right of the button. Add multiple action options to quickly select and run features. |
|
Edit node |
Select an item from the menu list and click Edit node to set the title, icon, disabled state, danger button mark, and event handler. |
||
Configure event handler |
Configure properties such as events, actions, component configurations, advanced execution conditions, and debouncing. |
||
Button text |
The text displayed on the button. |
||
Dropdown icon |
The icon on the right of the button. |
||
Button type |
Controls the style and behavior of the button. Options include the following: Primary, Default, Dashed, Text, and Link. |
||
Enable badge |
Specifies whether to display the badge. |
||
Badge configuration |
Configure badge properties after you enable the badge. |
||
Tooltip |
Specifies whether to display the tooltip. |
||
Tooltip configuration |
Configure tooltip properties after you enable the tooltip. |
||
Extension configuration |
Configure prefix and suffix icons for the button text. |
||
Interaction |
Hide |
Hide. For more information, see Common properties. |
|
Loading |
Displays the loading animation. |
||
Disabled |
Controls whether the component is disabled. A disabled component is grayed out to indicate that it is unavailable. |
||
Event |
Controls component interaction events. |
||
Style |
Height |
Height. For more information, see Common properties. |
|
Margin |
Margin. For more information, see Common properties. |
||
Ghost style |
|
Specifies whether to display the ghost style. |
|
Danger button |
Displays the danger button mark to emphasize the high risk of an operation. This is typically used for buttons that involve data loss, account deletion, or other irreversible actions. |
||
Button layout |
The layout of the button within its container. Options include the following: Block, Left, Center, and Right. |
||
CSS Style |
CSS style |
Add CSS styles. |
|
Border radius |
For more information, see Common properties. |
||
Button content font size |
The font size of the button content. |
||
Button content line height |
The line height of the button content. |
||
Primary button active background color |
For more information, see Common properties. |
||
Primary button active text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Primary button hover background color |
For more information, see Common properties. |
||
Primary button hover text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Primary button background color |
For more information, see Common properties. |
||
Primary button text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Default button active background color |
For more information, see Common properties. |
||
Default button active border color |
For more information, see Common properties. |
||
Default button active text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Default button hover background color |
For more information, see Common properties. |
||
Default button hover border color |
For more information, see Common properties. |
||
Default button hover text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Default button background color |
For more information, see Common properties. |
||
Default button border color |
For more information, see Common properties. |
||
Default button text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Text button active background color |
For more information, see Common properties. |
||
Text button disabled text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Text button text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Text button hover background color |
For more information, see Common properties. |
||
Link button active text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Link button text color |
Sets the text color. This corresponds to the CSS property: color. For more information, see the MDN documentation. |
||
Link button hover text color |
For more information, see Common properties. |
Properties and methods
Name |
Type |
Example |
Description |
text |
string |
|
The button text. |
setText |
func |
|
Sets the button text. |
clearText |
func |
|
Clears the button text. |
loading |
boolean |
|
The loading state of the button. |
setLoading |
func |
|
Sets the loading state of the button. |
disabled |
boolean |
|
Specifies whether the button is disabled. |
setDisabled |
func |
|
Sets whether the button is disabled. |
clearDisabled |
func |
|
The Purge button is currently disabled. |
currentIndex |
string |
|
The selected submenu option. |
setCurrentIndex |
func |
|
Sets the selected submenu option. |
clearCurrentIndex |
func |
|
Clears the selected submenu option. |
options |
object |
|
The action configuration for each data item. |
click |
func |
|
The click action. |
Event callbacks
Event name |
Description |
The callback that is triggered when the component is clicked. |
