You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.7 KiB
56 lines
1.7 KiB
import _extends from "@babel/runtime/helpers/extends";
|
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
|
|
var __rest = this && this.__rest || function (s, e) {
|
|
var t = {};
|
|
|
|
for (var p in s) {
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
}
|
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
import * as React from 'react';
|
|
import Upload from './Upload'; // stick class comoponent to avoid React ref warning inside Form
|
|
// https://github.com/ant-design/ant-design/issues/18707
|
|
// eslint-disable-next-line react/prefer-stateless-function
|
|
|
|
var Dragger = /*#__PURE__*/function (_React$Component) {
|
|
_inherits(Dragger, _React$Component);
|
|
|
|
var _super = _createSuper(Dragger);
|
|
|
|
function Dragger() {
|
|
_classCallCheck(this, Dragger);
|
|
|
|
return _super.apply(this, arguments);
|
|
}
|
|
|
|
_createClass(Dragger, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _a = this.props,
|
|
style = _a.style,
|
|
height = _a.height,
|
|
restProps = __rest(_a, ["style", "height"]);
|
|
|
|
return /*#__PURE__*/React.createElement(Upload, _extends({}, restProps, {
|
|
type: "drag",
|
|
style: _extends(_extends({}, style), {
|
|
height: height
|
|
})
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return Dragger;
|
|
}(React.Component);
|
|
|
|
export { Dragger as default }; |