在項目所對應的js文件中的
table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'id', columns: [ {field: 'operate', title: __('Operate'), table: table, buttons:[ { name: 'detail', title:'詳情', icon: 'fa fa-list', classname: 'btn btn-info btn-xs btn-detail btn-dialog', url: 'partner_e/showlist'//你自己的地址 }, }]
其中URL默認帶此行的id:...../partner_e/showlist/ids/1
如果是點擊操作欄中某一操作按鈕,在控制器中input("ids")接收id即可