diff --git a/examples/laydate.html b/examples/laydate.html index f7821720..2214be95 100644 --- a/examples/laydate.html +++ b/examples/laydate.html @@ -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' diff --git a/src/lay/modules/laypage.js b/src/lay/modules/laypage.js index 6835e989..b391a6d7 100644 --- a/src/lay/modules/laypage.js +++ b/src/lay/modules/laypage.js @@ -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: '' + ,refresh: '' //跳页区域 ,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); }; //外部接口