我需要使用Angular材质创建水平和垂直选项卡。谢谢。
我通过应用mat-tab-group
类使用以下SCSS将vertical-tabs
显示为垂直。您可能希望对其进行一些更改,但这应该是一个很好的起点。
mat-tab-group.vertical-tabs {
flex-direction: row !important;
.mat-tab-labels {
flex-direction: column !important;
}
.mat-tab-label {
border: none;
height: auto !important;
padding: 10px !important;
min-width: 0px !important;
justify-content: left !important;
opacity: 1;
border-bottom: 1px solid #eee;
}
.mat-tab-body-wrapper {
flex: 1;
}
.mat-tab-header {
border-bottom: none !important;
border-right: 1px solid #eee;
}
mat-ink-bar {
display: none;
}
}