diff --git a/src/components/cascader-view/tests/__snapshots__/cascader-view.test.tsx.snap b/src/components/cascader-view/tests/__snapshots__/cascader-view.test.tsx.snap index fc064bb7bb..328e460330 100644 --- a/src/components/cascader-view/tests/__snapshots__/cascader-view.test.tsx.snap +++ b/src/components/cascader-view/tests/__snapshots__/cascader-view.test.tsx.snap @@ -7,6 +7,7 @@ exports[`CascaderView basic usage 1`] = ` >
+
+
## Tabs
### Props
@@ -27,6 +29,7 @@ The current content needs to be divided into groups of the same hierarchical str
| defaultActiveKey | The initialized `key` of the selected panel, if the `activeKey` is not set | `string \| null` | the `key` of the 1st pannel |
| onChange | Callback when switching panel | `(key: string) => void` | - |
| stretch | Whether stretch the tab header | `boolean` | `true` |
+| direction | Document layout direction | `'ltr' \| 'rtl'` | `'ltr'` |
### CSS Variables
diff --git a/src/components/tabs/index.zh.md b/src/components/tabs/index.zh.md
index df3f840232..f682e0b6c9 100644
--- a/src/components/tabs/index.zh.md
+++ b/src/components/tabs/index.zh.md
@@ -16,6 +16,8 @@
+
+
## Tabs
### 属性
@@ -27,6 +29,7 @@
| defaultActiveKey | 初始化选中面板的 `key`,如果没有设置 `activeKey` | `string \| null` | 第一个面板的 `key` |
| onChange | 切换面板的回调 | `(key: string) => void` | - |
| stretch | 选项卡头部是否拉伸 | `boolean` | `true` |
+| direction | 文档排版方向 | `'ltr' \| 'rtl'` | `'ltr'` |
### CSS 变量
diff --git a/src/components/tabs/tabs.tsx b/src/components/tabs/tabs.tsx
index 3301f15ef0..026457cb21 100644
--- a/src/components/tabs/tabs.tsx
+++ b/src/components/tabs/tabs.tsx
@@ -39,6 +39,7 @@ export type TabsProps = {
stretch?: boolean
onChange?: (key: string) => void
children?: React.ReactNode
+ direction?: 'ltr' | 'rtl'
} & NativeProps<
| '--fixed-active-line-width'
| '--active-line-height'
@@ -52,6 +53,7 @@ export type TabsProps = {
const defaultProps = {
activeLineMode: 'auto',
stretch: true,
+ direction: 'ltr',
}
export const Tabs: FC