mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
增加 layTable 双击事件
在按钮上加 data-event-dbclick 时,双击 tr 时会触发 click 事件或指定事件。
This commit is contained in:
parent
c15beb5498
commit
95f08f1f8b
@ -107,7 +107,7 @@
|
|||||||
{{# } }}
|
{{# } }}
|
||||||
<!-- {/if} -->
|
<!-- {/if} -->
|
||||||
{if auth('edit')}
|
{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}
|
{/if}
|
||||||
<!-- {else} -->
|
<!-- {else} -->
|
||||||
{if auth('remove')}
|
{if auth('remove')}
|
||||||
|
@ -769,6 +769,10 @@ $(function () {
|
|||||||
$table.trigger('render', {height: $(window).height() - $table.next().offset().top - 35})
|
$table.trigger('render', {height: $(window).height() - $table.next().offset().top - 35})
|
||||||
}).trigger('sort', function (rets) {
|
}).trigger('sort', function (rets) {
|
||||||
(sort = rets), $table.trigger('reload')
|
(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;
|
return $table;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user