mirror of
https://gitee.com/layui/layui.git
synced 2025-05-04 04:38:01 +08:00
优化 table 的 radio 事件,当 disabled
状态时不触发
This commit is contained in:
parent
c7f4864669
commit
c0dac535d1
@ -2130,6 +2130,8 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
|||||||
var checked = radio[0].checked;
|
var checked = radio[0].checked;
|
||||||
var index = radio.parents('tr').eq(0).data('index');
|
var index = radio.parents('tr').eq(0).data('index');
|
||||||
|
|
||||||
|
if(radio[0].disabled) return;
|
||||||
|
|
||||||
// 单选框选中状态
|
// 单选框选中状态
|
||||||
that.setRowChecked({
|
that.setRowChecked({
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
@ -2138,7 +2140,8 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
|||||||
|
|
||||||
// 事件
|
// 事件
|
||||||
layui.event.call(
|
layui.event.call(
|
||||||
radio[0], MOD_NAME, 'radio('+ filter +')',
|
radio[0],
|
||||||
|
MOD_NAME, 'radio('+ filter +')',
|
||||||
commonMember.call(radio[0], {
|
commonMember.call(radio[0], {
|
||||||
checked: checked
|
checked: checked
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user