Options
All
  • Public
  • Public/Protected
  • All
Menu

Loading状态类

新增于v0.0.6

脚本举例

  import { loading } from '@tomato-js/ui'
  //快捷用法
  (()=>{
    const myloading = loading('waiting');
    myloading.show();
    //⠼ waiting
    myloading.show('waiting more time');
    //⠼ waiting more time
    myloading.hide();
  })()
  //定制用法
  (()=>{
    const myloading = loading({color:'red','text':'fetching'}).show();
    //⠼(red) fetching
    myloading.show({color:'blue','text':'composing'});
    //⠼(blue) composing
    myloading.hide({type:'succeed',text:'done'});
    //✔ done
  })()
param

配置

param

加载图标颜色,支持black/red/green/yellow/blue/magenta/cyan/white/gray

param

描述文字

returns

Loading Instance

Hierarchy

  • Loading

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Loading(loadingOptions?: LoadingOptions | string): Loading

Properties

myLoading

myLoading: Ora

Private options

options: LoadingOptions | string | undefined

Methods

hide

  • hide(options?: HideOptions): void
  • 结束加载方法

    新增于v0.0.6

    脚本举例

      import { loading } from '@tomato-js/ui'
      //快捷用法
      (()=>{
        const myloading = loading('waiting');
        myloading.show();
        //⠼ waiting
        myloading.show('waiting more time');
        //⠼ waiting more time
        myloading.hide();
      })()
      //定制用法
      (()=>{
        const myloading = loading({color:'red','text':'fetching'}).show();
        //⠼(red) fetching
        myloading.show({color:'blue','text':'composing'});
        //⠼(blue) composing
        myloading.hide({type:'succeed',text:'done'});
        //✔ done
      })()

    Parameters

    • Optional options: HideOptions

      配置

    Returns void

Private setOptions

  • setOptions(options?: LoadingOptions | string): void

show

  • show(options?: LoadingOptions | string): this
  • 展示加载方法

    新增于v0.0.6

    脚本举例

      import { loading } from '@tomato-js/ui'
      //快捷用法
      (()=>{
        const myloading = loading('waiting');
        myloading.show();
        //⠼ waiting
        myloading.show('waiting more time');
        //⠼ waiting more time
        myloading.hide();
      })()
      //定制用法
      (()=>{
        const myloading = loading({color:'red','text':'fetching'}).show();
        //⠼(red) fetching
        myloading.show({color:'blue','text':'composing'});
        //⠼(blue) composing
        myloading.hide({type:'succeed',text:'done'});
        //✔ done
      })()

    Parameters

    • Optional options: LoadingOptions | string

      配置

    Returns this

    Loading Instance

Generated using TypeDoc