diff --git a/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js b/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js index 19da81a8..d8016f21 100644 --- a/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js +++ b/src/admin/Bootstrap.Admin/wwwroot/lib/longbow/longbow.common.js @@ -517,6 +517,10 @@ var defaultVal = this.$element.attr('data-default-val') || ''; if (defaultVal === '') this.$element.prop('checked', true); oldFunc.call(this); + this.$toggle.on('touchend', function (e) { + $(this).trigger('click.bs.toggle'); + e.preventDefault(); + }); } } @@ -574,11 +578,5 @@ $('.date').lgbDatePicker().on('show hide', function (e) { e.stopPropagation(); }); - - // 移动设备支持 bootstrap-toggle 扩展 - $('[data-toggle="toggle"]').on('touchend', function (e) { - $(this).trigger('click.bs.toggle'); - e.preventDefault(); - }); }); })(jQuery); \ No newline at end of file