是否可以将左边的复选框放在棱角分明的材料垫列表选项中?

问题描述 投票:1回答:1

mat-list控件的特色在于:https://material.angular.io/components/list/overview

是否可以使用前面的复选框启动列表项(而不是由于默认值而在末尾进行后缀)?

我试过这个,但没有运气!

/* mat-list: atempt to move the checkboxes to the far left */
.mat-pseudo-checkbox {
  left: 0 !important;
}
angular angular-material
1个回答
14
投票

每个组件都有一个API部分,为您提供其他功能:

https://material.angular.io/components/list/api#MatListOption

<mat-list-option checkboxPosition="before"></mat-list-option>
© www.soinside.com 2019 - 2024. All rights reserved.