[英]i need to add matTooltip in mat-tab without icon angular 8 and angular material is used
有沒有辦法在 mat-tab 中添加沒有圖標的工具提示?
我正在嘗試在 angular 材料 mat-tab 中實現工具提示,但工具提示在沒有 mat-icon 的情況下不起作用
下面是代碼:
<mat-tab label="Application Request" matTooltip="Info about the action" >
引用材料文檔
對於更復雜的標簽,在 mat-tab 中添加一個帶有 mat-tab-label 指令的模板。
<mat-tab-group>
<mat-tab>
<ng-template mat-tab-label>
The <em>best</em> pasta
</ng-template>
<h1>Best pasta restaurants</h1>
<p>...</p>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon>thumb_down</mat-icon> The worst sushi
</ng-template>
<h1>Terrible sushi restaurants</h1>
<p>...</p>
</mat-tab>
</mat-tab-group>
如果您想讓選項卡更復雜,基本上同樣的事情適用於工具提示和任何其他材料組件。
我發現答案工具提示將顯示在跨度代碼中
<span class="sg-mat-txt" matTooltip="Application Request" aria-label="">Application Request</span>
</ng-template>```
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.