gpt4 book ai didi

html - 如何使用图标代替 ng2 智能表的按钮

转载 作者:行者123 更新时间:2023-11-27 23:25:44 25 4
gpt4 key购买 nike

我正在使用 ng2 智能表,我想使用图标而不是按钮来添加新行、编辑、删除、更新、创建、取消按钮。我还想将表中的一列设为复选框,但我不是确定该怎么做。请有人尽快给我建议一个解决方案。

最佳答案

您可以在表格设置的 ButtonContent 中只使用图标标签而不是文本

settings = {
delete: {
confirmDelete: true,

deleteButtonContent: '<i class="fa fa-trash" style="font-size:32px"></i>',
saveButtonContent: 'save',
cancelButtonContent: 'cancel',

},
add: {
confirmCreate: true,
addButtonContent:'<i class="fa fa-plus" style="font-size:32px"></i>'
},
edit: {
confirmSave: true,
editButtonContent:'<i class="fa fa-edit" style="font-size:32px"></i>'
},
columns: {
id: {
title: 'ID',
},
name: {
title: 'Full Name',
},
username: {
title: 'User Name',
},
email: {
title: 'Email',
},
},
};

Click here to view example

关于html - 如何使用图标代替 ng2 智能表的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57790123/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com