mirror of https://github.com/layui/layer
2.0
parent
cfe6ab7801
commit
7a4d9270a6
|
@ -6,7 +6,7 @@
|
|||
> 确认和取消的回调除了yes和cancel外,还可用btn1/btn2。 btn2可解决取消遇右上角关闭共用cancel回调的问题。即如果你只需要接受取消的回调,可以使用 btn2: function(){}
|
||||
|
||||
== 拓展模块 ==
|
||||
> 修复通过<script>标签引入layer.ext.js时,出现Cannot read property 'skin' of undefined的报错问题。(虽然我们更推荐用layer.config()方式加载layer.ext.js)。
|
||||
> 修复通过script标签引入layer.ext.js时,出现Cannot read property 'skin' of undefined的报错问题。(虽然我们更推荐用layer.config()方式加载layer.ext.js)。
|
||||
> 如果相册只有一张图片,则不触发上/下一张。
|
||||
|
||||
|
||||
|
|
|
@ -19,4 +19,4 @@ layer将不再独立战斗,她已经找到了她的国:含苞待放的layui
|
|||
|
||||
|
||||
## 备注
|
||||
[官网](http://layer.layui.com/)、[更新日志](https://github.com/sentsin/layer/blob/master/Update%20Notes.txt)、[社区交流](http://fly.layui.com)
|
||||
[官网](http://layer.layui.com/)、[更新日志](https://github.com/sentsin/layer/blob/2.0/CHANGELOG.md)、[社区交流](http://fly.layui.com)
|
|
@ -515,12 +515,14 @@ Class.pt.callback = function(){
|
|||
//按钮
|
||||
layero.find('.'+ doms[6]).children('a').on('click', function(){
|
||||
var index = $(this).index();
|
||||
config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero);
|
||||
if(index === 0){
|
||||
config.yes ? config.yes(that.index, layero) : layer.close(that.index);
|
||||
} else if(index === 1){
|
||||
cancel();
|
||||
} else {
|
||||
config['btn'+(index+1)] || layer.close(that.index);
|
||||
}
|
||||
config['btn'+(index+1)] ? config['btn'+(index+1)](that.index, layero) : layer.close(that.index);
|
||||
});
|
||||
|
||||
//取消
|
||||
|
|
Loading…
Reference in New Issue