角度材料步进器对我来说有以下问题,我无法从文档中找到这些问题。
- 如何显示任何字符串或 html 而不是步进索引
数字?
- 怎么才能显示mat工具提示当鼠标悬停在任何垫子步骤上时?
我正在使用最新版本材质 角 IO.
不幸的是,现在不可能使用材料中的本机挂钩来覆盖该数字。一种可能的解决方案是使用 css 覆盖该值。
这里我们隐藏当前符号并使用我们自己的文本/符号:
mat-step-header .mat-step-label {
overflow: visible;
}
mat-step-header .mat-step-icon-not-touched span,
mat-step-header .mat-step-icon span,
mat-step-header .mat-step-icon-not-touched .mat-icon,
mat-step-header .mat-step-icon .mat-icon {
display: none;
}
mat-step-header:nth-of-type(1) .mat-step-icon-not-touched:after,
mat-step-header:nth-of-type(1) .mat-step-icon:after {
content: 'New 1';
}
.active-step-1 mat-step-header:nth-of-type(1) .mat-step-icon-not-touched::after,
.active-step-1 mat-step-header:nth-of-type(1) .mat-step-icon::after {
content: 'add_circle' !important; /* name of the material icon */
font-family: 'Material Icons' !important;
font-feature-settings: 'liga' 1;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)