diff --git a/build/Table.css b/build/Table.css
index ebeae15..1f299d9 100644
--- a/build/Table.css
+++ b/build/Table.css
@@ -344,10 +344,10 @@
content: "."; }
.u-table-row-expanded:after, .u-table-expanded-row-expanded:after {
content: "\e639";
- font-family: "uf" !important; }
+ font-family: "uf"; }
.u-table-row-collapsed:after, .u-table-expanded-row-collapsed:after {
content: "\e61c";
- font-family: "uf" !important; }
+ font-family: "uf"; }
.u-table-row.selected {
background: #FFF7E7; }
.u-table tr.u-table-expanded-row {
diff --git a/build/TableHeader.js b/build/TableHeader.js
index be8857d..9404273 100644
--- a/build/TableHeader.js
+++ b/build/TableHeader.js
@@ -96,7 +96,7 @@ var TableHeader = function (_Component) {
_this.drag.oldWidth = parseInt(currentObj.style.width);
_this.drag.minWidth = currentObj.style.minWidth != "" ? parseInt(currentObj.style.minWidth) : defaultWidth;
_this.drag.tableWidth = parseInt(_this.table.table.style.width ? _this.table.table.style.width : _this.table.table.scrollWidth);
- console.log(" ----- ", _this.drag);
+ // console.log(" ----- ",this.drag);
if (!_this.tableOldWidth) {
_this.tableOldWidth = _this.drag.tableWidth; //this.getTableWidth();
// console.log(" this.tableOldWidth--- ",this.tableOldWidth);
@@ -156,8 +156,7 @@ var TableHeader = function (_Component) {
var currentCols = _this.table.cols[_this.drag.currIndex];
var diff = event.x - _this.drag.oldLeft;
var newWidth = _this.drag.oldWidth + diff;
- _this.drag.newWidth = newWidth;
-
+ _this.drag.newWidth = newWidth > 0 ? newWidth : _this.minWidth;
// if(newWidth > this.drag.minWidth){
if (newWidth > _this.minWidth) {
currentCols.style.width = newWidth + 'px';
@@ -210,6 +209,8 @@ var TableHeader = function (_Component) {
_this.optTableScroll(_this.table.fixedRightBodyTable, { x: 'auto' });
}
}
+ } else {
+ _this.drag.newWidth = _this.minWidth;
}
} else if (_this.props.draggable && _this.drag.option == "draggable") {
// console.log(" --onTrMouseMove--draggable- ",this.drag.option);
@@ -306,7 +307,7 @@ var TableHeader = function (_Component) {
if (!currentIndex || parseInt(currentIndex) === _this.drag.currIndex) return;
if (target.nodeName.toUpperCase() === "TH") {
// target.style.border = "2px dashed rgba(5,0,0,0.25)";
- target.setAttribute("style", "border:2px dashed rgba(5,0,0,0.25)");
+ target.setAttribute("style", "border-right:2px dashed rgba(5,0,0,0.25)");
// target.style.backgroundColor = 'rgb(235, 236, 240)';
}
};
diff --git a/build/lib/singleSelect.js b/build/lib/singleSelect.js
index 0e8a046..a34e5a9 100644
--- a/build/lib/singleSelect.js
+++ b/build/lib/singleSelect.js
@@ -73,7 +73,7 @@ function singleSelect(Table, Radio) {
onChange: function onChange(value) {
return _this.onRadioChange(value, record, index);
},
- style: { width: '16px', height: '16px', display: 'block', marginLeft: '4px' } },
+ style: { width: '14px', height: '14px', display: 'block', marginLeft: '4px' } },
_react2["default"].createElement(Radio, { value: index })
);
}
@@ -117,8 +117,7 @@ function singleSelect(Table, Radio) {
return _react2["default"].createElement(Table, _extends({}, this.props, {
columns: this.getDefaultColumns(columns),
- data: data,
- height: 40 }));
+ data: data }));
};
return SingleSelect;
diff --git a/build/lib/sum.js b/build/lib/sum.js
index 5987695..d4c452f 100644
--- a/build/lib/sum.js
+++ b/build/lib/sum.js
@@ -106,9 +106,9 @@ function sum(Table) {
return _this;
}
- /**
- * 获取当前的表格类型。
- *
+ /**
+ * 获取当前的表格类型。
+ *
*/
diff --git a/build/lib/util.js b/build/lib/util.js
index 9ea2e19..8d6a331 100644
--- a/build/lib/util.js
+++ b/build/lib/util.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -9,71 +9,71 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
exports.sortBy = sortBy;
exports.compare = compare;
exports.ObjectAssign = ObjectAssign;
-/*
-* 快速排序,按某个属性,或按“获取排序依据的函数”,来排序.
-* @method soryBy
-* @static
-* @param {array} arr 待处理数组
-* @param {string|function} prop 排序依据属性,获取
-* @param {boolean} desc 降序
-* @return {array} 返回排序后的新数组
+/*
+* 快速排序,按某个属性,或按“获取排序依据的函数”,来排序.
+* @method soryBy
+* @static
+* @param {array} arr 待处理数组
+* @param {string|function} prop 排序依据属性,获取
+* @param {boolean} desc 降序
+* @return {array} 返回排序后的新数组
*/
function sortBy(arr, prop, desc) {
- var props = [],
- ret = [],
- i = 0,
- len = arr.length;
- if (typeof prop == 'string') {
- for (; i < len; i++) {
- var oI = arr[i];
- (props[i] = new String(oI && oI[prop] || ''))._obj = oI;
- }
- } else if (typeof prop == 'function') {
- for (; i < len; i++) {
- var _oI = arr[i];
- (props[i] = new String(_oI && prop(_oI) || ''))._obj = _oI;
- }
- } else {
- throw '参数类型错误';
+ var props = [],
+ ret = [],
+ i = 0,
+ len = arr.length;
+ if (typeof prop == 'string') {
+ for (; i < len; i++) {
+ var oI = arr[i];
+ (props[i] = new String(oI && oI[prop] || ''))._obj = oI;
}
- props.sort();
- for (i = 0; i < len; i++) {
- ret[i] = props[i]._obj;
+ } else if (typeof prop == 'function') {
+ for (; i < len; i++) {
+ var _oI = arr[i];
+ (props[i] = new String(_oI && prop(_oI) || ''))._obj = _oI;
}
- if (desc) ret.reverse();
- return ret;
+ } else {
+ throw '参数类型错误';
+ }
+ props.sort();
+ for (i = 0; i < len; i++) {
+ ret[i] = props[i]._obj;
+ }
+ if (desc) ret.reverse();
+ return ret;
};
-/**
- * 数组对象排序
- * console.log(arr.sort(compare('age')))
- * @param {} property
+/**
+ * 数组对象排序
+ * console.log(arr.sort(compare('age')))
+ * @param {} property
*/
function compare(property) {
- return function (a, b) {
- var value1 = a[property];
- var value2 = b[property];
- return value1 - value2;
- };
+ return function (a, b) {
+ var value1 = a[property];
+ var value2 = b[property];
+ return value1 - value2;
+ };
}
-/**
- * 简单数组数据对象拷贝
- * @param {*} obj 要拷贝的对象
+/**
+ * 简单数组数据对象拷贝
+ * @param {*} obj 要拷贝的对象
*/
function ObjectAssign(obj) {
- var b = obj instanceof Array;
- var tagObj = b ? [] : {};
- if (b) {
- //数组
- obj.forEach(function (da) {
- var _da = {};
- _extends(_da, da);
- tagObj.push(_da);
- });
- } else {
- _extends(tagObj, obj);
- }
- return tagObj;
+ var b = obj instanceof Array;
+ var tagObj = b ? [] : {};
+ if (b) {
+ //数组
+ obj.forEach(function (da) {
+ var _da = {};
+ _extends(_da, da);
+ tagObj.push(_da);
+ });
+ } else {
+ _extends(tagObj, obj);
+ }
+ return tagObj;
}
\ No newline at end of file
diff --git a/build/render/CheckboxRender.js b/build/render/CheckboxRender.js
index 8473356..1e4ba25 100644
--- a/build/render/CheckboxRender.js
+++ b/build/render/CheckboxRender.js
@@ -19,11 +19,11 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-/**
- * 渲染checkbox
- * @param Checkbox
- * @param Icon
- * @returns {CheckboxRender}
+/**
+ * 渲染checkbox
+ * @param Checkbox
+ * @param Icon
+ * @returns {CheckboxRender}
*/
function renderCheckbox(Checkbox, Icon) {
return function (_Component) {
diff --git a/build/render/InputRender.js b/build/render/InputRender.js
index 04c7002..68f898d 100644
--- a/build/render/InputRender.js
+++ b/build/render/InputRender.js
@@ -28,12 +28,12 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-/**
- * 渲染输入框
- * @param Form
- * @param Input
- * @param Icon
- * @returns {InputRender}
+/**
+ * 渲染输入框
+ * @param Form
+ * @param Input
+ * @param Icon
+ * @returns {InputRender}
*/
function renderInput(Form, Input, Icon) {
var _class, _temp2;
diff --git a/build/render/SelectRender.js b/build/render/SelectRender.js
index a1d55db..d72159b 100644
--- a/build/render/SelectRender.js
+++ b/build/render/SelectRender.js
@@ -26,11 +26,11 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-/**
- * 渲染下拉框
- * @param Select
- * @param Icon
- * @returns {SelectRender}
+/**
+ * 渲染下拉框
+ * @param Select
+ * @param Icon
+ * @returns {SelectRender}
*/
function renderSelect(Select, Icon) {
var _class, _temp2;
diff --git a/demo/index.js b/demo/index.js
index 7bd9a54..f4529b5 100644
--- a/demo/index.js
+++ b/demo/index.js
@@ -8,7 +8,7 @@ import Button from '../src';
-var Demo0101 = require("./demolist/Demo0101");var Demo0102 = require("./demolist/Demo0102");var Demo0103 = require("./demolist/Demo0103");var Demo0104 = require("./demolist/Demo0104");var Demo0105 = require("./demolist/Demo0105");var Demo0106 = require("./demolist/Demo0106");var Demo0107 = require("./demolist/Demo0107");var Demo0201 = require("./demolist/Demo0201");var Demo0202 = require("./demolist/Demo0202");var Demo0301 = require("./demolist/Demo0301");var Demo0302 = require("./demolist/Demo0302");var Demo0402 = require("./demolist/Demo0402");var Demo0404 = require("./demolist/Demo0404");var Demo0405 = require("./demolist/Demo0405");var Demo0501 = require("./demolist/Demo0501");var Demo0502 = require("./demolist/Demo0502");var Demo0503 = require("./demolist/Demo0503");var Demo0505 = require("./demolist/Demo0505");var Demo0601 = require("./demolist/Demo0601");var Demo0602 = require("./demolist/Demo0602");var Demo0603 = require("./demolist/Demo0603");var Demo0701 = require("./demolist/Demo0701");var Demo0702 = require("./demolist/Demo0702");var Demo0802 = require("./demolist/Demo0802");var Demo0901 = require("./demolist/Demo0901");var Demo0902 = require("./demolist/Demo0902");var Demo0903 = require("./demolist/Demo0903");var Demo1001 = require("./demolist/Demo1001");var Demo1002 = require("./demolist/Demo1002");var Demo1101 = require("./demolist/Demo1101");var Demo1102 = require("./demolist/Demo1102");var Demo1103 = require("./demolist/Demo1103");var Demo1105 = require("./demolist/Demo1105");var Demo1106 = require("./demolist/Demo1106");var Demo1107 = require("./demolist/Demo1107");var Demo1108 = require("./demolist/Demo1108");var Demo1201 = require("./demolist/Demo1201");var Demo1301 = require("./demolist/Demo1301");var Demo1302 = require("./demolist/Demo1302");var Demo1401 = require("./demolist/Demo1401");var Demo1402 = require("./demolist/Demo1402");var Demo1403 = require("./demolist/Demo1403");var Demo1404 = require("./demolist/Demo1404");var Demo1601 = require("./demolist/Demo1601");var DemoArray = [{"example":
{ title }
\n{ desc }
\n 查看源码 \n\n { code }
\n
\n {!!scss_code ?\n { scss_code }
\n
: null }\n