加载提示组件

使用方式

  import {Toast} from '../components/index';
  import BaseContainer from '../components/pubController/BaseContainer';
//数据流向
class IndexApp extends BaseContainer {
    constructor(props) {
        super(props);
    }

    handleButton(type?:number){
        if(type ==1){
            Toast.close();
        }else{
            Toast.open({tips:'图片上传中'});
        }

    }

    render() {

        return (
            <AppBody>
                <Panel title="全局提示-加载中按钮面板">
                    <Buttons onClick = {() => this.handleButton() } >打开加载中</Buttons>
                    <Buttons onClick = {() => this.handleButton(1) } >关闭加载中</Buttons>
                </Panel>
            </AppBody>
        );
    }

    componentDidMount():void {
        let {MenuReducers, dispatch} = this.props;
        dispatch(changeActiveAction({ parent: 8, child: 2 }))
    }

    componentWillUnmount():void {

    }
}
Toast.close();
Toast.open({tips:'图片上传中'});
属性 描述 类型
tips 提示的文字

results matching ""

    No results matching ""