merge 2.3

This commit is contained in:
star 2018-05-05 17:24:21 +08:00
parent f23eb3752f
commit f8a4d589fb
2 changed files with 2 additions and 23 deletions

View File

@ -134,7 +134,7 @@ layui.use('laydate', function(){
elem: '#test2'
//,format: 'yyyy年MM月dd日'
//,value: new Date(1989,9,14)
,isInitValue: true
,isInitValue: false
,format: 'yyyyMMdd'
,value: '20170910'

View File

@ -18,7 +18,6 @@ layui.define(function(exports){
//构造器
,Class = function(options){
var that = this;
that.config = options || {};
that.config.index = ++laypage.index;
@ -164,7 +163,7 @@ layui.define(function(exports){
}()
//刷新
,refresh: '<span class="layui-laypage-refresh"><i class="layui-icon">&#x1002;</i></span>'
,refresh: '<a href="javascript:;" data-page="'+ config.curr +'" class="layui-laypage-refresh"><i class="layui-icon">&#x1002;</i></a>'
//跳页区域
,skip: function(){
@ -259,24 +258,6 @@ layui.define(function(exports){
});
};
//刷新当前页
Class.prototype.update = function(elem){
if(!elem) return;
var that = this
,config = that.config
,curr = config.curr
,spani = elem[tag]('i')[0];
if(spani){
laypage.on(spani, 'click', function(){
config.curr = curr;
that.render();
console.log(config.curr);
});
}
};
//渲染分页
Class.prototype.render = function(load){
var that = this
@ -304,8 +285,6 @@ layui.define(function(exports){
}
that.skip(elem);
that.update(elem);
};
//外部接口