mirror of
https://gitee.com/layui/layui.git
synced 2025-08-23 22:11:38 +08:00
新增 dropdown.close(id)
方法,用于关闭对应的实例面板
This commit is contained in:
parent
7754061ee2
commit
af3dba31ae
@ -531,8 +531,17 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){
|
|||||||
});
|
});
|
||||||
|
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
// 关闭面板
|
||||||
|
dropdown.close = function(id){
|
||||||
|
var that = thisModule.getThis(id);
|
||||||
|
if(!that) return this;
|
||||||
|
|
||||||
|
that.remove();
|
||||||
|
return thisModule.call(that);
|
||||||
|
};
|
||||||
|
|
||||||
//重载实例
|
// 重载实例
|
||||||
dropdown.reload = function(id, options){
|
dropdown.reload = function(id, options){
|
||||||
var that = thisModule.getThis(id);
|
var that = thisModule.getThis(id);
|
||||||
if(!that) return this;
|
if(!that) return this;
|
||||||
@ -541,7 +550,7 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){
|
|||||||
return thisModule.call(that);
|
return thisModule.call(that);
|
||||||
};
|
};
|
||||||
|
|
||||||
//核心入口
|
// 核心入口
|
||||||
dropdown.render = function(options){
|
dropdown.render = function(options){
|
||||||
var inst = new Class(options);
|
var inst = new Class(options);
|
||||||
return thisModule.call(inst);
|
return thisModule.call(inst);
|
||||||
|
Loading…
Reference in New Issue
Block a user