调用
Avatar::make()
使用示例
$grid
->column('user.avatar', '头像', 'user_id')
->component(Avatar::make()->size('small'));
属性
调用方法 | 描述 | 类型 | 可选值 | 默认 |
---|---|---|---|---|
icon(“xxx”) | 设置头像的图标类型,参考 Icon 组件 | string | ||
size(50) | 设置头像的大小 | number/string | number / large / medium / small | small |
shape(“circle”) | 设置头像的形状 | string | circle / square | circle |
fit(“cover”) | 当展示类型为图片的时候,设置图片如何适应容器框 | string | fill / contain / cover / none / scale-down | cover |