提交 dcaeebc9 编写于 作者: C Catouse

* fix render error when scroll bar not in default position.

上级 6406479c
/*! /*!
* ZUI: 数据表格② - v1.8.1 - 2018-02-05 * ZUI: 数据表格② - v1.8.1 - 2018-03-16
* http://zui.sexy * http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git * GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2018 cnezsoft.com; Licensed MIT * Copyright (c) 2018 cnezsoft.com; Licensed MIT
......
/*! /*!
* ZUI: 数据表格② - v1.8.1 - 2018-02-05 * ZUI: 数据表格② - v1.8.1 - 2018-03-21
* http://zui.sexy * http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git * GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2018 cnezsoft.com; Licensed MIT * Copyright (c) 2018 cnezsoft.com; Licensed MIT
...@@ -628,8 +628,8 @@ ...@@ -628,8 +628,8 @@
that.pager = pager; that.pager = pager;
if (oldPager.page !== pager.page || oldPager.recTotal !== pager.recTotal || oldPager.recPerPage !== pager.recPerPage) { if (oldPager.page !== pager.page || oldPager.recTotal !== pager.recTotal || oldPager.recPerPage !== pager.recPerPage) {
that.layout.cols = null;
that.scroll(0, 0); that.scroll(0, 0);
that.layout.cols = null;
} }
return that; return that;
}; };
...@@ -1146,6 +1146,7 @@ ...@@ -1146,6 +1146,7 @@
value = valueOperator.getter(value, cell, that); value = valueOperator.getter(value, cell, that);
} }
} }
if (value === undefined) value = '';
cell.value = value; cell.value = value;
cell.type = type; cell.type = type;
var spanMap = that.layout.spanMap; var spanMap = that.layout.spanMap;
...@@ -1311,9 +1312,8 @@ ...@@ -1311,9 +1312,8 @@
if (isCheckbox) { if (isCheckbox) {
var $checkbox = $cell.find('.datagrid-checkbox'); var $checkbox = $cell.find('.datagrid-checkbox');
if (!$checkbox.length) { if (!$checkbox.length) {
$checkbox = $('<div class="checkbox-primary datagrid-checkbox"><label></label></div>').prependTo($cell.addClass('datagrid-has-checkbox')); $checkbox = $('<div class="checkbox-primary datagrid-checkbox"><label class="content"></label></div>').prependTo($cell.addClass('datagrid-has-checkbox'));
} }
$cell.append('<span class="content"></span>');
} }
} }
......
/*! /*!
* ZUI: 数据表格② - v1.8.1 - 2018-02-05 * ZUI: 数据表格② - v1.8.1 - 2018-03-16
* http://zui.sexy * http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git * GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2018 cnezsoft.com; Licensed MIT * Copyright (c) 2018 cnezsoft.com; Licensed MIT
......
...@@ -399,8 +399,8 @@ ...@@ -399,8 +399,8 @@
that.pager = pager; that.pager = pager;
if (oldPager.page !== pager.page || oldPager.recTotal !== pager.recTotal || oldPager.recPerPage !== pager.recPerPage) { if (oldPager.page !== pager.page || oldPager.recTotal !== pager.recTotal || oldPager.recPerPage !== pager.recPerPage) {
that.layout.cols = null;
that.scroll(0, 0); that.scroll(0, 0);
that.layout.cols = null;
} }
return that; return that;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册