[英]How can I move the delete action to the last column in an ng2 smart table?
如何將刪除動作移至“ ng2”智能表的最后一列?
我想要ng2
智能表中表的最后一列中唯一的刪除操作。 有人可以協助我解決這個問題嗎?
我正在使用的表的設置和代碼如下:
this.settings = {
add: {
confirmCreate: true,
addButtonContent: '<i class="fa fa-plus" title="Add"></i>',
createButtonContent: '<i class="fa fa-save" title="Save"></i>',
cancelButtonContent: '<i class="fa fa-remove" title="Cancel"></i>'
},
delete: {
confirmDelete: true,
deleteButtonContent: '<i class="fa fa-trash" title="Delete"></i>'
},
edit: {
confirmSave: true,
editButtonContent: '<i class="fa fa-edit" title="Edit"></i>',
saveButtonContent: '<i class="fa fa-save" title="Save"></i>',
cancelButtonContent: '<i class="fa fa-remove" title="Cancel"></i>'
},
columns: {
logDate: {
title: 'Log Date*',
filter: false,
type: 'custom',
width: '5%',
renderComponent: DatePickerRenderComponent,
editor: {
type: 'custom',
component: DatePickerEditorComponent,
},
},
category: {
filter: false,
title: 'Category*',
type: 'html',
editor: {
type: 'list',
config: {
list: this.customerList,
},
},
},
partId: {
filter: false,
title: 'PN/ID#*'
},
description: {
filter: false,
title: 'Description'
},
ws: {
filter: false,
title: 'WS',
type: 'custom',
renderComponent: CheckboxRenderComponent,
editor: {
type: 'custom',
component: CheckboxEditorComponent
}
};
使用文檔中描述的屬性actions.position
。
actions.position
'left'|'right'
選擇操作列位置
例:
actions.position: 'right',
add: {
confirmCreate: true,
addButtonContent: '<i class="fa fa-plus" title="Add"></i>',
createButtonContent: '<i class="fa fa-save" title="Save"></i>',
cancelButtonContent: '<i class="fa fa-remove" title="Cancel"></i>'
},
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.