Comparing version 0.8.0-beta1 to 0.8.0-beta2
@@ -40,2 +40,2 @@ require('./index.css'); | ||
antd.version = '0.8.0-beta1'; | ||
antd.version = '0.8.0-beta2'; |
@@ -24,2 +24,8 @@ 'use strict'; | ||
function callback(key, btnCose) { | ||
if (btnCose) { | ||
api.close(key); | ||
} | ||
} | ||
function getNotificationInstance() { | ||
@@ -109,2 +115,3 @@ notificationInstance = notificationInstance || _rcNotification2['default'].newInstance({ | ||
} else { | ||
var key = 'manual' + new Date().getTime(); | ||
getNotificationInstance().notice({ | ||
@@ -126,3 +133,3 @@ content: _react2['default'].createElement( | ||
'span', | ||
{ className: prefixCls + 'btn' }, | ||
{ onClick: callback.bind(null, key, args.btnClose), className: prefixCls + 'btn' }, | ||
args.btn | ||
@@ -134,3 +141,3 @@ ) | ||
onClose: args.onClose, | ||
key: args.key, | ||
key: key, | ||
style: {} | ||
@@ -137,0 +144,0 @@ }); |
@@ -46,3 +46,3 @@ 'use strict'; | ||
selectedKeys: [] | ||
}); | ||
}, this.handleConfirm); | ||
}, | ||
@@ -49,0 +49,0 @@ handleConfirm: function handleConfirm() { |
@@ -126,3 +126,3 @@ 'use strict'; | ||
propTypes: { | ||
dataSource: _react2['default'].PropTypes.instanceOf(DataSource) | ||
dataSource: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.array, _react2['default'].PropTypes.instanceOf(DataSource)]) | ||
}, | ||
@@ -170,11 +170,8 @@ | ||
var sorter = undefined; | ||
// 同时允许一列进行排序,否则会导致排序顺序的逻辑问题 | ||
if (sortColumn) { | ||
sortColumn.className = ''; | ||
} | ||
if (sortColumn !== column) { | ||
// 只同时允许一列进行排序,否则会导致排序顺序的逻辑问题 | ||
var isSortColumn = this.isSortColumn(column); | ||
if (!isSortColumn) { | ||
// 当前列未排序 | ||
sortOrder = order; | ||
sortColumn = column; | ||
sortColumn.className = 'ant-table-column-sort'; | ||
} else { | ||
@@ -189,3 +186,2 @@ // 当前列已排序 | ||
sortOrder = order; | ||
sortColumn.className = 'ant-table-column-sort'; | ||
} | ||
@@ -322,11 +318,21 @@ } | ||
getColumnKey: function getColumnKey(column) { | ||
return column.key || column.dataIndex; | ||
getColumnKey: function getColumnKey(column, index) { | ||
return column.key || column.dataIndex || index; | ||
}, | ||
isSortColumn: function isSortColumn(column) { | ||
if (!column || !this.state.sortColumn) { | ||
return false; | ||
} | ||
var colKey = this.getColumnKey(column); | ||
var isSortColumn = this.getColumnKey(this.state.sortColumn) === colKey; | ||
return isSortColumn; | ||
}, | ||
renderColumnsDropdown: function renderColumnsDropdown(columns) { | ||
var _this4 = this; | ||
return columns.map(function (column) { | ||
var key = _this4.getColumnKey(column); | ||
return columns.map(function (column, i) { | ||
column = (0, _objectAssign3['default'])({}, column); | ||
var key = _this4.getColumnKey(column, i); | ||
var filterDropdown = undefined, | ||
@@ -352,3 +358,9 @@ menus = undefined, | ||
if (column.sorter) { | ||
var isSortColumn = _this4.state.sortColumn === column; | ||
var isSortColumn = _this4.isSortColumn(column); | ||
if (isSortColumn) { | ||
column.className = column.className || ''; | ||
if (_this4.state.sortOrder) { | ||
column.className += ' ant-table-column-sort'; | ||
} | ||
} | ||
sortButton = _react2['default'].createElement( | ||
@@ -373,6 +385,3 @@ 'div', | ||
} | ||
if (!column.originalTitle) { | ||
column.originalTitle = column.title; | ||
} | ||
column.title = [column.originalTitle, sortButton, filterDropdown]; | ||
column.title = [column.title, sortButton, filterDropdown]; | ||
return column; | ||
@@ -379,0 +388,0 @@ }); |
@@ -109,5 +109,5 @@ 'use strict'; | ||
}; | ||
props.onError = function (err) { | ||
props.onError = function (err, responce, file) { | ||
_this.handleError(err); | ||
props.error.call(_this, err); | ||
props.error.call(_this, err, responce, file); | ||
}; | ||
@@ -114,0 +114,0 @@ if (type === 'drag') { |
{ | ||
"name": "antd", | ||
"version": "0.8.0-beta1", | ||
"version": "0.8.0-beta2", | ||
"stableVersion": "0.7.3", | ||
@@ -36,3 +36,3 @@ "title": "Ant Design", | ||
"css-animation": "~1.1.0", | ||
"enter-animation": "~0.2.5", | ||
"enter-animation": "~0.3.0", | ||
"gregorian-calendar": "~3.0.0", | ||
@@ -49,3 +49,3 @@ "gregorian-calendar-format": "~3.0.1", | ||
"rc-input-number": "~2.0.1", | ||
"rc-menu": "~4.0.3", | ||
"rc-menu": "~4.3.1", | ||
"rc-notification": "~1.1.0", | ||
@@ -55,3 +55,3 @@ "rc-pagination": "~1.1.0", | ||
"rc-radio": "~2.0.0", | ||
"rc-select": "~4.6.1", | ||
"rc-select": "~4.6.3", | ||
"rc-slider": "~1.4.0", | ||
@@ -64,3 +64,3 @@ "rc-steps": "~1.1.4", | ||
"rc-tree": "~0.10.0", | ||
"rc-upload": "~1.2.4-beta2", | ||
"rc-upload": "~1.3.0", | ||
"rc-util": "~2.0.3", | ||
@@ -67,0 +67,0 @@ "react-slick": "~0.6.4" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305135
11099
+ Addedenter-animation@0.3.0(transitive)
+ Addedrc-menu@4.3.2(transitive)
+ Addedrc-upload@1.3.7(transitive)
+ Addeduuid@2.0.3(transitive)
- Removedenter-animation@0.2.7(transitive)
- Removedrc-menu@4.0.3(transitive)
- Removedrc-upload@1.2.4-beta2(transitive)
Updatedenter-animation@~0.3.0
Updatedrc-menu@~4.3.1
Updatedrc-select@~4.6.3
Updatedrc-upload@~1.3.0