Permalink
Browse files

fix: 修改先在datatable中选中grid中显示状态不对的问题

  • Loading branch information...
1 parent 6490564 commit f2d1769604f69c4aa6e9265b16cd427603b5684b liuyk committed Oct 26, 2016
Showing with 17 additions and 14 deletions.
  1. +9 −6 dist/js/u-grid.js
  2. +5 −5 dist/js/u-grid.min.js
  3. +3 −3 js/gridCompCreate.js
View
@@ -1,5 +1,5 @@
/**
- * tinper-neoui-grid v3.1.4
+ * tinper-neoui-grid v3.1.3
* grid
* author : yonyou FED
* homepage : https://github.com/iuap-design/tinper-neoui-grid#readme
@@ -1946,7 +1946,7 @@
var htmlStr = '<div style="width:' + this.multiSelectWidth + 'px;' + displayStr + '" class="u-grid-content-multiSelect " ><span class="u-grid-checkbox-outline" id="checkbox' + tmpcheck + '" value="1"><span class="u-grid-checkbox-tick-outline"></span></span></div>';
} else {
if (re) {
- var htmlStr = '<div style="width:' + this.multiSelectWidth + 'px;' + displayStr + '" class="u-grid-content-multiSelect checkbox check-success u-grid-content-focus-row" ><span class="u-grid-checkbox-outline" id="checkbox' + tmpcheck + '" value="1"><span class="u-grid-checkbox-tick-outline"></span></span></div>';
+ var htmlStr = '<div style="width:' + this.multiSelectWidth + 'px;' + displayStr + '" class="u-grid-content-multiSelect checkbox check-success u-grid-content-sel-row" ><span class="u-grid-checkbox-outline is-checked" id="checkbox' + tmpcheck + '" value="1"><span class="u-grid-checkbox-tick-outline"></span></span></div>';
} else {
var htmlStr = '<div style="width:' + this.multiSelectWidth + 'px;' + displayStr + '" class="u-grid-content-multiSelect checkbox check-success" ><span class="u-grid-checkbox-outline" id="checkbox' + tmpcheck + '" value="1"><span class="u-grid-checkbox-tick-outline"></span></span></div>';
}
@@ -1964,7 +1964,7 @@
var re = objCompare(rootObj, objAry);
var htmlStr;
if (re) {
- htmlStr = '<div style="width:' + this.numWidth + 'px;" class="u-grid-content-num u-grid-content-focus-row">' + (index + 1) + '</div>';
+ htmlStr = '<div style="width:' + this.numWidth + 'px;" class="u-grid-content-num u-grid-content-sel-row">' + (index + 1) + '</div>';
} else {
htmlStr = '<div style="width:' + this.numWidth + 'px;" class="u-grid-content-num">' + (index + 1) + '</div>';
}
@@ -2082,7 +2082,7 @@
var re = objCompare(rootObj, objAry);
var htmlStr = '';
if (re) {
- htmlStr = '<tr role="row" class="u-grid-content-focus-row" ' + styleStr + '>';
+ htmlStr = '<tr role="row" class="u-grid-content-sel-row" ' + styleStr + '>';
} else {
htmlStr = '<tr role="row" ' + styleStr + '>';
}
@@ -2889,10 +2889,13 @@
};
var initGridCompColumnFun = function initGridCompColumnFun(columnOptions) {
var column = new _column.column(columnOptions, this);
- column.options.optionsWidth = column.options.width + '';
- if (column.options.optionsWidth.indexOf("%") > 0) {
+ var widthStr = column.options.width + '';
+ if (widthStr.indexOf("%") > 0) {
this.options.noScroll = 'true';
+ } else {
+ column.options.width = parseInt(column.options.width);
}
+ column.options.optionsWidth = column.options.width;
column.options.realWidth = column.options.width;
this.gridCompColumnArr.push(column);
this.initGridCompColumnColumnMenuFun(columnOptions);
Oops, something went wrong.

0 comments on commit f2d1769

Please sign in to comment.