當對 mat-card 應用單類系結時,mat-card 類不系結。
<mat-card cdkDropList [className]="getClassName(item)"><!-- some content--></mat-card>
在這種情況下,我們將無法將類名視為 mat-card 并且沒有從材料中應用樣式。

uj5u.com熱心網友回復:
只需使用標準[class]系結,例如
<mat-card cdkDropList [class]="getClassName(item)">
<!-- some content-->
</mat-card>
示例基于來自 docs here的分叉示例。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/491847.html
