示例样式调整
This commit is contained in:
parent
a67e557d7e
commit
cca227f9ba
|
@ -4,7 +4,7 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: 1.5;
|
line-height: 1.33;
|
||||||
overflow: hidden; }
|
overflow: hidden; }
|
||||||
.u-table-body {
|
.u-table-body {
|
||||||
position: relative; }
|
position: relative; }
|
||||||
|
@ -47,13 +47,15 @@
|
||||||
background: rgb(235, 236, 240); }
|
background: rgb(235, 236, 240); }
|
||||||
.u-table th,
|
.u-table th,
|
||||||
.u-table td {
|
.u-table td {
|
||||||
padding: 12px 8px;
|
padding: 12px 16px;
|
||||||
word-break: break-all; }
|
word-break: break-all; }
|
||||||
.u-table tr.filterable th {
|
.u-table tr.filterable th {
|
||||||
padding-top: 5px !important;
|
padding-top: 5px !important;
|
||||||
padding-bottom: 5px !important; }
|
padding-bottom: 5px !important; }
|
||||||
.u-table tr.filterable th .filterContext {
|
.u-table tr.filterable th .filterContext {
|
||||||
height: 35px; }
|
height: 35px; }
|
||||||
|
.u-table tr.filterable th .u-select-selection--single {
|
||||||
|
height: 26px; }
|
||||||
.u-table-row-hover {
|
.u-table-row-hover {
|
||||||
background: rgb(235, 236, 240); }
|
background: rgb(235, 236, 240); }
|
||||||
.u-table-scroll {
|
.u-table-scroll {
|
||||||
|
@ -80,7 +82,7 @@
|
||||||
background: rgb(241, 242, 245);
|
background: rgb(241, 242, 245);
|
||||||
color: rgb(33, 33, 33); }
|
color: rgb(33, 33, 33); }
|
||||||
.u-table.fixed-height td {
|
.u-table.fixed-height td {
|
||||||
padding: 0px 8px; }
|
padding: 0px 16px; }
|
||||||
.u-table-fixed-header .u-table-body {
|
.u-table-fixed-header .u-table-body {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative; }
|
position: relative; }
|
||||||
|
@ -98,17 +100,17 @@
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
box-sizing: border-box; }
|
box-sizing: border-box; }
|
||||||
.u-table-title {
|
.u-table-title {
|
||||||
padding: 12px 8px;
|
padding: 12px 16px;
|
||||||
border-top: 1px solid rgb(193, 199, 208); }
|
border-top: 1px solid rgb(193, 199, 208); }
|
||||||
.u-table-content {
|
.u-table-content {
|
||||||
position: relative; }
|
position: relative; }
|
||||||
.u-table-footer {
|
.u-table-footer {
|
||||||
padding: 12px 8px;
|
padding: 12px 16px;
|
||||||
border-bottom: 1px solid rgb(193, 199, 208); }
|
border-bottom: 1px solid rgb(193, 199, 208); }
|
||||||
.u-table-footer .u-table-scroll {
|
.u-table-footer .u-table-scroll {
|
||||||
overflow-x: hidden; }
|
overflow-x: hidden; }
|
||||||
.u-table-footer .u-table {
|
.u-table-footer .u-table {
|
||||||
margin: -12px -8px; }
|
margin: -12px -16px; }
|
||||||
.u-table-placeholder {
|
.u-table-placeholder {
|
||||||
padding: 12px 8px;
|
padding: 12px 8px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
@ -219,13 +221,18 @@
|
||||||
.u-table-thead th .bee-table-column-sorter {
|
.u-table-thead th .bee-table-column-sorter {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
height: 1em;
|
height: 16px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block; }
|
display: inline-block;
|
||||||
|
margin-top: -3px; }
|
||||||
|
.u-table-thead th .bee-table-column-sorter i {
|
||||||
|
padding: 0px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #505F79; }
|
||||||
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-down,
|
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-down,
|
||||||
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-up, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-flat {
|
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-up, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-flat {
|
||||||
line-height: 6px;
|
line-height: 16px;
|
||||||
display: block;
|
display: block;
|
||||||
width: 34px;
|
width: 34px;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
@ -296,17 +303,18 @@
|
||||||
position: relative; }
|
position: relative; }
|
||||||
.u-table-filter-column-filter-icon {
|
.u-table-filter-column-filter-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
width: 30px;
|
||||||
right: 18px;
|
height: 38px;
|
||||||
width: 22px;
|
line-height: 38px;
|
||||||
height: 25px;
|
right: 12px;
|
||||||
line-height: 25px;
|
top: 1px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
background: rgb(241, 242, 245);
|
background: rgb(241, 242, 245);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
.u-table-filter-column-filter-icon i.uf {
|
.u-table-filter-column-filter-icon i.uf {
|
||||||
padding: 0px; }
|
padding: 0px;
|
||||||
|
color: #505F79; }
|
||||||
.u-table-filter-column-pop-cont-item {
|
.u-table-filter-column-pop-cont-item {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
@ -329,9 +337,14 @@
|
||||||
display: none;
|
display: none;
|
||||||
pointer-events: none; }
|
pointer-events: none; }
|
||||||
.u-table .u-checkbox {
|
.u-table .u-checkbox {
|
||||||
height: 16px;
|
height: 14px;
|
||||||
line-height: 16px;
|
line-height: 14px;
|
||||||
margin: 0px; }
|
margin: 0px; }
|
||||||
|
.u-table .u-checkbox .u-checkbox-label {
|
||||||
|
line-height: 14px; }
|
||||||
|
.u-table .u-checkbox .u-checkbox-label:before, .u-table .u-checkbox .u-checkbox-label:after {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px; }
|
||||||
|
|
||||||
.u-table:focus {
|
.u-table:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
|
@ -521,16 +534,16 @@
|
||||||
.u-filter-dropdown-menu-wrap {
|
.u-filter-dropdown-menu-wrap {
|
||||||
z-index: 1800; }
|
z-index: 1800; }
|
||||||
.u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item {
|
.u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item {
|
||||||
line-height: 28px;
|
line-height: 26px;
|
||||||
height: 28px;
|
height: 26px;
|
||||||
padding: 0px 16px 0 16px;
|
padding: 0px 16px 0 16px;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
.filter-wrap .u-form-control {
|
.filter-wrap .u-form-control {
|
||||||
height: 28px; }
|
height: 26px; }
|
||||||
|
|
||||||
.filter-wrap .u-input-number.u-input-group.simple .u-input-group-btn .icon-group {
|
.filter-wrap .u-input-number.u-input-group.simple .u-input-group-btn .icon-group {
|
||||||
height: 28px; }
|
height: 26px; }
|
||||||
|
|
||||||
.u-row-hover {
|
.u-row-hover {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -490,6 +490,7 @@ function bigData(Table) {
|
||||||
if (!_this.props.expandedRowKeys) {
|
if (!_this.props.expandedRowKeys) {
|
||||||
if (expandState) {
|
if (expandState) {
|
||||||
expandedRowKeys.push(rowKey);
|
expandedRowKeys.push(rowKey);
|
||||||
|
_this4.setState({ needRender: !needRender });
|
||||||
} else {
|
} else {
|
||||||
var _index = -1;
|
var _index = -1;
|
||||||
expandedRowKeys.forEach(function (r, i) {
|
expandedRowKeys.forEach(function (r, i) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
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; };
|
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; };
|
||||||
|
@ -36,137 +36,137 @@ var cloneDeep = require('lodash.clonedeep');
|
||||||
|
|
||||||
function dragColumn(Table) {
|
function dragColumn(Table) {
|
||||||
|
|
||||||
return function (_Component) {
|
return function (_Component) {
|
||||||
_inherits(DragColumn, _Component);
|
_inherits(DragColumn, _Component);
|
||||||
|
|
||||||
function DragColumn(props) {
|
function DragColumn(props) {
|
||||||
_classCallCheck(this, DragColumn);
|
_classCallCheck(this, DragColumn);
|
||||||
|
|
||||||
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
|
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
|
||||||
|
|
||||||
_this.setColumOrderByIndex = function (_column) {
|
_this.setColumOrderByIndex = function (_column) {
|
||||||
_column.forEach(function (da, i) {
|
_column.forEach(function (da, i) {
|
||||||
da.dragIndex = i;
|
da.dragIndex = i;
|
||||||
da.drgHover = false;
|
da.drgHover = false;
|
||||||
});
|
|
||||||
return _column;
|
|
||||||
};
|
|
||||||
|
|
||||||
_this.onDrop = function (event, data) {
|
|
||||||
var dragSource = data.dragSource,
|
|
||||||
dragTarg = data.dragTarg;
|
|
||||||
var columns = _this.state.columns;
|
|
||||||
|
|
||||||
var sourceIndex = -1,
|
|
||||||
targetIndex = -1;
|
|
||||||
|
|
||||||
sourceIndex = columns.findIndex(function (da, i) {
|
|
||||||
return da.key == dragSource.key;
|
|
||||||
});
|
|
||||||
targetIndex = columns.findIndex(function (da, i) {
|
|
||||||
return da.key == dragTarg.key;
|
|
||||||
});
|
|
||||||
// for (let index = 0; index < columns.length; index++) {
|
|
||||||
// const da = columns[index];
|
|
||||||
// if(da.key === dragSource.key){
|
|
||||||
// columns[index] = dragTargColum;
|
|
||||||
// }
|
|
||||||
// if(da.key === dragTarg.key){
|
|
||||||
// columns[index] = dragSourceColum;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// 向前移动
|
|
||||||
if (targetIndex < sourceIndex) {
|
|
||||||
targetIndex = targetIndex + 1;
|
|
||||||
}
|
|
||||||
columns.splice(targetIndex, 0, columns.splice(sourceIndex, 1)[0]);
|
|
||||||
_this.setState({
|
|
||||||
columns: cloneDeep(columns)
|
|
||||||
});
|
|
||||||
if (_this.props.onDrop) {
|
|
||||||
_this.props.onDrop(event, data, columns);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
_this.getTarget = function (evt) {
|
|
||||||
return evt.target || evt.srcElement;
|
|
||||||
};
|
|
||||||
|
|
||||||
_this.state = {
|
|
||||||
columns: _this.setColumOrderByIndex(props.columns)
|
|
||||||
};
|
|
||||||
return _this;
|
|
||||||
}
|
|
||||||
|
|
||||||
DragColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
||||||
if (nextProps.columns != this.props.columns) {
|
|
||||||
this.setState({
|
|
||||||
columns: this.setColumOrderByIndex(nextProps.columns)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
DragColumn.prototype.cloneDeep = function cloneDeep(obj) {
|
|
||||||
if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || Object.keys(obj).length === 0) {
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
var resultData = {};
|
|
||||||
return this.recursion(obj, resultData);
|
|
||||||
};
|
|
||||||
|
|
||||||
DragColumn.prototype.recursion = function (_recursion) {
|
|
||||||
function recursion(_x) {
|
|
||||||
return _recursion.apply(this, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
recursion.toString = function () {
|
|
||||||
return _recursion.toString();
|
|
||||||
};
|
|
||||||
|
|
||||||
return recursion;
|
|
||||||
}(function (obj) {
|
|
||||||
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
||||||
|
|
||||||
for (key in obj) {
|
|
||||||
if (_typeof(obj[key]) == 'object' && Object.keys(obj[key].length > 0)) {
|
|
||||||
data[key] = recursion(obj[key]);
|
|
||||||
} else {
|
|
||||||
data[key] = obj[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
});
|
});
|
||||||
|
return _column;
|
||||||
|
};
|
||||||
|
|
||||||
DragColumn.prototype.render = function render() {
|
_this.onDrop = function (event, data) {
|
||||||
var _props = this.props,
|
var dragSource = data.dragSource,
|
||||||
data = _props.data,
|
dragTarg = data.dragTarg;
|
||||||
dragborder = _props.dragborder,
|
var columns = _this.state.columns;
|
||||||
draggable = _props.draggable,
|
|
||||||
className = _props.className,
|
|
||||||
columns = _props.columns,
|
|
||||||
onDragStart = _props.onDragStart,
|
|
||||||
onDragEnter = _props.onDragEnter,
|
|
||||||
onDragOver = _props.onDragOver,
|
|
||||||
onDrop = _props.onDrop,
|
|
||||||
others = _objectWithoutProperties(_props, ['data', 'dragborder', 'draggable', 'className', 'columns', 'onDragStart', 'onDragEnter', 'onDragOver', 'onDrop']);
|
|
||||||
|
|
||||||
var key = new Date().getTime();
|
var sourceIndex = -1,
|
||||||
return _react2["default"].createElement(Table, _extends({}, others, {
|
targetIndex = -1;
|
||||||
columns: this.state.columns,
|
|
||||||
data: data,
|
|
||||||
className: className + ' u-table-drag-border',
|
|
||||||
onDragStart: this.onDragStart,
|
|
||||||
onDragOver: this.onDragOver,
|
|
||||||
onDrop: this.onDrop,
|
|
||||||
onDragEnter: this.onDragEnter,
|
|
||||||
draggable: draggable,
|
|
||||||
dragborder: dragborder
|
|
||||||
// dragborder={false}
|
|
||||||
, dragborderKey: key
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
return DragColumn;
|
sourceIndex = columns.findIndex(function (da, i) {
|
||||||
}(_react.Component);
|
return da.key == dragSource.key;
|
||||||
|
});
|
||||||
|
targetIndex = columns.findIndex(function (da, i) {
|
||||||
|
return da.key == dragTarg.key;
|
||||||
|
});
|
||||||
|
// for (let index = 0; index < columns.length; index++) {
|
||||||
|
// const da = columns[index];
|
||||||
|
// if(da.key === dragSource.key){
|
||||||
|
// columns[index] = dragTargColum;
|
||||||
|
// }
|
||||||
|
// if(da.key === dragTarg.key){
|
||||||
|
// columns[index] = dragSourceColum;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// 向前移动
|
||||||
|
if (targetIndex < sourceIndex) {
|
||||||
|
targetIndex = targetIndex + 1;
|
||||||
|
}
|
||||||
|
columns.splice(targetIndex, 0, columns.splice(sourceIndex, 1)[0]);
|
||||||
|
_this.setState({
|
||||||
|
columns: cloneDeep(columns)
|
||||||
|
});
|
||||||
|
if (_this.props.onDrop) {
|
||||||
|
_this.props.onDrop(event, data, columns);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_this.getTarget = function (evt) {
|
||||||
|
return evt.target || evt.srcElement;
|
||||||
|
};
|
||||||
|
|
||||||
|
_this.state = {
|
||||||
|
columns: _this.setColumOrderByIndex(props.columns)
|
||||||
|
};
|
||||||
|
return _this;
|
||||||
|
}
|
||||||
|
|
||||||
|
DragColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||||||
|
if (nextProps.columns != this.props.columns) {
|
||||||
|
this.setState({
|
||||||
|
columns: this.setColumOrderByIndex(nextProps.columns)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
DragColumn.prototype.cloneDeep = function cloneDeep(obj) {
|
||||||
|
if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || Object.keys(obj).length === 0) {
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
var resultData = {};
|
||||||
|
return this.recursion(obj, resultData);
|
||||||
|
};
|
||||||
|
|
||||||
|
DragColumn.prototype.recursion = function (_recursion) {
|
||||||
|
function recursion(_x) {
|
||||||
|
return _recursion.apply(this, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
recursion.toString = function () {
|
||||||
|
return _recursion.toString();
|
||||||
|
};
|
||||||
|
|
||||||
|
return recursion;
|
||||||
|
}(function (obj) {
|
||||||
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||||
|
|
||||||
|
for (key in obj) {
|
||||||
|
if (_typeof(obj[key]) == 'object' && Object.keys(obj[key].length > 0)) {
|
||||||
|
data[key] = recursion(obj[key]);
|
||||||
|
} else {
|
||||||
|
data[key] = obj[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
DragColumn.prototype.render = function render() {
|
||||||
|
var _props = this.props,
|
||||||
|
data = _props.data,
|
||||||
|
dragborder = _props.dragborder,
|
||||||
|
draggable = _props.draggable,
|
||||||
|
className = _props.className,
|
||||||
|
columns = _props.columns,
|
||||||
|
onDragStart = _props.onDragStart,
|
||||||
|
onDragEnter = _props.onDragEnter,
|
||||||
|
onDragOver = _props.onDragOver,
|
||||||
|
onDrop = _props.onDrop,
|
||||||
|
others = _objectWithoutProperties(_props, ['data', 'dragborder', 'draggable', 'className', 'columns', 'onDragStart', 'onDragEnter', 'onDragOver', 'onDrop']);
|
||||||
|
|
||||||
|
var key = new Date().getTime();
|
||||||
|
return _react2["default"].createElement(Table, _extends({}, others, {
|
||||||
|
columns: this.state.columns,
|
||||||
|
data: data,
|
||||||
|
className: className + ' u-table-drag-border',
|
||||||
|
onDragStart: this.onDragStart,
|
||||||
|
onDragOver: this.onDragOver,
|
||||||
|
onDrop: this.onDrop,
|
||||||
|
onDragEnter: this.onDragEnter,
|
||||||
|
draggable: draggable,
|
||||||
|
dragborder: dragborder
|
||||||
|
// dragborder={false}
|
||||||
|
, dragborderKey: key
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
|
||||||
|
return DragColumn;
|
||||||
|
}(_react.Component);
|
||||||
}
|
}
|
||||||
module.exports = exports['default'];
|
module.exports = exports['default'];
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
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; };
|
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; };
|
||||||
|
@ -20,29 +20,29 @@ exports.ObjectAssign = ObjectAssign;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function sortBy(arr, prop, desc) {
|
function sortBy(arr, prop, desc) {
|
||||||
var props = [],
|
var props = [],
|
||||||
ret = [],
|
ret = [],
|
||||||
i = 0,
|
i = 0,
|
||||||
len = arr.length;
|
len = arr.length;
|
||||||
if (typeof prop == 'string') {
|
if (typeof prop == 'string') {
|
||||||
for (; i < len; i++) {
|
for (; i < len; i++) {
|
||||||
var oI = arr[i];
|
var oI = arr[i];
|
||||||
(props[i] = new String(oI && oI[prop] || ''))._obj = oI;
|
(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 '参数类型错误';
|
||||||
}
|
}
|
||||||
} else if (typeof prop == 'function') {
|
props.sort();
|
||||||
for (; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
var _oI = arr[i];
|
ret[i] = props[i]._obj;
|
||||||
(props[i] = new String(_oI && prop(_oI) || ''))._obj = _oI;
|
|
||||||
}
|
}
|
||||||
} else {
|
if (desc) ret.reverse();
|
||||||
throw '参数类型错误';
|
return ret;
|
||||||
}
|
|
||||||
props.sort();
|
|
||||||
for (i = 0; i < len; i++) {
|
|
||||||
ret[i] = props[i]._obj;
|
|
||||||
}
|
|
||||||
if (desc) ret.reverse();
|
|
||||||
return ret;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,11 +51,11 @@ function sortBy(arr, prop, desc) {
|
||||||
* @param {} property
|
* @param {} property
|
||||||
*/
|
*/
|
||||||
function compare(property) {
|
function compare(property) {
|
||||||
return function (a, b) {
|
return function (a, b) {
|
||||||
var value1 = a[property];
|
var value1 = a[property];
|
||||||
var value2 = b[property];
|
var value2 = b[property];
|
||||||
return value1 - value2;
|
return value1 - value2;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,17 +63,17 @@ function compare(property) {
|
||||||
* @param {*} obj 要拷贝的对象
|
* @param {*} obj 要拷贝的对象
|
||||||
*/
|
*/
|
||||||
function ObjectAssign(obj) {
|
function ObjectAssign(obj) {
|
||||||
var b = obj instanceof Array;
|
var b = obj instanceof Array;
|
||||||
var tagObj = b ? [] : {};
|
var tagObj = b ? [] : {};
|
||||||
if (b) {
|
if (b) {
|
||||||
//数组
|
//数组
|
||||||
obj.forEach(function (da) {
|
obj.forEach(function (da) {
|
||||||
var _da = {};
|
var _da = {};
|
||||||
_extends(_da, da);
|
_extends(_da, da);
|
||||||
tagObj.push(_da);
|
tagObj.push(_da);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_extends(tagObj, obj);
|
_extends(tagObj, obj);
|
||||||
}
|
}
|
||||||
return tagObj;
|
return tagObj;
|
||||||
}
|
}
|
|
@ -1,20 +1,20 @@
|
||||||
@import "../node_modules/tinper-bee-core/scss/index.scss";
|
// @import "../node_modules/tinper-bee-core/scss/index.scss";
|
||||||
@import "../node_modules/bee-panel/src/Panel.scss";
|
// @import "../node_modules/bee-panel/src/Panel.scss";
|
||||||
@import "../node_modules/bee-layout/src/Layout.scss";
|
// @import "../node_modules/bee-layout/src/Layout.scss";
|
||||||
@import "../node_modules/bee-button/src/Button.scss";
|
// @import "../node_modules/bee-button/src/Button.scss";
|
||||||
@import "../node_modules/bee-transition/src/Transition.scss";
|
// @import "../node_modules/bee-transition/src/Transition.scss";
|
||||||
@import "../node_modules/bee-popconfirm/src/Popconfirm.scss";
|
// @import "../node_modules/bee-popconfirm/src/Popconfirm.scss";
|
||||||
@import "../node_modules/bee-form-control/src/FormControl.scss";
|
// @import "../node_modules/bee-form-control/src/FormControl.scss";
|
||||||
@import "../node_modules/bee-pagination/src/Pagination.scss";
|
// @import "../node_modules/bee-pagination/src/Pagination.scss";
|
||||||
@import "../node_modules/bee-checkbox/src/Checkbox.scss";
|
// @import "../node_modules/bee-checkbox/src/Checkbox.scss";
|
||||||
@import "../node_modules/bee-select/src/Select.scss";
|
// @import "../node_modules/bee-select/src/Select.scss";
|
||||||
// @import "../node_modules/bee-form/src/Form.scss";
|
// @import "../node_modules/bee-form/src/Form.scss";
|
||||||
@import "../node_modules/bee-popover/src/Popover.scss";
|
// @import "../node_modules/bee-popover/src/Popover.scss";
|
||||||
@import "../node_modules/bee-tooltip/src/Tooltip.scss";
|
// @import "../node_modules/bee-tooltip/src/Tooltip.scss";
|
||||||
@import "../node_modules/bee-message/build/Message.css";
|
// @import "../node_modules/bee-message/build/Message.css";
|
||||||
@import "../node_modules/bee-dropdown/build/Dropdown.css";
|
// @import "../node_modules/bee-dropdown/build/Dropdown.css";
|
||||||
@import "../node_modules/bee-input-number/build/InputNumber.css";
|
// @import "../node_modules/bee-input-number/build/InputNumber.css";
|
||||||
@import "../node_modules/bee-modal/build/Modal.css";
|
// @import "../node_modules/bee-modal/build/Modal.css";
|
||||||
@import "../src/Table.scss";
|
@import "../src/Table.scss";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<title>neoui-react-button</title>
|
<title>neoui-react-button</title>
|
||||||
<link rel="stylesheet" href="./demo/atom-one-dark.css">
|
<link rel="stylesheet" href="./demo/atom-one-dark.css">
|
||||||
<link rel="stylesheet" href="./dist/demo.css">
|
<link rel="stylesheet" href="./dist/demo.css">
|
||||||
<!-- <link href="//design.yonyoucloud.com/static/tinper-bee/latest/assets/tinper-bee.css" rel="stylesheet" media="screen" /> -->
|
<link href="//design.yonyoucloud.com/static/tinper-bee/latest/assets/tinper-bee.css" rel="stylesheet" media="screen" />
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue