mirror of https://gitee.com/karson/fastadmin.git
Fast.api.open新增一个成功回调方法,监听窗口打开完毕后执行事件
新增一个回调方法,监听窗口打开完成了,然后就可以操作窗口内的元素了,例如往窗口内写入数据等
例如:
Fast.api.open('./test/test.html','打开窗口',{
successCallback:function(index){
console.log('窗口打开完成,成功回调,然后可以操作窗口内的元素了');
var frame = Layer.getChildFrame('html', index);
frame.find('[name="row[name]"]').val("写入内容")
}
})
Signed-off-by: Simon <siri@51siny.com>
pull/456/head
parent
6f35aff2eb
commit
cf59da8111
|
|
@ -143,6 +143,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine
|
|||
area: area,
|
||||
content: url,
|
||||
zIndex: Layer.zIndex,
|
||||
successCallback:null,
|
||||
success: function (layero, index) {
|
||||
var that = this;
|
||||
//存储callback事件
|
||||
|
|
@ -176,6 +177,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine
|
|||
// observer.disconnect();
|
||||
}
|
||||
}
|
||||
that.successCallback && that.successCallback(index)
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue