The checkbox: true
}, {
Field: 'id',
Title: 'id'
}, {
Field: 'role_id,
Title: 'role_id'
}, {
Field: 'resource_id',
Title: 'resource_id'
}, {
Title: 'operation',
Field: 'id',
Align: 'center',
Events: window. OperatEvents={
'click. Mod: function (e, the value, the row index) {
Alert (' A ');
}
},
The formatter: function (the value, the row, the index) {
Return [
'& lt; A. & gt; Modify & lt;/a> '
'& lt; A data - toggle="delete" & gt; & lt; I & gt; & lt;/i> Delete & lt;/a> '
]. Join (");
},
CellStyle: {
CSS: {" width ":" 20% "}
},
}]
Why doesn't my events
CodePudding user response:
Window. OperateEvents best written separately, because the window. The operateEvents should make the registration statement in front of the tableCodePudding user response:
https://www.jb51.net/article/123134.htmCodePudding user response:
Because you keep up with the field of value to theField: 'id',
Title: 'id'
Overlap, so you don't perform, the operation of the field to others, such as cc
CodePudding user response:
Upstairs truth!!!!!!CodePudding user response:
Why my event never executed, it before, but also wrote a statement window. OperationEvent={}Event: operationEvent,
The formatter: addDownLord
OperationEvent error, says it is not a statement
Then I wrote also doesn't work, the click event never come in
Event: the window operationEvent={
'click. Btn_delete: function (a, e, the value, the row index) {the console. The log (111)},
'click. Btn_down: function (a, e, the value, the row index) {the console. The log (222)}
},
The formatter: addDownLord
}
CodePudding user response:
Execution order problems consult code:Window. OperateEvents={
'click. Like: function (e, the value, the row index) {
Alert (' You click the like the action, the row: "+ JSON. The stringify (row))
},
'click. Remove' : function (e, the value, the row, the index) {
$table. BootstrapTable (' remove '{
Field: 'id',
Values: [row id]
})
}
}
//page with form fit PageList
controlVar $table=new PageList (" # table ", {
SidePagination: "the client",//client client pages
DataField: "obj",//data field
The columns: [
{the checkbox: true, visible: true},
{the title: 'number' field: 'bh},
{the title: 'name' field: 'xm'},
{the title: 'military security Numbers, field:' JRBZKH},
{the title: 'gender' field: 'xb},
{the title: 'don't post department', the field: 'BZB'},
{
Field: 'id',
Title: 'operation',
Align: 'center',
ClickToSelect: false,
Events: window operateEvents,
The formatter: operateFormatter
}
],
Url: the Conf. Interfaces. PERSONNEL
});