异步数据组件
- Source:
Members
(inner) props
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tag |
string |
<optional> |
span
|
容器标签名 |
promise |
Promise |
<optional> |
Promise实例 |
|
delay |
Number |
<optional> |
200
|
延时显示loading,即pending时间大于这个时间才会显示 |
属性参数
(inner) scopedSlots
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
default |
string |
<optional> |
默认插槽,请求成功响应数据显示的内容,回调参数 data:resolve的数据 |
pending |
string |
<optional> |
定义请求等待中显示内容,通常做loading效果,回调参数 data:上次resolve的数据 |
error |
string |
<optional> |
定义请求失败后的显示内容,回调参数 error: reject数据 |
combine |
string |
<optional> |
全部状态合并成一个插槽定义,回调参数 pending,data, error,delayOver |
作用域插槽