Skip to content

Commit

Permalink
chore: adjust type
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaPeach committed Aug 26, 2023
1 parent ae3158f commit 370f942
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/arcodesign/components/tabs/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Used to let the user switch between different views. In order to optimize the re
|tabBarPosition|Tabbar position|"top" \| "bottom" \| "left" \| "right"|"top"|
|tabBarArrange|Tabbar arrangement, tabBar is valid when it is in the top or bottom position, start is left, center is centered, and end is right|"start" \| "center" \| "end"|"center"|
|tabBarScroll|Whether to scroll to the left when the TabBar exceeds the screen|boolean|true|
|tabBarFixed|Whether the TabBar is fixed on the top or bottom (including placeholder), a specific fixed value can be passed in|boolean \| Record\<"top" \| "bottom", number\>|-|
|tabBarFixed|Whether the TabBar is fixed on the top or bottom (including placeholder), a specific fixed value can be passed in|boolean \| Pick\<CSSProperties, "top" \| "bottom"\>|-|
|tabBarExtra|TabBar extra render content|ReactNode|-|
|tabBarScrollBezier|The bezier curve value that changes when the tabBar is scrolled|\[number, number, number, number\]|[0.34, 0.69, 0.1, 1]|
|tabBarScrollDuration|TabBar scrolling transition duration, in ms|number|300|
Expand Down Expand Up @@ -132,7 +132,7 @@ string | { [x: string]: any; title: ReactNode; }
|tabBarPosition|Tabbar position|"top" \| "bottom" \| "left" \| "right"|"top"|
|tabBarArrange|Tabbar arrangement, tabBar is valid when it is in the top or bottom position, start is left, center is centered, and end is right|"start" \| "center" \| "end"|"center"|
|tabBarScroll|Whether to scroll to the left when the TabBar exceeds the screen|boolean|true|
|tabBarFixed|Whether the TabBar is fixed on the top or bottom (including placeholder), a specific fixed value can be passed in|boolean \| Record\<"top" \| "bottom", number\>|-|
|tabBarFixed|Whether the TabBar is fixed on the top or bottom (including placeholder), a specific fixed value can be passed in|boolean \| Pick\<CSSProperties, "top" \| "bottom"\>|-|
|tabBarExtra|TabBar extra render content|ReactNode|-|
|tabBarScrollBezier|The bezier curve value that changes when the tabBar is scrolled|\[number, number, number, number\]|[0.34, 0.69, 0.1, 1]|
|tabBarScrollDuration|TabBar scrolling transition duration, in ms|number|300|
Expand Down
4 changes: 2 additions & 2 deletions packages/arcodesign/components/tabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
|tabBarPosition|TabBar位置|"top" \| "bottom" \| "left" \| "right"|"top"|
|tabBarArrange|TabBar排列方式,tabBar在top或bottom位置时有效,start为靠左,center为居中,end为靠右|"start" \| "center" \| "end"|"center"|
|tabBarScroll|是否TabBar超出屏幕时靠左滚动排列|boolean|true|
|tabBarFixed|TabBar是否顶部/底部固定(含 placeholder),可传入具体固定的值|boolean \| Record\<"top" \| "bottom", number\>|-|
|tabBarFixed|TabBar是否顶部/底部固定(含 placeholder),可传入具体固定的值|boolean \| Pick\<CSSProperties, "top" \| "bottom"\>|-|
|tabBarExtra|tabBar额外渲染内容|ReactNode|-|
|tabBarScrollBezier|tabBar滚动时变化的bezier曲线值|\[number, number, number, number\]|[0.34, 0.69, 0.1, 1]|
|tabBarScrollDuration|tabBar滚动过渡时长,单位ms|number|300|
Expand Down Expand Up @@ -132,7 +132,7 @@ string | { [x: string]: any; title: ReactNode; }
|tabBarPosition|TabBar位置|"top" \| "bottom" \| "left" \| "right"|"top"|
|tabBarArrange|TabBar排列方式,tabBar在top或bottom位置时有效,start为靠左,center为居中,end为靠右|"start" \| "center" \| "end"|"center"|
|tabBarScroll|是否TabBar超出屏幕时靠左滚动排列|boolean|true|
|tabBarFixed|TabBar是否顶部/底部固定(含 placeholder),可传入具体固定的值|boolean \| Record\<"top" \| "bottom", number\>|-|
|tabBarFixed|TabBar是否顶部/底部固定(含 placeholder),可传入具体固定的值|boolean \| Pick\<CSSProperties, "top" \| "bottom"\>|-|
|tabBarExtra|tabBar额外渲染内容|ReactNode|-|
|tabBarScrollBezier|tabBar滚动时变化的bezier曲线值|\[number, number, number, number\]|[0.34, 0.69, 0.1, 1]|
|tabBarScrollDuration|tabBar滚动过渡时长,单位ms|number|300|
Expand Down
4 changes: 2 additions & 2 deletions packages/arcodesign/components/tabs/__ast__/index.ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
},
"required": false,
"type": {
"name": "boolean | Record<\"top\" | \"bottom\", number>"
"name": "boolean | Pick<CSSProperties, \"top\" | \"bottom\">"
}
},
"tabBarExtra": {
Expand Down Expand Up @@ -1808,7 +1808,7 @@
"description": "TabBar是否顶部/底部固定(含 placeholder),可传入具体固定的值\n@en Whether the TabBar is fixed on the top or bottom (including placeholder), a specific fixed value can be passed in",
"defaultValue": null,
"type": {
"name": "boolean | Record<\"top\" | \"bottom\", number>"
"name": "boolean | Pick<CSSProperties, \"top\" | \"bottom\">"
},
"tags": {
"en": "Whether the TabBar is fixed on the top or bottom (including placeholder), a specific fixed value can be passed in"
Expand Down
4 changes: 2 additions & 2 deletions packages/arcodesign/components/tabs/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactNode, ReactNodeArray } from 'react';
import { CSSProperties, ReactNode, ReactNodeArray } from 'react';

export type TabData =
| string
Expand Down Expand Up @@ -81,7 +81,7 @@ export interface TabsProps {
* TabBar是否顶部/底部固定(含 placeholder),可传入具体固定的值
* @en Whether the TabBar is fixed on the top or bottom (including placeholder), a specific fixed value can be passed in
*/
tabBarFixed?: boolean | Record<'top' | 'bottom', number>;
tabBarFixed?: boolean | Pick<CSSProperties, 'top' | 'bottom'>;
/**
* tabBar额外渲染内容
* @en TabBar extra render content
Expand Down

0 comments on commit 370f942

Please sign in to comment.