diff --git a/components/tabs/TabBar.jsx b/components/tabs/TabBar.jsx index aba267d77..a961b9bf9 100644 --- a/components/tabs/TabBar.jsx +++ b/components/tabs/TabBar.jsx @@ -1,4 +1,7 @@ -import Icon from '../icon'; +import UpOutlined from '@ant-design/icons-vue/UpOutlined'; +import DownOutlined from '@ant-design/icons-vue/DownOutlined'; +import LeftOutlined from '@ant-design/icons-vue/LeftOutlined'; +import RightOutlined from '@ant-design/icons-vue/RightOutlined'; import ScrollableInkTabBar from '../vc-tabs/src/ScrollableInkTabBar'; import { cloneElement } from '../_util/vnode'; const TabBar = { @@ -17,16 +20,22 @@ const TabBar = { 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 = ( - + { + isVertical ? + : + + } ); const nextIcon = ( - + { + isVertical ? + : + + } ); diff --git a/components/tabs/__tests__/__snapshots__/demo.test.js.snap b/components/tabs/__tests__/__snapshots__/demo.test.js.snap index 029fce7c1..a4c255ded 100644 --- a/components/tabs/__tests__/__snapshots__/demo.test.js.snap +++ b/components/tabs/__tests__/__snapshots__/demo.test.js.snap @@ -4,7 +4,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/basic.md correctly 1`] = `
-
+
@@ -35,7 +35,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/basic.md correctly 1`] = ` exports[`renders ./antdv-demo/docs/tabs/demo/card.md correctly 1`] = `
-
+
@@ -66,7 +66,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/card-top.md correctly 1`] = `
-
+
@@ -103,20 +103,16 @@ exports[`renders ./antdv-demo/docs/tabs/demo/custom-add-trigger.md correctly 1`]
-
+
@@ -143,7 +139,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/custom-tab-bar.md correctly 1`] = `
-
+
@@ -174,7 +170,7 @@ exports[`renders ./antdv-demo/docs/tabs/demo/custom-tab-bar.md correctly 1`] = ` exports[`renders ./antdv-demo/docs/tabs/demo/disabled.md correctly 1`] = `
-
+
@@ -204,21 +200,17 @@ exports[`renders ./antdv-demo/docs/tabs/demo/disabled.md correctly 1`] = ` exports[`renders ./antdv-demo/docs/tabs/demo/editable-card.md correctly 1`] = `
-
-
+
+