Meteor 防止语义UI模式通过关闭图标关闭
我可以通过设置Meteor 防止语义UI模式通过关闭图标关闭,meteor,semantic-ui,Meteor,Semantic Ui,我可以通过设置closable:false来防止模式按照关闭。但是,如果我在html中包含一个关闭图标,那么不管发生什么,它都不会被当作拒绝操作,而是继续关闭模式 我认为这是因为模态的外观如下所示: selector : { close : '.close, .actions .button', approve : '.actions .positive, .actions .approve, .actions .ok', deny : '.actions .
closable:false
来防止模式按照关闭。但是,如果我在html中包含一个关闭图标,那么不管发生什么,它都不会被当作拒绝操作,而是继续关闭模式
我认为这是因为模态的外观如下所示:
selector : {
close : '.close, .actions .button',
approve : '.actions .positive, .actions .approve, .actions .ok',
deny : '.actions .negative, .actions .deny, .actions .cancel'
},
您可以看到,.close
不在拒绝选择器中
那么如何让
.close
图标触发onDeny回调呢?(注意。我尝试在.actions
类中包装.close.icon
,但这打破了模式。)我认为您可以在初始化模块时更改设置。我在这里试过
$('.modal').modal({
selector: {
close: '.actions .button',
deny: '.actions .negative, .actions .deny, .actions .cancel, .close'
},
// ...
}