Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pull-down-refresh): update api #125

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:: 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,28 @@
:: 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 | \- | 刷新超时触发
39 changes: 39 additions & 0 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -73476,6 +73476,45 @@
],
"field_type_text": []
},
{
"id": 3531,
"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