Browse Source

fix: change api name

DaiQiangReal 1 year ago
parent
commit
652e191e77

+ 1 - 1
content/navigation/tabs/index-en-US.md

@@ -668,7 +668,7 @@ Property | Description
 activeKey | The itemKey value of the currently active tab page                                                                                                                                            | string                                                                            | None          |
 className | class name                                                                                                                                                                                    | string                                                                            | None          |
 collapsible | collapsed Tabs, **>=1.1.0**                                                                                                                                                                   | boolean                                                                           | false         |
-collapsibleWrapperStyle | Overall scrolling area style **>=2.61.0**                                                                                                                                                     | style: CSSProperties                                                              | None          |
+visibleTabsStyle | Overall scrolling area style **>=2.61.0**                                                                                                                                                     | style: CSSProperties                                                              | None          |
 contentStyle | The outer style object of the content area                                                                                                                                                    | CSSProperties                                                                     | None          |
 defaultActiveKey | Initialize the key value of the selected tab page                                                                                                                                             | string                                                                            | '1'           |
 keepDOM | Whether to render the DOM structure of the hidden panel when using TabPane writing, **>=1.0.0**                                                                                               | boolean                                                                           | true          |

+ 1 - 1
content/navigation/tabs/index.md

@@ -688,7 +688,7 @@ class App extends React.Component {
 activeKey | 当前激活的 tab 页的 itemKey 值                                            | string                                                                            | 无    |
 className | 类名                                                                | string                                                                            | 无    |
 collapsible | 折叠的 Tabs,**>=1.1.0**                                              | boolean                                                                           | false |
-collapsibleWrapperStyle | 整体滚动区域 Style **>=2.61.0**                                         | style: CSSProperties                                                              | 无 |
+visibleTabsStyle | 整体滚动区域 Style **>=2.61.0**                                         | style: CSSProperties                                                              | 无 |
 contentStyle | 内容区域外层样式对象                                                        | CSSProperties                                                                     | 无    |
 defaultActiveKey | 初始化选中的 tab 页的 key 值                                               | string                                                                            | '1'  |
 keepDOM | 使用 TabPane 写法时是否渲染隐藏面板的 DOM 结构,**>=1.0.0**                        | boolean                                                                           | true |

+ 1 - 1
content/show/overflowlist/index.md

@@ -217,7 +217,6 @@ import { IconAlarm, IconBookmark, IconCamera, IconDuration, IconEdit, IconFolder
 | 属性       | 说明     | 类型                                              | 默认值        | 版本     |
 | ---------- | -------- |-------------------------------------------------|------------|--------|
 | className  | 类名     | string                                          | -          | 1.1.0  |
-| onVisibleStateChange | 隐藏显示状态变化回调 | (visibleState: Map\<string, boolean\>) => void; | -          | 2.61.0 |
 | renderMode | 渲染模式 | `collapse`\| `scroll`                           | `collapse` | 1.1.0  |
 | style      | OverflowList的样式 | React.CSSProperties                             | -          | 1.1.0  |
 
@@ -238,6 +237,7 @@ import { IconAlarm, IconBookmark, IconCamera, IconDuration, IconEdit, IconFolder
 | --- | --- |------------------------------------------------------------------------------------------------------------------------------------| --- | --- |
 | items | 渲染项目,**要求必含 key 项** | Record<string, any>[]                                                                                                              | - | 1.1.0 |
 | onIntersect | 溢出回调 | ({[key: string]: [IntersectionObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)}) => void | - | 1.1.0 |
+| onVisibleStateChange | 隐藏显示状态变化回调 | (visibleState: Map\<string, boolean\>) => void; | -          | 2.61.0 |
 | overflowRenderer | 溢出项的自定义渲染函数 | (overflowItems: Record<string, any>[]) => React.ReactNode[]                                                                        | - | 1.1.0 |
 | threshold | 触发溢出回调的阈值 | number                                                                                                                             | 0.75 | 1.1.0 |
 | visibleItemRenderer | 展示项的自定义渲染函数 | (item: Record<string, any>, index: number) => React.ReactElement                                                                   | - | 1.1.0 |

+ 1 - 1
packages/semi-ui/tabs/TabBar.tsx

@@ -230,7 +230,7 @@ class TabBar extends React.Component<TabBarProps, TabBarState> {
             <OverflowList
                 items={renderedList}
                 overflowRenderDirection={this.props.arrowRenderPosition}
-                wrapperStyle={this.props.collapsibleWrapperStyle}
+                wrapperStyle={this.props.visibleTabsStyle}
                 overflowRenderer={this.renderOverflow}
                 renderMode="scroll"
                 className={`${cssClasses.TABS_BAR}-overflow-list`}

+ 2 - 2
packages/semi-ui/tabs/index.tsx

@@ -259,7 +259,7 @@ class Tabs extends BaseComponent<TabsProps, TabsState> {
             type,
             more,
             overflowVisibleStateChange,
-            collapsibleWrapperStyle,
+            visibleTabsStyle,
             arrowRenderPosition,
             renderArrow,
             ...restProps
@@ -290,7 +290,7 @@ class Tabs extends BaseComponent<TabsProps, TabsState> {
             handleKeyDown: this.foundation.handleKeyDown,
             more,
             overflowVisibleStateChange,
-            collapsibleWrapperStyle,
+            visibleTabsStyle,
             arrowRenderPosition,
             renderArrow
         } as TabBarProps;

+ 2 - 2
packages/semi-ui/tabs/interface.ts

@@ -42,7 +42,7 @@ export interface TabsProps {
     preventScroll?: boolean;
     more?: number | { count: number; render?: () => ReactNode; dropdownProps?: DropdownProps };
     overflowVisibleStateChange?: TabBarProps["overflowVisibleStateChange"];
-    collapsibleWrapperStyle?: TabBarProps['collapsibleWrapperStyle'];
+    visibleTabsStyle?: TabBarProps['visibleTabsStyle'];
     arrowRenderPosition?: TabBarProps['arrowRenderPosition'];
     renderArrow?: TabBarProps['renderArrow']
 }
@@ -65,7 +65,7 @@ export interface TabBarProps {
     handleKeyDown?: (event: React.KeyboardEvent, itemKey: string, closable: boolean) => void;
     more?: TabsProps['more'];
     overflowVisibleStateChange?: (visibleState: Map<string, boolean>) => void;
-    collapsibleWrapperStyle?: CSSProperties;
+    visibleTabsStyle?: CSSProperties;
     arrowRenderPosition?: OverflowListProps['overflowRenderDirection'];
     renderArrow?: (items: OverflowItem[], pos: "start"|"end", handleArrowClick: () => void) => ReactNode