$.modal({ title: '标题', text: '内容',
buttons[
{ text:'取消',
},
{ text:'确认', onClick:function(){
....
}
}
]
})buttons里面有4个参数,text,bold,close,onClick;close默认值是true,如果为false就关闭怎么在onClick里把close的值改成false
1 回答

繁星coding
TA贡献1797条经验 获得超4个赞
两个办法:
1.修改源码,修改源文件的$.modal
方法,将close
的默认值改为false
2.在你的私有文件重写$.modal
方法
$.modal = function(opt) { var opts = $.extend(true, {close: false}, opt); return $.modal(opts); }
具体怎么操作看你的业务需求,如果希望全站修改,那改公用的方法肯定是最好的,使用方法1;如果只是某一个页面需要,那就用第二种方法。
添加回答
举报
0/150
提交
取消