Skip to content
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
2 changes: 1 addition & 1 deletion src/_common
3 changes: 2 additions & 1 deletion src/tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const Tabs: FC<TabsProps> = (props) => {
showBottomLine,
size,
theme,
split,
stickyProps,
swipeable,
onChange,
Expand Down Expand Up @@ -258,7 +259,7 @@ const Tabs: FC<TabsProps> = (props) => {
return (
<div className={tabsClasses}>
<Sticky {...stickyProps} onScroll={handlerScroll}>
<div className={`${tabsClass}__nav`}>
<div className={classnames(`${tabsClass}__nav`, { [`${tabsClass}__nav--split`]: split })}>
<div
ref={navScrollRef}
className={`${tabsClass}__scroll ${tabsClass}__scroll--top ${tabsClass}__scroll--${theme}`}
Expand Down
1 change: 1 addition & 0 deletions src/tabs/defaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const tabsDefaultProps: TdTabsProps = {
showBottomLine: true,
size: 'medium',
spaceEvenly: true,
split: true,
sticky: false,
swipeable: true,
theme: 'line',
Expand Down
1 change: 1 addition & 0 deletions src/tabs/tabs.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ list | Array | - | Typescript: `Array<TdTabPanelProps>` | N
showBottomLine | Boolean | true | \- | N
size | String | medium | options: medium/large | N
spaceEvenly | Boolean | true | \- | N
split | Boolean | true | \- | N
sticky | Boolean | false | \- | N
stickyProps | Object | - | Typescript: `StickyProps`,[Sticky API Documents](./sticky?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/tabs/type.ts) | N
swipeable | Boolean | true | \- | N
Expand Down
1 change: 1 addition & 0 deletions src/tabs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ list | Array | - | 选项卡列表。TS 类型:`Array<TdTabPanelProps>` | N
showBottomLine | Boolean | true | 是否展示底部激活线条 | N
size | String | medium | 组件尺寸。可选项:medium/large | N
spaceEvenly | Boolean | true | 选项卡头部空间是否均分 | N
split | Boolean | true | 是否展示分割线 | N
sticky | Boolean | false | 是否开启粘性布局 | N
stickyProps | Object | - | 透传至 Sticky 组件。TS 类型:`StickyProps`,[Sticky API Documents](./sticky?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/tabs/type.ts) | N
swipeable | Boolean | true | 是否可以滑动切换 | N
Expand Down
7 changes: 6 additions & 1 deletion src/tabs/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* */

import { StickyProps } from '../sticky';
import { TNode, TElement } from '../common';
import type { TNode, TElement } from '../common';

export interface TdTabsProps {
/**
Expand Down Expand Up @@ -36,6 +36,11 @@ export interface TdTabsProps {
* @default true
*/
spaceEvenly?: boolean;
/**
* 是否展示分割线
* @default true
*/
split?: boolean;
/**
* 是否开启粘性布局
* @default false
Expand Down
70 changes: 35 additions & 35 deletions test/snap/__snapshots__/csr.test.jsx.snap

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions test/snap/__snapshots__/ssr.test.jsx.snap

Large diffs are not rendered by default.

Loading