How to use the antd-mobile.Toast.loading function in antd-mobile

To help you get started, we’ve selected a few antd-mobile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github caohaijiang / dingyou-dingtalk-mobile / proj / src / noflux.js View on Github external
const Loading = () => { Toast.loading('加载中...', 0, ()=>{console.log('加载完成!!!')}) };
const Empty = () => { Toast.fail('加载失败!!!', 1) };
github discountry / web-altfolio / src / Components / Wallet.js View on Github external
fetchBalance() {
    if (!this.state.address) {
      Toast.fail('请输入钱包地址',1)
    }
    Toast.loading('查询中...',0)
    axios.get(`https://api.etherscan.io/api?module=account&action=balance&address=${this.state.address}&tag=latest&apikey=R3NUDUUSHIEWFW28XUKXJNWSDPVGCEGMKI`)
    .then(res => {
        this.setState({
          balance: res.data.result,
        })
        if (res.data.result > 0) {
          store.set('walletAddress', this.state.address)
          this.fetchTransations()
        } else {
          Toast.hide()
        }
    })
  }
  fetchTransations() {
github discountry / web-altfolio / src / Components / ExchangeForm.js View on Github external
handleCryptoChange(crypto) {
        Toast.loading('载入中...', 0)
        axios.get(`https://min-api.cryptocompare.com/data/price?fsym=${crypto[0]}&tsyms=${this.state.legal[0]}`)
        .then(res => {
            Toast.hide()
            this.setState({
                crypto,
                legalValue: (this.state.cryptoValue*res.data[this.state.legal[0]]).toFixed(2),
                rate: res.data[this.state.legal[0]],
             })
        })
    }
    handleLegalChange(legal) {
github zxj963577494 / OverWatchTeams-React-Native-Expo / src / sagas / resumeOrderSaga.js View on Github external
function* postResumeOrderWorker(payload) {
  try {
    Toast.loading('提交中')
    const currentUser = yield call(userService.getCurrentUserAsync)
    const userinfo = yield call(userService.getUserInfoToJson, currentUser)
    const count = yield call(
      resumeOrderService.getResumeOrderCountOfToday,
      currentUser
    )
    const resumeOrderLimit = userinfo.resumeOrderLimit
    if (count < resumeOrderLimit) {
      const response = yield call(
        resumeOrderService.cerateResumeOrder,
        payload,
        userinfo,
        currentUser
      )
      yield put(action.postResumeOrderSuccess(response))
      Toast.success('提交成功', 1)
github zxj963577494 / OverWatchTeams-React-Native-Expo / src / sagas / warOrderSaga.js View on Github external
function* getHomeWarOrderListWorker(payload) {
  try {
    Toast.loading('加载中')
    const response = yield call(warOrderService.getHomeWarOrderList, payload)
    yield put(action.getHomeWarOrderListSuccess(response))
    Toast.hide()
  } catch (error) {
    yield put(action.getHomeWarOrderListFailed(error))
    Toast.hide()
  }
}
github wuchujiang / react-lol-spa / src / Component / heroContent / panelC.jsx View on Github external
componentDidMount() { 
		Toast.loading('加载中', 0);
        this.props.getVideoData(`/GetHeroVideos?hero=${this.props.actions.summonerClick.keys || this.props.location.query.id}&p=${1}`, null, (data) => {
            Toast.hide();
            this.setState({
                getHeroVideo: data
            })
        });

		this.props.getVideoData(`/GetAuthors`, null, (data) => {
            Toast.hide();
            this.setState({
                getAuthor: data
            })
        });
	}
github TronLink / tronlink-extension / packages / popup / src / controllers / TransactionsController / index.js View on Github external
<div> {
                        const key = index === 0 ? 'all' : (index === 1 ? 'to' : 'from');
                        if (transactions.records.length &gt; 8) {
                            const isTop = e.target.scrollTop === 0 ? false : true;
                            this.setState({ isTop });
                            if (e.target.scrollTop === ((58 * transactions.records.length + 36) - 484)) {
                                if (!isRequest) {
                                    this.setState({ isRequest: true });
                                    Toast.loading('', 0);
                                    const records = await PopupAPI.getTransactionsByTokenId(id, typeof transactions.finger === 'string' ? transactions.finger : ++transactions.finger, key);
                                    Toast.hide();
                                    if (records.records.length === 0 || !records.finger) {
                                        this.setState({ isRequest: true });
                                    } else {
                                        transactions.records = transactions.records.concat(records.records);
                                        transactions.finger = records.finger;
                                        this.setState({ transactions, isRequest: false });
                                    }
                                }
                            }
                        }
                    }}
                    &gt;</div>
github wuchujiang / react-lol-spa / src / Component / video.jsx View on Github external
componentDidMount() { 
        if (this.props.requestData.video) {
            this.setState({
                initData: this.props.requestData.video.data
            });
        } else {
            Toast.loading('加载中...', 0);
            this.props.getVideoData(`/GetNewstVideos?p=${1}`, null, (data) => {
                Toast.hide();
                this.setState({
                    initData: data.data
                });
            }, 'video');
        }
        
    }
github wuchujiang / react-lol-spa / src / Component / hero / panelA.jsx View on Github external
componentDidMount() {
        let qquin = this.props.actions.searchClick.qquin || this.props.location.query.qquin;
        let vaid = this.props.actions.searchClick.area_id || this.props.location.query.vaid;
        Toast.loading('加载中', 0);
        this.props.getData(`/CombatList?qquin=${qquin}&vaid=${vaid}`, null, res => {
            if(res.code == 0){
                this.setState({
                    getCombatList: res
                })

            }else{
                Toast.fail('系统异常')
            }
        }, 'getCombatList');

        this.props.getData(`/UserExtInfo?qquin=${qquin}&vaid=${vaid}`, null, res => {
                if(res.code == 0){
                    this.setState({
                        getUserData: res
                    })