update
This commit is contained in:
@@ -459,7 +459,10 @@ layui.define('jquery', function(exports){
|
||||
Element.prototype.render = Element.prototype.init;
|
||||
|
||||
var element = new Element(), dom = $(document);
|
||||
element.render();
|
||||
|
||||
$(function(){
|
||||
element.render();
|
||||
});
|
||||
|
||||
var TITLE = '.layui-tab-title li';
|
||||
dom.on('click', TITLE, call.tabClick); //Tab切换
|
||||
|
||||
@@ -699,7 +699,9 @@ layui.define('layer', function(exports){
|
||||
var form = new Form()
|
||||
,$dom = $(document), $win = $(window);
|
||||
|
||||
form.render();
|
||||
$(function(){
|
||||
form.render();
|
||||
});
|
||||
|
||||
//表单reset重置渲染
|
||||
$dom.on('reset', ELEM, function(){
|
||||
|
||||
@@ -393,16 +393,21 @@
|
||||
});
|
||||
};
|
||||
|
||||
//设置HTML内容
|
||||
//设置或获取 HTML 内容
|
||||
LAY.prototype.html = function(html){
|
||||
return this.each(function(index, item){
|
||||
var that = this;
|
||||
return html === undefined ? function(){
|
||||
if(that.length > 0) return that[0].innerHTML;
|
||||
}() : this.each(function(index, item){
|
||||
item.innerHTML = html;
|
||||
});
|
||||
};
|
||||
|
||||
//设置值
|
||||
//设置或获取值
|
||||
LAY.prototype.val = function(value){
|
||||
return this.each(function(index, item){
|
||||
return value === undefined ? function(){
|
||||
if(that.length > 0) return that[0].value;
|
||||
}() : this.each(function(index, item){
|
||||
item.value = value;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user