import Taro from '@tarojs/taro' ; type IconType = 'success' | 'loading' | 'none' ; param { String } title param { String } icon param { Boolean } mask param { Number } duration returns { Any } export const setToast = ( title = '' , icon = 'none' , mask = true , duration = 1500 ) => { return Taro . showToast ( { title , icon , mask , duration , } ) ; } ; param { Boolean } showLoadingToast param { String } title param { Boolean } mask returns { Any } export const setLoadingToast = ( showLoadingToast , title = 'Loading...' , mask = true ) => { if ( showLoadingToast ) { return Taro . showLoading ( { title , mask , } ) ; } else { Taro . hideLoading ( ) ; } } ;