Skip to content

Commit

Permalink
refactor(types): sync components types
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Aug 13, 2023
1 parent f294658 commit abb02ae
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
12 changes: 6 additions & 6 deletions docs/apis/network/request/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ sidebar_label: request
| mode | `keyof CorsMode` | `"same-origin"` | 否 | 设置是否允许跨域请求<br />API 支持度: h5 |
| credentials | `keyof Credentials` | `"omit"` | 否 | 设置是否携带 Cookie<br />API 支持度: h5 |
| cache | `keyof Cache` | `"default"` | 否 | 设置缓存模式<br />API 支持度: h5 |
| retryTimes | `number` | `2` | 否 | 设置请求重试次数<br />API 支持度: h5 |
| backup | string or string[] | | 否 | 设置请求的兜底接口<br />API 支持度: h5 |
| retryTimes | `number` | `2` | 否 | 设置请求重试次数<br />API 支持度: h5<br />h5: 仅在 jsonp 模式下生效 |
| backup | string or string[] | | 否 | 设置请求的兜底接口<br />API 支持度: h5<br />h5: 仅在 jsonp 模式下生效 |
| signal | `AbortSignal` | | 否 | 设置请求中止信号<br />API 支持度: h5 |
| dataCheck | `() => boolean` | | 否 | 设置请求响应的数据校验函数,若返回 false,则请求兜底接口,若无兜底接口,则报请求失败<br />API 支持度: h5 |
| useStore | `boolean` | `false` | 否 | 设置请求是否使用缓存<br />API 支持度: h5 |
| storeCheckKey | `string` | | 否 | 设置请求缓存校验的 key<br />API 支持度: h5 |
| storeSign | `string` | | 否 | 设置请求缓存签名<br />API 支持度: h5 |
| dataCheck | `() => boolean` | | 否 | 设置请求响应的数据校验函数,若返回 false,则请求兜底接口,若无兜底接口,则报请求失败<br />API 支持度: h5<br />h5: 仅在 jsonp 模式下生效 |
| useStore | `boolean` | `false` | 否 | 设置请求是否使用缓存<br />API 支持度: h5<br />h5: 仅在 jsonp 模式下生效 |
| storeCheckKey | `string` | | 否 | 设置请求缓存校验的 key<br />API 支持度: h5<br />h5: 仅在 jsonp 模式下生效 |
| storeSign | `string` | | 否 | 设置请求缓存签名<br />API 支持度: h5<br />h5: 仅在 jsonp 模式下生效 |
| storeCheck | `() => boolean` | | 否 | 设置请求校验函数,一般不需要设置<br />API 支持度: h5 |

### SuccessCallbackResult
Expand Down
2 changes: 1 addition & 1 deletion docs/components/viewContainer/scroll-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default {
| ScrollViewProps.reverse | ✔️ | | | | | | | | |
| ScrollViewProps.cacheExtent | ✔️ | | | | | | | | |
| ScrollViewProps.scrollIntoViewWithinExtent | ✔️ | | | | | | | | |
| ScrollViewProps.scrollIntoViewAlignment | ✔️ | | | | | | | | |
| ScrollViewProps.scrollIntoViewAlignment | ✔️ | | | | | | ✔️ | | |
| ScrollViewProps.onScrollToUpper | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| ScrollViewProps.onScrollToLower | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| ScrollViewProps.onScroll | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-components/types/ScrollView.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentType } from 'react'
import { StandardProps, CommonEventFunction, BaseEventOrigFunction } from './common'
import { BaseEventOrigFunction, CommonEventFunction, StandardProps } from './common'
interface ScrollViewProps extends StandardProps {
/** 允许横向滚动
* @default false
Expand Down Expand Up @@ -157,7 +157,7 @@ interface ScrollViewProps extends StandardProps {
* center - 目标节点显示在视口中间
* end - 目标节点显示在视口结束处
* nearest - 目标节点在就近的视口边缘显示,若节点已在视口内则不触发滚动
* @supported weapp
* @supported weapp, h5
* @default 'start'
*/
scrollIntoViewAlignment?: 'start' | 'center' | 'end' | 'nearest'
Expand Down
6 changes: 6 additions & 0 deletions packages/taro/types/api/network/request.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ declare module '../../index' {
/** 设置请求重试次数
* @default 2
* @supported h5
* @h5 仅在 jsonp 模式下生效
*/
retryTimes?: number
/** 设置请求的兜底接口
* @supported h5
* @h5 仅在 jsonp 模式下生效
*/
backup?: string | string[]
/** 设置请求中止信号
Expand All @@ -118,19 +120,23 @@ declare module '../../index' {
signal?: AbortSignal
/** 设置请求响应的数据校验函数,若返回 false,则请求兜底接口,若无兜底接口,则报请求失败
* @supported h5
* @h5 仅在 jsonp 模式下生效
*/
dataCheck?(): boolean
/** 设置请求是否使用缓存
* @default false
* @supported h5
* @h5 仅在 jsonp 模式下生效
*/
useStore?: boolean
/** 设置请求缓存校验的 key
* @supported h5
* @h5 仅在 jsonp 模式下生效
*/
storeCheckKey?: string
/** 设置请求缓存签名
* @supported h5
* @h5 仅在 jsonp 模式下生效
*/
storeSign?: string
/** 设置请求校验函数,一般不需要设置
Expand Down

0 comments on commit abb02ae

Please sign in to comment.