可以回到列表
button += render('tmp_button', {tmp_class: 'btn btn-xs btn-info', title: '管理', url: global.url+'?op=custom', target: ""});
<thead>
<tr>
<? for(let i in stru){ ?>
<th
data-field='<?= stru[i]['form_name']?>'
data-sortable='true'
data-align='left'
data-width=''
data-visible='true'
>
<?= stru[i]['title']?>
</th>
<? } ?>
<th
data-field='operate'
data-sortable='false'
data-align='center'
data-width='150'
data-clickToSelect='false'
data-events='window.operateEvents'
data-formatter='operateFormatter'>
<a href="<?= global['url'] ?>?op=form_custom" class="" title='新增'>
<i class="bi bi-file-earmark-plus"></i>
</a>
</th>
</tr>
</thead>
2. window.operateEvents row[0] 改為 row['sn']
window.operateEvents = {
'click .show': function (e, value, row, index) {//顯示單筆
alert('查詢');//
},
'click .edit': function (e, value, row, index) {
top.location.href='<?= global.url ?>?op=form_custom&sn='+row['sn']
},
'click .delete': function (e, value, row, index) {
alert('刪除');
}
}