Skip to content

Commit

Permalink
fix(module:tabs): tab-link cannot be disabled (#5759)
Browse files Browse the repository at this point in the history
close #5549, close #5543
  • Loading branch information
hsuanxyz authored Sep 10, 2020
1 parent aa2ea54 commit 1afabd4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/button/button.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ export class TestButtonIconOnlyComponent {}
export class TestButtonIconOnlyLoadingComponent {}

@Component({
template: ` <a nz-button href="https://ng.ant.design/" [disabled]="disabled">anchor</a> `
template: `
<a nz-button href="https://ng.ant.design/" [disabled]="disabled">anchor</a>
`
})
export class TestAnchorButtonComponent {
disabled = false;
Expand Down
12 changes: 12 additions & 0 deletions components/tabs/style/patch.less
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,20 @@ nz-tabs-nav {
color: @disabled-color;
background: transparent;
cursor: not-allowed;

a {
pointer-events: none;
color: @disabled-color;
}
}
}
}
}
}

.@{tab-prefix-cls} {
&-tab-disabled a {
pointer-events: none;
color: @disabled-color;
}
}

0 comments on commit 1afabd4

Please sign in to comment.