diff --git a/components/tabs/tabBar.jsx b/components/tabs/tabBar.jsx deleted file mode 100644 index 70a76b9ba..000000000 --- a/components/tabs/tabBar.jsx +++ /dev/null @@ -1,58 +0,0 @@ -import Icon from '../icon' -import ScrollableInkTabBar from '../vc-tabs/src/ScrollableInkTabBar' -import { cloneElement } from '../_util/vnode' - -const TabBar = { - functional: true, - render (h, context) { - const { - tabBarStyle, - animated = true, - renderTabBar, - tabBarExtraContent, - tabPosition, - prefixCls, - } = context.props - const inkBarAnimated = typeof animated === 'object' ? animated.inkBar : animated - - const isVertical = tabPosition === 'left' || tabPosition === 'right' - const prevIconType = isVertical ? 'up' : 'left' - const nextIconType = isVertical ? 'down' : 'right' - const prevIcon = ( - - - - ) - const nextIcon = ( - - - - ) - - const renderProps = { - props: { - ...context.props, - inkBarAnimated, - extraContent: tabBarExtraContent, - prevIcon, - nextIcon, - }, - style: tabBarStyle, - on: { - ...context.listeners, - }, - } - - let RenderTabBar - - if (renderTabBar) { - RenderTabBar = renderTabBar(renderProps, ScrollableInkTabBar) - } else { - RenderTabBar = - } - - return cloneElement(RenderTabBar, renderProps) - }, -} - -export default TabBar