mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 05:52:43 +08:00
增加 layTable 双击事件
在按钮上加 data-event-dbclick 时,双击 tr 时会触发 click 事件或指定事件。
This commit is contained in:
parent
c15beb5498
commit
95f08f1f8b
@ -107,7 +107,7 @@
|
||||
{{# } }}
|
||||
<!-- {/if} -->
|
||||
{if auth('edit')}
|
||||
<a class="layui-btn layui-btn-sm" data-title="编辑系统菜单" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
|
||||
<a class="layui-btn layui-btn-sm" data-event-dbclick data-title="编辑系统菜单" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
|
||||
{/if}
|
||||
<!-- {else} -->
|
||||
{if auth('remove')}
|
||||
|
@ -769,6 +769,10 @@ $(function () {
|
||||
$table.trigger('render', {height: $(window).height() - $table.next().offset().top - 35})
|
||||
}).trigger('sort', function (rets) {
|
||||
(sort = rets), $table.trigger('reload')
|
||||
}).trigger('rowDouble', function (event) {
|
||||
$(event.tr[0]).find('[data-event-dbclick]').map(function () {
|
||||
$(this).trigger(this.dataset.eventDbclick || 'click', event);
|
||||
});
|
||||
});
|
||||
return $table;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user