src/index.js
function config(name) {
  const args = [].slice.call(arguments, 1)
  const modules = {
    ActionSheet: $actionSheet,
    Loading: $loading,
    Toast: $toast,
    Dialog: $dialog
  }
  const module = components[name] || modules[name]
  if (typeof module.config === 'function') {
    module.config.apply(null, args)
  }
  else {
    console.warn(`${name}.config is not a function`)
  }
}
function config(name) {
  const args = [].slice.call(arguments, 1)
  const modules = {
    ActionSheet: $actionSheet,
    Loading: $loading,
    Toast: $toast,
    Dialog: $dialog
  }
  const module = components[name] || modules[name]
  if (typeof module.config === 'function') {
    module.config.apply(null, args)
  }
  else {
    console.warn(`${name}.config is not a function`)
  }
}
function config ( name ) { const args = [ ] . slice . call ( arguments , 1 ) const modules = { ActionSheet : $actionSheet , Loading : $loading , Toast : $toast , Dialog : $dialog } const module = components [ name ] || modules [ name ] if ( typeof module . config === 'function' ) { module . config . apply ( null , args ) } else { console . warn ( ` ${ name } ` ) } }
Components can export a function named config to customize some options for user
Components can export a function named config to customize some options for user