# fetch v2.5.3+

Asynchronous data can be loaded through the custom attribute fetch and assigned to the specified attribute

# 类型

type fetch = string | {
  //The location where asynchronous data is inserted, for example:'options', 'props.options'
  to: String;
  //interface address
  action: String;
  //Parse the data returned by the interface and return the final data. The default is `res.data`
  parse?: (body: any) => any;
  //Request method, default GET
  method?: String;
  //Call interface with data
  data?: Object;
  //Call the method of submitting data attached to the interface,The default is `formData`
  dataType?: 'json';
  //Custom header header information
  headers?: Object;
  //Interface request failed callback
  onError?: (e: Error | ProgressEvent) => void;
 }

When fetch is a string, the data will be assigned to rule.options by default

# Example

# Load the options of select through the interface

# Load the option of cascader through the interface