修复新版本对 table reload 造成影响的问题

This commit is contained in:
sentsin
2017-12-07 18:05:10 +08:00
parent 5c40a57297
commit 9ed17a7ef4
5 changed files with 6 additions and 7 deletions

View File

@@ -381,9 +381,8 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
//表格重载
Class.prototype.reload = function(options){
var that = this
,options = that.config;
if(options.data && options.data.constructor === Array) delete that.config.data;
var that = this;
if(that.config.data && that.config.data.constructor === Array) delete that.config.data;
that.config = $.extend({}, that.config, options);
that.render();
};

View File

@@ -143,7 +143,7 @@ layui.define('jquery', function(exports){
//转化为日期格式字符
,toDateString: function(time, format){
var that = this
,date = new Date(time || new Date())
,date = new Date(parseInt(time) || new Date())
,ymd = [
that.digit(date.getFullYear(), 4)
,that.digit(date.getMonth() + 1)