内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
我用的是DataTables jQuery插件并在行上设置单击处理程序,单击如下所示:
$('#dt tbody tr').click(function () { alert('e'); });
这对于DataTables结果的第一页非常有效。
但是,当我移动到另一页结果时,单击处理程序将不再注册。
我的假设是DataTables代码停止了click
事件,但由于这只发生在第一个事件之后的页面上,这似乎不寻常。
下面是我使用DataTables为隐藏行函数提供的示例进行的修复。
$(document).ready(function() { /* * Insert a 'details' column to the table */ var nCloneTh = document.createElement( 'th' ); var nCloneTd = document.createElement( 'td' ); nCloneTd.innerHTML = '<img src="../examples_support/details_open.png">'; nCloneTd.className = "center"; /* CHANGE: Remove all the expand control elements we may have added earlier * or else you'll add a new column for every postback */ $('.expand-control').remove(); /* * CHANGE: Add the expand-control class to these elements, * so we can remove them after a postback */ $(nCloneTh).addClass('expand-control'); $(nCloneTd).addClass('expand-control'); $('#example thead tr').each( function () { this.insertBefore( nCloneTh, this.childNodes[0] ); } ); $('#example tbody tr').each( function () { this.insertBefore( nCloneTd.cloneNode( true ), this.childNodes[0] ); } ); /* * Initialse DataTables, with no sorting on the 'details' column */ var oTable = $('#example').dataTable( { "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], "aaSorting": [[1, 'asc']] }); /* Add event listener for opening and closing details * Note that the indicator for showing * which row is open is not controlled by DataTables, * rather it is done here */ /* CHANGE: Here I use jQuery.dataTable.$ instead of * jQuery('#example tbody td img'), * this is what preserves the event handler on the 2nd (etc) * pages after a postback * Note the use of on instead of live, recommended over live as of 1.7 */ oTable.$('tr').find('img').on('click', function () { var nTr = $(this).parents('tr')[0]; if ( oTable.fnIsOpen(nTr) ) { /* This row is already open - close it */ this.src = "../examples_support/details_open.png"; oTable.fnClose( nTr ); } else { /* Open this row */ this.src = "../examples_support/details_close.png"; oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' ); } } ); } );
目前呼叫中心只有API文档,需要用户自己开发。如果用户需要saas系统的呼叫中心可以使用智能外呼机器人:https://cloud.tencent.com/product/ccsr
你有没有调整观众端表现,即通过对 LivePushConfig 中的homeOrientation设置项进行配置,它控制的是观众端看到的视频宽高比是16:9还是6:19,调整后的结果可以用播放器查看以确认是否符合预期。
控制台使用的是新的接口,批量创建子网,https://cloud.tencent.com/document/product/215/31960,可以指定路由表。terraform开发的时候是基于api2.0开发的,还没有这个接口,因此暂时无法使用