fan-standard-comp 3.1.12 → 3.1.13
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.
- package/dist/fan-standard-comp.umd.js +8 -8
- package/es/ButtonGroup/index.js +4 -4
- package/es/NavLeafScroll/index.js +115 -43
- package/es/NavLeafScroll/style/index.less +33 -1
- package/es/StandardForm/StepForm.js +10 -4
- package/es/StandardModal/index.js +7 -2
- package/lib/ButtonGroup/index.js +4 -4
- package/lib/NavLeafScroll/index.js +115 -43
- package/lib/NavLeafScroll/style/index.less +33 -1
- package/lib/StandardForm/StepForm.js +10 -4
- package/lib/StandardModal/index.js +7 -2
- package/package.json +1 -1
|
@@ -38,6 +38,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
38
38
|
_defineProperty(_assertThisInitialized(_this), "initFloorValues", function () {
|
|
39
39
|
var _this$props = _this.props,
|
|
40
40
|
baseItemHeight = _this$props.baseItemHeight,
|
|
41
|
+
baseItemWidth = _this$props.baseItemWidth,
|
|
41
42
|
activeKey = _this$props.activeKey,
|
|
42
43
|
navList = _this$props.navList,
|
|
43
44
|
_this$props$optionNam = _this$props.optionName,
|
|
@@ -45,68 +46,106 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
45
46
|
key: 'id',
|
|
46
47
|
title: 'title',
|
|
47
48
|
count: 'count'
|
|
48
|
-
} : _this$props$optionNam
|
|
49
|
+
} : _this$props$optionNam,
|
|
50
|
+
type = _this$props.type; // 元素个数占用的高度是否不超过内容区域
|
|
49
51
|
var isInsideEnough = navList.length * baseItemHeight <= _this.mainWrap.current.clientHeight;
|
|
50
52
|
var wrapHeight = _this.mainWrap.current.clientHeight - (isInsideEnough ? 0 : 32 * 2); // 每次需要移动的偏移量 32是上下切换角占用的高度
|
|
51
53
|
var floorHeight = _this.leafNav.current.clientHeight; // 所有楼层占用的高度
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
// const isEnough = wrapHeight % baseItemHeight === 0; // 剩余的是否足够容纳一个单元格
|
|
55
|
+
var isInsideEnoughWidth = navList.length * baseItemWidth <= _this.mainWrap.current.clientWidth;
|
|
56
|
+
var wrapWidth = _this.mainWrap.current.clientWidth - (isInsideEnoughWidth ? 0 : 30 * 2);
|
|
57
|
+
var floorWidth = _this.leafNav.current.clientWidth; // 所有楼层占用的宽度
|
|
58
|
+
if (type === 'horizontal') {
|
|
59
|
+
// 判断有效区域与单元格高度:若小于,则直接使用单元格高度,否则将内容区高度去除不足一个单元格高度
|
|
60
|
+
if (_this.mainWrap.current.clientWidth - (isInsideEnoughWidth ? 0 : 30 * 2) >= baseItemWidth) {
|
|
61
|
+
wrapWidth -= wrapWidth % baseItemWidth; // 判断是否除不尽,如果还有余数,则当前 区域有效区域要去除一个单元格的高度
|
|
62
|
+
} else {
|
|
63
|
+
wrapWidth = baseItemWidth;
|
|
64
|
+
}
|
|
56
65
|
} else {
|
|
57
|
-
|
|
66
|
+
// 判断有效区域与单元格高度:若小于,则直接使用单元格高度,否则将内容区高度去除不足一个单元格高度
|
|
67
|
+
if (_this.mainWrap.current.clientHeight - (isInsideEnough ? 0 : 32 * 2) >= baseItemHeight) {
|
|
68
|
+
wrapHeight -= wrapHeight % baseItemHeight; // 判断是否除不尽,如果还有余数,则当前 区域有效区域要去除一个单元格的高度
|
|
69
|
+
} else {
|
|
70
|
+
wrapHeight = baseItemHeight;
|
|
71
|
+
}
|
|
58
72
|
}
|
|
59
|
-
var stepSize = wrapHeight / baseItemHeight; // - (isEnough ? 0 : 1) // 当前一页可容纳的单元格数量
|
|
73
|
+
var stepSize = type === 'horizontal' ? wrapWidth / baseItemWidth : wrapHeight / baseItemHeight; // - (isEnough ? 0 : 1) // 当前一页可容纳的单元格数量
|
|
60
74
|
_this.setState({
|
|
61
75
|
floorRelatedSize: {
|
|
62
76
|
wrapHeight: wrapHeight,
|
|
63
77
|
// 有效内容区域的
|
|
64
|
-
floorHeight: floorHeight
|
|
78
|
+
floorHeight: floorHeight,
|
|
79
|
+
// 楼层列表占用的高度
|
|
80
|
+
wrapWidth: wrapWidth,
|
|
81
|
+
floorWidth: floorWidth
|
|
65
82
|
},
|
|
66
|
-
|
|
67
83
|
stepSize: stepSize,
|
|
68
|
-
showArrow: floorHeight > wrapHeight
|
|
84
|
+
showArrow: type === 'horizontal' ? isInsideEnoughWidth ? false : floorWidth > wrapWidth : isInsideEnough ? false : floorHeight > wrapHeight
|
|
69
85
|
});
|
|
70
86
|
if (activeKey && navList.length > 0) {
|
|
71
87
|
var matchIndex = _lodash.default.findIndex(navList, function (item) {
|
|
72
88
|
return item[(optionName === null || optionName === void 0 ? void 0 : optionName.key) || 'id'] === activeKey;
|
|
73
89
|
});
|
|
74
|
-
var stepNo = wrapHeight === 0 ? 0 : Math.floor(matchIndex / (wrapHeight / baseItemHeight)); // 当前所在的切换页数,从0开始
|
|
90
|
+
var stepNo = type === 'horizontal' ? wrapWidth === 0 ? 0 : Math.floor(matchIndex / (wrapWidth / baseItemWidth)) : wrapHeight === 0 ? 0 : Math.floor(matchIndex / (wrapHeight / baseItemHeight)); // 当前所在的切换页数,从0开始
|
|
75
91
|
var stepTotalSize = Math.ceil(navList.length / stepSize) || 0; // 当前所有单元格占用的页总数
|
|
76
92
|
_this.setState({
|
|
93
|
+
leafNavScrollX: matchIndex !== -1 && stepNo !== 0 ? -wrapWidth * stepNo : 0,
|
|
77
94
|
leafNavScrollY: matchIndex !== -1 && stepNo !== 0 ? -wrapHeight * stepNo : 0,
|
|
78
95
|
// 如果当前默认传值有楼层节点,则需要判断其所在的位置
|
|
79
96
|
arrowPermit: {
|
|
80
97
|
prev: matchIndex !== -1 && stepNo !== 0,
|
|
81
|
-
|
|
98
|
+
left: matchIndex !== -1 && stepNo !== 0,
|
|
99
|
+
next: floorHeight > wrapHeight && stepNo + 1 !== stepTotalSize,
|
|
100
|
+
right: floorWidth > wrapWidth && stepNo + 1 !== stepTotalSize
|
|
82
101
|
}
|
|
83
102
|
});
|
|
84
103
|
} else {
|
|
85
104
|
_this.setState({
|
|
105
|
+
leafNavScrollX: 0,
|
|
86
106
|
leafNavScrollY: 0,
|
|
87
107
|
arrowPermit: {
|
|
88
108
|
prev: false,
|
|
89
|
-
|
|
109
|
+
left: false,
|
|
110
|
+
next: floorHeight > wrapHeight,
|
|
111
|
+
right: floorWidth > wrapWidth
|
|
90
112
|
}
|
|
91
113
|
});
|
|
92
114
|
}
|
|
93
115
|
});
|
|
94
|
-
_defineProperty(_assertThisInitialized(_this), "handleLeafControl", function (
|
|
116
|
+
_defineProperty(_assertThisInitialized(_this), "handleLeafControl", function (method) {
|
|
117
|
+
var type = _this.props.type;
|
|
95
118
|
var _this$state = _this.state,
|
|
96
119
|
floorRelatedSize = _this$state.floorRelatedSize,
|
|
97
|
-
leafNavScrollY = _this$state.leafNavScrollY
|
|
120
|
+
leafNavScrollY = _this$state.leafNavScrollY,
|
|
121
|
+
leafNavScrollX = _this$state.leafNavScrollX;
|
|
98
122
|
var wrapHeight = floorRelatedSize.wrapHeight,
|
|
99
|
-
floorHeight = floorRelatedSize.floorHeight
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
123
|
+
floorHeight = floorRelatedSize.floorHeight,
|
|
124
|
+
wrapWidth = floorRelatedSize.wrapWidth,
|
|
125
|
+
floorWidth = floorRelatedSize.floorWidth;
|
|
126
|
+
if (type === 'horizontal') {
|
|
127
|
+
var maxNextPosition = -(wrapWidth * (Math.ceil(floorWidth / wrapWidth) - 1)); // 向右滚动的最大值
|
|
128
|
+
var scrollX = method === 'right' ? leafNavScrollX - wrapWidth : leafNavScrollX + wrapWidth;
|
|
129
|
+
_this.setState({
|
|
130
|
+
arrowPermit: {
|
|
131
|
+
left: method === 'left' ? scrollX !== 0 : true,
|
|
132
|
+
right: method === 'left' ? true : scrollX !== maxNextPosition // 滚动大小与最大滚动值一致时,向右滚动禁用,
|
|
133
|
+
},
|
|
107
134
|
|
|
108
|
-
|
|
109
|
-
|
|
135
|
+
leafNavScrollX: scrollX
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
var _maxNextPosition = -(wrapHeight * (Math.ceil(floorHeight / wrapHeight) - 1)); // 向下滚动的最大值
|
|
139
|
+
var scrollY = method === 'next' ? leafNavScrollY - wrapHeight : leafNavScrollY + wrapHeight;
|
|
140
|
+
_this.setState({
|
|
141
|
+
arrowPermit: {
|
|
142
|
+
prev: method === 'prev' ? scrollY !== 0 : true,
|
|
143
|
+
next: method === 'prev' ? true : scrollY !== _maxNextPosition // 滚动大小与最大滚动值一致时,向下滚动禁用,
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
leafNavScrollY: scrollY
|
|
147
|
+
});
|
|
148
|
+
}
|
|
110
149
|
});
|
|
111
150
|
_defineProperty(_assertThisInitialized(_this), "handleItemControl", function (key, data) {
|
|
112
151
|
var onClick = _this.props.onClick;
|
|
@@ -127,21 +166,25 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
127
166
|
onMouseLeave && onMouseLeave(e);
|
|
128
167
|
});
|
|
129
168
|
_defineProperty(_assertThisInitialized(_this), "mouseWheel", function (e) {
|
|
169
|
+
var type = _this.props.type;
|
|
130
170
|
var _this$state2 = _this.state,
|
|
131
171
|
isMouseEnter = _this$state2.isMouseEnter,
|
|
132
172
|
arrowPermit = _this$state2.arrowPermit;
|
|
133
173
|
if (!isMouseEnter) return; // 鼠标没有经过内容区域,则不会滚轮监听
|
|
134
174
|
e.preventDefault();
|
|
135
175
|
if (e.deltaY <= 0) {
|
|
136
|
-
|
|
176
|
+
// 向上滚动(向左滚动)
|
|
177
|
+
type === 'horizontal' ? arrowPermit.left && _this.handleLeafControl('left') : arrowPermit.prev && _this.handleLeafControl('prev');
|
|
137
178
|
} else {
|
|
138
|
-
arrowPermit.next && _this.handleLeafControl('next'); // 向下滚动
|
|
179
|
+
type === 'horizontal' ? arrowPermit.right && _this.handleLeafControl('right') : arrowPermit.next && _this.handleLeafControl('next'); // 向下滚动(向右滚动)
|
|
139
180
|
}
|
|
140
|
-
// onWheel && onWheel(e)
|
|
141
181
|
});
|
|
142
182
|
_this.state = {
|
|
143
183
|
isMouseEnter: false,
|
|
184
|
+
leafNavScrollX: 0,
|
|
185
|
+
// 水平滚动区域
|
|
144
186
|
leafNavScrollY: 0,
|
|
187
|
+
// 垂直滚动区域
|
|
145
188
|
showArrow: false,
|
|
146
189
|
arrowPermit: {
|
|
147
190
|
prev: false,
|
|
@@ -193,6 +236,8 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
193
236
|
value: function componentDidUpdate(prevProps) {
|
|
194
237
|
var _this$props2 = this.props,
|
|
195
238
|
baseItemHeight = _this$props2.baseItemHeight,
|
|
239
|
+
baseItemWidth = _this$props2.baseItemWidth,
|
|
240
|
+
type = _this$props2.type,
|
|
196
241
|
navList = _this$props2.navList,
|
|
197
242
|
activeKey = _this$props2.activeKey,
|
|
198
243
|
_this$props2$optionNa = _this$props2.optionName,
|
|
@@ -206,8 +251,11 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
206
251
|
_this$state3$floorRel = _this$state3.floorRelatedSize,
|
|
207
252
|
wrapHeight = _this$state3$floorRel.wrapHeight,
|
|
208
253
|
floorHeight = _this$state3$floorRel.floorHeight,
|
|
254
|
+
wrapWidth = _this$state3$floorRel.wrapWidth,
|
|
255
|
+
floorWidth = _this$state3$floorRel.floorWidth,
|
|
209
256
|
stepSize = _this$state3.stepSize;
|
|
210
|
-
if (
|
|
257
|
+
if (type === 'horizontal') {}
|
|
258
|
+
if (JSON.stringify(navList) !== JSON.stringify(prevProps.navList) || (type === 'horizontal' ? baseItemWidth !== prevProps.baseItemWidth : baseItemHeight !== prevProps.baseItemHeight)) {
|
|
211
259
|
this.initFloorValues();
|
|
212
260
|
}
|
|
213
261
|
if (forbidScroll !== prevProps.forbidScroll) {
|
|
@@ -225,14 +273,18 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
225
273
|
var matchIndex = _lodash.default.findIndex(navList, function (item) {
|
|
226
274
|
return item[optionName.key] === activeKey;
|
|
227
275
|
});
|
|
228
|
-
var stepNo = Math.floor(matchIndex / (wrapHeight / baseItemHeight)); // 当前所在的切换页数,从0开始
|
|
276
|
+
var stepNo = Math.floor(matchIndex / (type === 'horizontal' ? wrapWidth / baseItemWidth : wrapHeight / baseItemHeight)); // 当前所在的切换页数,从0开始
|
|
229
277
|
var stepTotalSize = Array.isArray(navList) && Math.ceil(navList.length / stepSize) || 0; // 当前所有单元格占用的页总数
|
|
278
|
+
console.log('stepTotalSize', stepTotalSize);
|
|
230
279
|
this.setState({
|
|
280
|
+
leafNavScrollX: matchIndex !== -1 && stepNo !== 0 ? -wrapWidth * stepNo : 0,
|
|
231
281
|
leafNavScrollY: matchIndex !== -1 && stepNo !== 0 ? -wrapHeight * stepNo : 0,
|
|
232
282
|
// 如果当前默认传值有楼层节点,则需要判断其所在的位置
|
|
233
283
|
arrowPermit: {
|
|
234
284
|
prev: matchIndex !== -1 && stepNo !== 0,
|
|
235
|
-
next: floorHeight > wrapHeight && stepNo + 1 !== stepTotalSize
|
|
285
|
+
next: floorHeight > wrapHeight && stepNo + 1 !== stepTotalSize,
|
|
286
|
+
left: matchIndex !== -1 && stepNo !== 0,
|
|
287
|
+
right: floorWidth > wrapWidth && stepNo + 1 !== stepTotalSize
|
|
236
288
|
},
|
|
237
289
|
isMouseEnter: true
|
|
238
290
|
});
|
|
@@ -258,16 +310,20 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
258
310
|
count: 'count'
|
|
259
311
|
} : _this$props3$optionNa,
|
|
260
312
|
_this$props3$emptyNod = _this$props3.emptyNode,
|
|
261
|
-
emptyNode = _this$props3$emptyNod === void 0 ? null : _this$props3$emptyNod
|
|
313
|
+
emptyNode = _this$props3$emptyNod === void 0 ? null : _this$props3$emptyNod,
|
|
314
|
+
type = _this$props3.type,
|
|
315
|
+
height = _this$props3.height;
|
|
262
316
|
var _this$state4 = this.state,
|
|
263
317
|
showArrow = _this$state4.showArrow,
|
|
264
318
|
arrowPermit = _this$state4.arrowPermit,
|
|
265
|
-
leafNavScrollY = _this$state4.leafNavScrollY
|
|
319
|
+
leafNavScrollY = _this$state4.leafNavScrollY,
|
|
320
|
+
leafNavScrollX = _this$state4.leafNavScrollX;
|
|
266
321
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
267
|
-
className: (0, _classnames.default)(className, "nav-leaf"),
|
|
268
|
-
style:
|
|
269
|
-
width: "".concat(width, "px")
|
|
270
|
-
|
|
322
|
+
className: (0, _classnames.default)(className, "nav-leaf", type === 'horizontal' ? 'nav-leaf-horizontal' : ''),
|
|
323
|
+
style: {
|
|
324
|
+
width: width ? "".concat(width, "px") : '',
|
|
325
|
+
height: height ? "".concat(height, "px") : ''
|
|
326
|
+
},
|
|
271
327
|
ref: this.mainWrap
|
|
272
328
|
// onWheel={this.mouseWheel}
|
|
273
329
|
,
|
|
@@ -279,7 +335,21 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
279
335
|
padding: 0
|
|
280
336
|
} : {},
|
|
281
337
|
"data-prev": showArrow
|
|
282
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
338
|
+
}, type === 'horizontal' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
339
|
+
className: (0, _classnames.default)("nav-leaf-arrow nav-leaf-btn-left", showArrow ? '' : 'is-hide', arrowPermit.left ? '' : 'is-disabled'),
|
|
340
|
+
onClick: function onClick() {
|
|
341
|
+
return arrowPermit.left ? _this2.handleLeafControl('left') : '';
|
|
342
|
+
}
|
|
343
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
344
|
+
name: "caret-left"
|
|
345
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
346
|
+
className: (0, _classnames.default)("nav-leaf-arrow nav-leaf-btn-right", showArrow ? '' : 'is-hide', arrowPermit.right ? '' : 'is-disabled'),
|
|
347
|
+
onClick: function onClick() {
|
|
348
|
+
return arrowPermit.right ? _this2.handleLeafControl('right') : '';
|
|
349
|
+
}
|
|
350
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
351
|
+
name: "caret-right"
|
|
352
|
+
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
283
353
|
className: (0, _classnames.default)("nav-leaf-arrow nav-leaf-btn-prev", showArrow ? '' : 'is-hide', arrowPermit.prev ? '' : 'is-disabled'),
|
|
284
354
|
onClick: function onClick() {
|
|
285
355
|
return arrowPermit.prev ? _this2.handleLeafControl('prev') : '';
|
|
@@ -293,7 +363,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
293
363
|
}
|
|
294
364
|
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
295
365
|
name: "caret-down"
|
|
296
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
366
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
297
367
|
className: "nav-leaf-wrap",
|
|
298
368
|
ref: this.leafWrap
|
|
299
369
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -302,15 +372,17 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
302
372
|
className: "nav-leaf-nav",
|
|
303
373
|
ref: this.leafNav,
|
|
304
374
|
style: {
|
|
305
|
-
transform: "translate3d(
|
|
375
|
+
transform: "translate3d(".concat(type === 'horizontal' ? leafNavScrollX : 0, "px, ").concat(type === 'horizontal' ? 0 : leafNavScrollY, "px, 0px)")
|
|
306
376
|
}
|
|
307
377
|
}, navList && navList.length > 0 ? navList.map(function (item, i) {
|
|
308
|
-
var _this2$props;
|
|
378
|
+
var _this2$props, _this2$props2;
|
|
309
379
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
310
380
|
key: item[optionName.key],
|
|
311
381
|
className: (0, _classnames.default)('nav-leaf-item', activeKey && activeKey === item[optionName.key] ? 'is-active' : ''),
|
|
312
|
-
style: {
|
|
313
|
-
|
|
382
|
+
style: type === 'horizontal' ? {
|
|
383
|
+
width: "".concat(((_this2$props = _this2.props) === null || _this2$props === void 0 ? void 0 : _this2$props.baseItemWidth) || 60, "px")
|
|
384
|
+
} : {
|
|
385
|
+
height: "".concat(((_this2$props2 = _this2.props) === null || _this2$props2 === void 0 ? void 0 : _this2$props2.baseItemHeight) || 40, "px")
|
|
314
386
|
},
|
|
315
387
|
onClick: function onClick() {
|
|
316
388
|
return _this2.handleItemControl(item[optionName.key], item);
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
.nav-leaf {
|
|
5
5
|
width: 110px;
|
|
6
6
|
height: 100%;
|
|
7
|
+
&.nav-leaf-horizontal {
|
|
8
|
+
width: 100%;
|
|
9
|
+
.nav-leaf-container.nav-leaf-container-scroll {
|
|
10
|
+
padding: 0 30px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
7
13
|
//.nav-leaf-container {
|
|
8
14
|
// height: ~'calc(100vh - @{nav-header-height})';
|
|
9
15
|
//}
|
|
@@ -31,6 +37,17 @@
|
|
|
31
37
|
height: 100%;
|
|
32
38
|
overflow: hidden;
|
|
33
39
|
}
|
|
40
|
+
&.nav-leaf-horizontal {
|
|
41
|
+
.nav-leaf-item {
|
|
42
|
+
display: inline-block;
|
|
43
|
+
text-align: center;
|
|
44
|
+
border-top-right-radius: 20px;
|
|
45
|
+
border-bottom-right-radius: 20px;
|
|
46
|
+
}
|
|
47
|
+
.nav-leaf-nav {
|
|
48
|
+
width: inherit;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
34
51
|
.nav-leaf-nav {
|
|
35
52
|
position: relative;
|
|
36
53
|
display: inline-block;
|
|
@@ -42,7 +59,6 @@
|
|
|
42
59
|
}
|
|
43
60
|
.nav-leaf-arrow {
|
|
44
61
|
position: absolute;
|
|
45
|
-
left: 0;
|
|
46
62
|
width: 100%;
|
|
47
63
|
height: 32px;
|
|
48
64
|
color: @text-color;
|
|
@@ -58,11 +74,27 @@
|
|
|
58
74
|
color: fade(@primary-color, 30%) !important;
|
|
59
75
|
cursor: not-allowed !important;
|
|
60
76
|
}
|
|
77
|
+
&.nav-leaf-btn-left {
|
|
78
|
+
width: 30px;
|
|
79
|
+
height: auto;
|
|
80
|
+
top: 50%;
|
|
81
|
+
left: 0;
|
|
82
|
+
transform: translateY(-50%);
|
|
83
|
+
}
|
|
84
|
+
&.nav-leaf-btn-right{
|
|
85
|
+
width: 30px;
|
|
86
|
+
height: auto;
|
|
87
|
+
top: 50%;
|
|
88
|
+
right: 0;
|
|
89
|
+
transform: translateY(-50%);
|
|
90
|
+
}
|
|
61
91
|
&.nav-leaf-btn-prev {
|
|
62
92
|
top: 0;
|
|
93
|
+
left:0;
|
|
63
94
|
}
|
|
64
95
|
&.nav-leaf-btn-next {
|
|
65
96
|
bottom: 0;
|
|
97
|
+
left:0;
|
|
66
98
|
}
|
|
67
99
|
}
|
|
68
100
|
.nav-leaf-item {
|
|
@@ -214,8 +214,10 @@ var StepForm = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
214
214
|
onFinishFailed: function onFinishFailed() {
|
|
215
215
|
// setFieldFailed(true)
|
|
216
216
|
}
|
|
217
|
-
}, /*#__PURE__*/_react.default.createElement(_steps.default, Object.assign({}, stepsConfig), formItemGroup.
|
|
218
|
-
return !
|
|
217
|
+
}, /*#__PURE__*/_react.default.createElement(_steps.default, Object.assign({}, stepsConfig), formItemGroup.filter(function (fItem) {
|
|
218
|
+
return !fItem.hideStep;
|
|
219
|
+
}).map(function (item, index) {
|
|
220
|
+
return /*#__PURE__*/_react.default.createElement(Step, {
|
|
219
221
|
key: "".concat(item.title).concat(index),
|
|
220
222
|
description: item.description,
|
|
221
223
|
icon: item.icon,
|
|
@@ -223,8 +225,12 @@ var StepForm = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
223
225
|
title: item.title,
|
|
224
226
|
subTitle: item.subTitle,
|
|
225
227
|
disabled: item.disabled
|
|
226
|
-
})
|
|
227
|
-
})),
|
|
228
|
+
});
|
|
229
|
+
})),
|
|
230
|
+
// 过滤隐藏掉的步骤表单
|
|
231
|
+
formItemGroup.filter(function (fItem) {
|
|
232
|
+
return !fItem.hideStep;
|
|
233
|
+
}).map(function (item, index) {
|
|
228
234
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
229
235
|
key: index,
|
|
230
236
|
className: "stepForm-content ".concat(layout === 'inline' ? 'stepForm-content-inline' : ''),
|
|
@@ -93,7 +93,9 @@ var StandardModal = function StandardModal(props) {
|
|
|
93
93
|
return ((_b = activeTabInfo === null || activeTabInfo === void 0 ? void 0 : activeTabInfo.actions) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
94
94
|
}
|
|
95
95
|
if (type === 'stepForm') {
|
|
96
|
-
var currentStepInfo = formItemGroup
|
|
96
|
+
var currentStepInfo = formItemGroup.filter(function (fItem) {
|
|
97
|
+
return !fItem.hideStep;
|
|
98
|
+
})[stepsConfig.current];
|
|
97
99
|
openLog && console.log('rule 0-2', ((_c = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _c === void 0 ? void 0 : _c.length) > 0);
|
|
98
100
|
return ((_d = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _d === void 0 ? void 0 : _d.length) > 0;
|
|
99
101
|
}
|
|
@@ -379,7 +381,10 @@ var StandardModal = function StandardModal(props) {
|
|
|
379
381
|
var renderFooter = function renderFooter() {
|
|
380
382
|
var _a, _b;
|
|
381
383
|
if (type === 'stepForm') {
|
|
382
|
-
|
|
384
|
+
// 过滤隐藏掉的步骤表单
|
|
385
|
+
var currentStepInfo = formItemGroup.filter(function (fItem) {
|
|
386
|
+
return !fItem.hideStep;
|
|
387
|
+
})[stepsConfig.current];
|
|
383
388
|
return ((_a = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? /*#__PURE__*/_react.default.createElement(_ActionList.default, {
|
|
384
389
|
list: currentStepInfo.actions || [],
|
|
385
390
|
onStep: handleStepType,
|