@ucloud-fe/react-components 1.12.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,7 +31,7 @@ var _StepIcon = _interopRequireDefault(require("./StepIcon"));
31
31
 
32
32
  var _style = require("./style");
33
33
 
34
- var _excluded = ["status", "step", "remark", "title", "isLast"];
34
+ var _excluded = ["status", "step", "remark", "title", "isLast", "showTitle"];
35
35
 
36
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
37
 
@@ -60,10 +60,12 @@ var Step = /*#__PURE__*/function (_PureComponent) {
60
60
  remark = _this$props.remark,
61
61
  title = _this$props.title,
62
62
  isLast = _this$props.isLast,
63
+ showTitle = _this$props.showTitle,
63
64
  rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
64
65
  return /*#__PURE__*/_react.default.createElement(_style.StepWrapper, (0, _extends2.default)({
65
66
  status: status,
66
- isLast: isLast
67
+ isLast: isLast,
68
+ showTitle: showTitle
67
69
  }, rest, {
68
70
  className: "".concat(_style.stepWrapperCls, " ").concat(rest.className ? rest.className : '')
69
71
  }), /*#__PURE__*/_react.default.createElement("div", {
@@ -84,5 +86,6 @@ Step.propTypes = {
84
86
  remark: _propTypes.default.node,
85
87
  title: _propTypes.default.node,
86
88
  isLast: _propTypes.default.bool,
87
- disabled: _propTypes.default.bool
89
+ disabled: _propTypes.default.bool,
90
+ showTitle: _propTypes.default.bool
88
91
  };
@@ -34,7 +34,7 @@ var _style = require("./style");
34
34
  var _Step = _interopRequireDefault(require("./Step"));
35
35
 
36
36
  var _excluded = ["key", "step", "status"],
37
- _excluded2 = ["steps", "current", "status", "onChange", "direction"];
37
+ _excluded2 = ["steps", "current", "status", "onChange", "direction", "nowrap"];
38
38
 
39
39
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
40
40
 
@@ -72,7 +72,8 @@ var Steps = /*#__PURE__*/function (_Component) {
72
72
  current = _ref.current,
73
73
  status = _ref.status,
74
74
  direction = _ref.direction,
75
- onChange = _ref.onChange;
75
+ onChange = _ref.onChange,
76
+ nowrap = _ref.nowrap;
76
77
  var pos = 'before';
77
78
  var l = steps.length;
78
79
  return steps.map(function (step, i) {
@@ -119,6 +120,7 @@ var Steps = /*#__PURE__*/function (_Component) {
119
120
  status: finalStatus,
120
121
  canHover: canHover,
121
122
  showTitle: showTitle,
123
+ nowrap: nowrap,
122
124
  onClick: function () {
123
125
  (0, _newArrowCheck2.default)(this, _this4);
124
126
 
@@ -130,6 +132,7 @@ var Steps = /*#__PURE__*/function (_Component) {
130
132
  key: "step-".concat(key),
131
133
  status: finalStatus,
132
134
  step: stepContent,
135
+ showTitle: showTitle,
133
136
  isLast: i === l - 1 ? true : false
134
137
  })));
135
138
  }.bind(this));
@@ -147,15 +150,18 @@ var Steps = /*#__PURE__*/function (_Component) {
147
150
  status = _this$props.status,
148
151
  onChange = _this$props.onChange,
149
152
  direction = _this$props.direction,
153
+ nowrap = _this$props.nowrap,
150
154
  rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded2);
151
155
  return /*#__PURE__*/_react.default.createElement(_style.StepsWrapper, (0, _extends2.default)({
152
- direction: direction
156
+ direction: direction,
157
+ nowrap: nowrap
153
158
  }, rest), this.renderSteps({
154
159
  steps: steps,
155
160
  current: current,
156
161
  status: status,
157
162
  direction: direction,
158
- onChange: onChange
163
+ onChange: onChange,
164
+ nowrap: nowrap
159
165
  }));
160
166
  }
161
167
  }]);
@@ -196,11 +202,17 @@ Steps.propTypes = {
196
202
  /**
197
203
  * 指定步骤条方向 , 默认是horizontal
198
204
  */
199
- direction: _propTypes.default.oneOf(['horizontal', 'vertical'])
205
+ direction: _propTypes.default.oneOf(['horizontal', 'vertical']),
206
+
207
+ /**
208
+ * 横向场景,不换行, 默认是false
209
+ */
210
+ nowrap: _propTypes.default.bool
200
211
  };
201
212
  Steps.defaultProps = {
202
213
  status: 'current',
203
- direction: 'horizontal'
214
+ direction: 'horizontal',
215
+ nowrap: false
204
216
  };
205
217
  var _default = Steps;
206
218
  exports.default = _default;