bootstrap-table給每一行數據添加按鈕,並綁定事件


https://blog.csdn.net/mht1829/article/details/72633100

https://blog.csdn.net/qq_39215166/article/details/74452366

{
			field: 'operate',
			title: '操作',
			width: '80px',
			events: operateEvents1,
			formatter: operateFormatter
		},

  

window.operateEvents={
    //修改
    "click #btnEditPicGroupDetail":function (e, value, row, index) {
        var rows = $('#table-picManager').bootstrapTable('getSelections');
}

  

function operateFormatter(value, row, index) {
    return [
        '<div class="btn-group">',
        '<button id="btnEditPicGroupDetail" type="button" class="btn btn-default"  singleSelected=true>修改</button>',
        '<button id="btnUpMove" type="button" class="btn btn-default" singleSelected=true>上移</button>',
        '<button id="btnDownMove" type="button" class="btn btn-default" singleSelected=true>下移</button>',
        '</div>'
    ].join('');
}

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM