Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module:tabs): fix nzCentered not working #6706

Merged
merged 1 commit into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/tabs/demo/card-top.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 10
order: 11
title:
zh-CN: 卡片式页签容器
en-US: Container of card type Tab
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/card.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 8
order: 9
title:
zh-CN: 卡片式页签
en-US: Card type tab
Expand Down
15 changes: 15 additions & 0 deletions components/tabs/demo/centered.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
order: 2
title:
zh-CN: 居中
en-US: Centered
---

## zh-CN

标签居中展示。

## en-US

Centered tabs.

13 changes: 13 additions & 0 deletions components/tabs/demo/centered.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Component } from '@angular/core';

@Component({
selector: 'nz-demo-tabs-centered',
template: `
<nz-tabset nzCentered>
<nz-tab nzTitle="Tab 1">Content of Tab Pane 1</nz-tab>
<nz-tab nzTitle="Tab 2">Content of Tab Pane 2</nz-tab>
<nz-tab nzTitle="Tab 3">Content of Tab Pane 3</nz-tab>
</nz-tabset>
`
})
export class NzDemoTabsCenteredComponent {}
2 changes: 1 addition & 1 deletion components/tabs/demo/custom-add-trigger.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 11
order: 12
title:
zh-CN: 自定义新增页签触发器
en-US: Customized trigger of new tab
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/editable-card.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 9
order: 10
title:
zh-CN: 新增和关闭页签
en-US: Add & close tab
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/extra.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 4
order: 5
title:
zh-CN: 附加内容
en-US: Extra content
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/guard.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 14
order: 15
title:
zh-CN: 标签守卫
en-US: Tab guard
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/icon.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 2
order: 3
title:
zh-CN: 图标
en-US: Icon
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/lazy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 12
order: 13
title:
zh-CN: 懒加载
en-US: LazyLoad
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/link-router.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 13
order: 14
title:
zh-CN: 路由联动
en-US: With Router
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/position.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 6
order: 7
title:
zh-CN: 位置
en-US: Position
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/size.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 5
order: 6
title:
zh-CN: 大小
en-US: Size
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/slide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: 3
order: 4
title:
zh-CN: 滑动
en-US: Slide
Expand Down
2 changes: 0 additions & 2 deletions components/tabs/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@
.@{tab-prefix-cls}-nav-list {
position: relative;
display: flex;
flex: 1 0 auto; // fix safari scroll problem
transition: transform @animation-duration-slow;
}

// >>>>>>>> Operations
.@{tab-prefix-cls}-nav-operations {
display: flex;
flex: 1 0 auto; // fix safari scroll problem
align-self: stretch;

&-hidden {
Expand Down
1 change: 1 addition & 0 deletions components/tabs/style/position.less
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@

.@{tab-prefix-cls}-nav-list,
.@{tab-prefix-cls}-nav-operations {
flex: 1 0 auto; // fix safari scroll problem
flex-direction: column;
}
}
Expand Down