Files
AntdUI/doc/wiki/en/Control/Spin.md
2025-10-16 11:03:26 +08:00

1.6 KiB
Raw Permalink Blame History

HomeUpdateLogConfigTheme

Spin

👚

Used for the loading status of a page or a block.

  • DefaultPropertyText
  • DefaultEventClick

Property

Name Description Type Default Value
Text Text string? null
🌏 LocalizationText International Text string? null
Fill Colour Color? null
ForeColor Text color Color? null

Method

All IControl that inherit FHIR trol support the Spin method

Name Description Return Value Parameters
Spin LOADING void Action action Commission to wait for, Action? end = null Post completion callback
Spin LOADING void Spin.Config Config, Action action Commission to wait for, Action? end = null Post completion callback

Config

Spin.Config

Name Description Type Default Value
Text Text string? null
Back Background color Color? null
Color Colour Color? null
Fore Text color Color? null
Radius Rounded corners int? null
Font Font Font? null
Value Progress float? null

Code Example

panel1.Spin(config => {
    // Time consuming code
    sleep(1000);
},()=>{
    //Loading completed
});
AntdUI.Spin.open(panel1, config => {
    // Time consuming code
    sleep(1000);
},()=>{
    //Loading completed
});

SpinRun