我无法在 ng2-smart-table
的 actions
选项卡上显示自定义图标。我已经安装了来自 Akevo Team
的 Eva
图标,并且我想使用它们。我已更改编辑按钮以显示一些自定义图标,但问题是没有出现任何内容。在删除的左侧,必须出现一个画笔图标。
这是有问题的图像:
这是代码:
settings = {
edit: {
editButtonContent: '<nb-icon icon="brush"></nb-icon>',
saveButtonContent: '<nb-icon icon="checkmark"></nb-icon>',
cancelButtonContent: '<nb-icon icon="close-circle"></nb-icon>'
},
columns: {
device: {
title: 'Device',
sortDirection: 'asc'
},
type: {
title: 'Type',
sort: false,
filter: false
},
serialNumber: {
title: 'Serial Number'
},
status: {
title: 'Status'
}
}
};
最佳答案
试试这个:
settings = {
hideSubHeader: true,
actions: {
custom: [
{
name: 'edit',
title: '<nb-icon icon="brush"></nb-icon>'
},
{
name: 'save',
title: '<nb-icon icon="checkmark"></nb-icon>'
},
{
name: 'cancel',
title: '<nb-icon icon="close-circle"></nb-icon>'
}
],
add: false,
edit: false,
delete: false
}
...
};
希望这对您有用!
关于css - 如何在 ng2-smart-table 上显示自定义图标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57036330/