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

时间:2017-12-25 16:56:36

标签: angular angular-material

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;
}

1 个答案:

答案 0 :(得分:14)

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

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

18,11): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<Pick<Props, "dispatch" | "scratchPadActi...'.
  Type '{}' is not assignable to type 'Readonly<Pick<Props, "dispatch" | "scratchPadActions" | "scratchData" | "errorMessage" | "errorDa...'.
    Property 'dispatch' is missing in type '{}'.