
Button
Common action buttons.
The underlying button usage.
Demo
Display different button styles by setting the ButtonStyle
Demo
Set the color style of the button border by setting the IsOutline='true'
.
Demo
The Button component provides a variety of sizes in addition to the default values, and by setting the Size
property, you can select the appropriate button size in different scenarios.
Demo
Button is not available. By setting the IsDisabled
property
Demo
Button disable effects can be achieved by setting its own IsDisabled
property in the OnClick
callback method, or by calling the component instance method SetDisable
Because using the IsDisabled
property requires an explicit manual call to the StateHasChanged
method, which causes the component where the button is located to refresh as a whole, it is recommended that you use the instance method SetDisable
refresh the button only
Performance comparison:
- This page transfer is
4.8K
when set with theIsDisabled
property - This page transfer is
280B
when set up using theSetDisable
method
A combination of multiple buttons
Demo
Set the button icon by setting the Icon
property, which is fa-fa
when using font strings such as the font-awesome
icon
Demo
The button display text is set by setting the Text
property of the winButton
component, and the click button is the text on the right that shows the clicked button
Demo
By setting whether the isAsync
property button is asynchronous request button by setting whether the is false
by default
Demo
When the button is an asynchronous request button, the button is changed to disabled, and the loading
small icon is displayed, returning to normal after the asynchronous request ends, in this case, after clicking the asynchronous button, the request load animation is displayed and returns to normal after 5 seconds
TooltipIntro
Demo
Attributes
Event
Methods
B station related video link
交流群