UNPKG

autobots-lib

Version:

汽车人基础库

36 lines (23 loc) 658 B
'use strict'; import React from 'react-native'; import Native from '../native'; import Toast from './toast'; import MainLoading from './loading'; const { ToastAndroid, Platform, NativeModules } = React; let code = "" var newLoading = { Show: function (page, method, describe) { // NativeModules.AutoLoading ? NativeModules.AutoLoading.show(code, page, method, describe) : MainLoading.Show(); }, Hide: function (page, method) { // NativeModules.AutoLoading ? NativeModules.AutoLoading.hide(code, page, method, null) : MainLoading.Hide(); }, SetCode: function (rncode) { code = rncode } } module.exports = newLoading;