pull/18/head
sentsin 2015-09-02 08:53:51 +08:00
parent cfe6ab7801
commit 7a4d9270a6
4 changed files with 6 additions and 4 deletions

View File

@ -6,7 +6,7 @@
> 确认和取消的回调除了yes和cancel外还可用btn1/btn2。 btn2可解决取消遇右上角关闭共用cancel回调的问题。即如果你只需要接受取消的回调可以使用 btn2: function(){}
== 拓展模块 ==
> 修复通过<script>layer.ext.jsCannot read property 'skin' of undefinedlayer.config()layer.ext.js
> 修复通过script标签引入layer.ext.js时出现Cannot read property 'skin' of undefined的报错问题。虽然我们更推荐用layer.config()方式加载layer.ext.js
> 如果相册只有一张图片,则不触发上/下一张。

View File

@ -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)

File diff suppressed because one or more lines are too long

View File

@ -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);
});
//取消