Skip to content

Commit cb41279

Browse files
authored
[new feature] Tabs: add background prop (youzan#2772)
1 parent 34e30aa commit cb41279

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

packages/tab/en-US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
154154
| color | Tab color | `String` | `#f44` |
155155
| type | Can be set to `line` `card` | `String` | `line` |
156156
| duration | Toggle tab's animation time | `Number` | `0.3` | - |
157+
| background | Background color | `String` | `white` |
157158
| line-width | Width of tab line (px) | `Number` | Width of active tab |
158159
| line-height | Height of tab line (px) | `Number` | 3 |
159160
| swipe-threshold | Set swipe tabs threshold | `Number` | `4` | - |

packages/tab/zh-CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export default {
158158
| color | 标签颜色 | `String` | `#f44` | 1.2.0 |
159159
| type | 样式类型,可选值为`card` | `String` | `line` | - |
160160
| duration | 动画时间,单位秒 | `Number` | `0.3` | - |
161+
| background | 标签栏背景色 | `String` | `white` | 1.6.5 |
161162
| line-width | 底部条宽度,单位 px | `Number` | - | 1.1.1 |
162163
| line-height | 底部条高度,单位 px | `Number` | 3 | 1.5.0 |
163164
| swipeable | 是否开启手势滑动切换 | `Boolean` | `false` | 1.0.0 |

packages/tabs/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default sfc({
2020
animated: Boolean,
2121
offsetTop: Number,
2222
swipeable: Boolean,
23+
background: String,
2324
ellipsis: {
2425
type: Boolean,
2526
default: true
@@ -91,7 +92,8 @@ export default sfc({
9192

9293
navStyle() {
9394
return {
94-
borderColor: this.color
95+
borderColor: this.color,
96+
background: this.background
9597
};
9698
},
9799

packages/tabs/index.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
line-height: @tabs-line-height;
1212
text-align: center;
1313
box-sizing: border-box;
14-
background-color: @white;
1514

1615
span {
1716
display: block;

0 commit comments

Comments
 (0)