Skip to content

Commit

Permalink
feat(pull-down-refresh): update api
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Apr 24, 2023
1 parent 74b4d6c commit 752fa04
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 1 deletion.
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:: BASE_DOC ::

## API
### PullDownRefresh Props

name | type | default | description | required
-- | -- | -- | -- | --
loadingBarHeight | String / Number | 50 | \- | N
loadingProps | Object | - | Typescript:`LoadingProps`[Loading API Documents](./loading?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/pull-down-refresh/type.ts) | N
loadingTexts | Array | [] | Typescript:`string[]` | N
maxBarHeight | String / Number | 80 | \- | N
refreshTimeout | Number | 3000 | \- | N
value | Boolean | false | `v-model` and `v-model:value` is supported | N
defaultValue | Boolean | false | uncontrolled property | N
onChange | Function | | Typescript:`(value: boolean) => void`<br/> | N
onRefresh | Function | | Typescript:`() => void`<br/> | N
onScrolltolower | Function | | Typescript:`() => void`<br/> | N
onTimeout | Function | | Typescript:`() => void`<br/> | N

### PullDownRefresh Events

name | params | description
-- | -- | --
change | `(value: boolean)` | \-
refresh | \- | \-
scrolltolower | \- | \-
timeout | \- | \-
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:: BASE_DOC ::

## API
### PullDownRefresh Props

名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
loadingBarHeight | String / Number | 50 | 加载中下拉高度,如果值为数字则单位是:'px' | N
loadingProps | Object | - | 加载loading样式。TS 类型:`LoadingProps`[Loading API Documents](./loading?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/pull-down-refresh/type.ts) | N
loadingTexts | Array | [] | 提示语,组件内部默认值为 ['下拉刷新', '松手刷新', '正在刷新', '刷新完成']。TS 类型:`string[]` | N
maxBarHeight | String / Number | 80 | 最大下拉高度,如果值为数字则单位是:'px' | N
refreshTimeout | Number | 3000 | 刷新超时时间 | N
value | Boolean | false | 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态。支持语法糖 `v-model``v-model:value` | N
defaultValue | Boolean | false | 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态。非受控属性 | N
onChange | Function | | TS 类型:`(value: boolean) => void`<br/>下拉或收起时触发,用户手势往下滑动触发下拉状态,手势松开触发收起状态 | N
onRefresh | Function | | TS 类型:`() => void`<br/>结束下拉时触发 | N
onScrolltolower | Function | | TS 类型:`() => void`<br/>滚动到页面底部时触发 | N
onTimeout | Function | | TS 类型:`() => void`<br/>刷新超时触发 | N

### PullDownRefresh Events

名称 | 参数 | 描述
-- | -- | --
change | `(value: boolean)` | 下拉或收起时触发,用户手势往下滑动触发下拉状态,手势松开触发收起状态
refresh | \- | 结束下拉时触发
scrolltolower | \- | 滚动到页面底部时触发
timeout | \- | 刷新超时触发
41 changes: 40 additions & 1 deletion packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -71566,6 +71566,45 @@
],
"field_type_text": []
},
{
"id": 3470,
"platform_framework": [
"8",
"16",
"32",
"64"
],
"component": "PullDownRefresh",
"field_category": 2,
"field_name": "scrolltolower",
"field_type": [],
"field_default_value": "",
"field_enum": "",
"field_desc_zh": "滚动到页面底部时触发",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
"create_time": "2023-04-24 11:47:31",
"update_time": "2023-04-24 11:47:31",
"event_output": null,
"custom_field_type": null,
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
"trigger_elements": "",
"deprecated": 0,
"version": "",
"test_description": null,
"support_default_value": 0,
"field_category_text": "Events",
"platform_framework_text": [
"Vue(Mobile)",
"React(Mobile)",
"Angular(Mobile)",
"Miniprogram"
],
"field_type_text": []
},
{
"id": 1765,
"platform_framework": [
Expand Down Expand Up @@ -116897,5 +116936,5 @@
]
}
],
"total": 2786
"total": 2787
}

0 comments on commit 752fa04

Please sign in to comment.