@nutui/nutui-react-taro 3.0.19-cpp.5 → 3.0.19-cpp.6

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.
Files changed (56) hide show
  1. package/dist/cjs/packages/address/style/style.harmony.css +0 -1
  2. package/dist/cjs/packages/cascader/style/style.harmony.css +0 -1
  3. package/dist/cjs/packages/input/style/input.scss +0 -1
  4. package/dist/cjs/packages/input/style/style.css +0 -1
  5. package/dist/cjs/packages/input/style/style.harmony.css +0 -1
  6. package/dist/cjs/packages/input/style-jmapp/input.scss +0 -1
  7. package/dist/cjs/packages/input/style-jmapp/style.css +0 -1
  8. package/dist/cjs/packages/input/style-jrkf/input.scss +0 -1
  9. package/dist/cjs/packages/input/style-jrkf/style.css +0 -1
  10. package/dist/cjs/packages/noticebar/noticebar.js +44 -38
  11. package/dist/cjs/packages/tabs/style/style.css +0 -1
  12. package/dist/cjs/packages/tabs/style/style.harmony.css +0 -1
  13. package/dist/cjs/packages/tabs/style/tabs.scss +1 -1
  14. package/dist/cjs/packages/tabs/style-jmapp/style.css +0 -1
  15. package/dist/cjs/packages/tabs/style-jmapp/tabs.scss +1 -1
  16. package/dist/cjs/packages/tabs/style-jrkf/style.css +0 -1
  17. package/dist/cjs/packages/tabs/style-jrkf/tabs.scss +1 -1
  18. package/dist/cjs/packages/textarea/style/style.css +0 -1
  19. package/dist/cjs/packages/textarea/style/style.harmony.css +0 -1
  20. package/dist/cjs/packages/textarea/style/textarea.scss +1 -1
  21. package/dist/cjs/packages/textarea/style-jmapp/style.css +0 -1
  22. package/dist/cjs/packages/textarea/style-jmapp/textarea.scss +1 -1
  23. package/dist/cjs/packages/textarea/style-jrkf/style.css +0 -1
  24. package/dist/cjs/packages/textarea/style-jrkf/textarea.scss +1 -1
  25. package/dist/es/packages/address/style/style.harmony.css +0 -1
  26. package/dist/es/packages/cascader/style/style.harmony.css +0 -1
  27. package/dist/es/packages/input/style/input.scss +0 -1
  28. package/dist/es/packages/input/style/style.css +0 -1
  29. package/dist/es/packages/input/style/style.harmony.css +0 -1
  30. package/dist/es/packages/input/style-jmapp/input.scss +0 -1
  31. package/dist/es/packages/input/style-jmapp/style.css +0 -1
  32. package/dist/es/packages/input/style-jrkf/input.scss +0 -1
  33. package/dist/es/packages/input/style-jrkf/style.css +0 -1
  34. package/dist/es/packages/noticebar/noticebar.js +77 -75
  35. package/dist/es/packages/tabs/style/style.css +0 -1
  36. package/dist/es/packages/tabs/style/style.harmony.css +0 -1
  37. package/dist/es/packages/tabs/style/tabs.scss +1 -1
  38. package/dist/es/packages/tabs/style-jmapp/style.css +0 -1
  39. package/dist/es/packages/tabs/style-jmapp/tabs.scss +1 -1
  40. package/dist/es/packages/tabs/style-jrkf/style.css +0 -1
  41. package/dist/es/packages/tabs/style-jrkf/tabs.scss +1 -1
  42. package/dist/es/packages/textarea/style/style.css +0 -1
  43. package/dist/es/packages/textarea/style/style.harmony.css +0 -1
  44. package/dist/es/packages/textarea/style/textarea.scss +1 -1
  45. package/dist/es/packages/textarea/style-jmapp/style.css +0 -1
  46. package/dist/es/packages/textarea/style-jmapp/textarea.scss +1 -1
  47. package/dist/es/packages/textarea/style-jrkf/style.css +0 -1
  48. package/dist/es/packages/textarea/style-jrkf/textarea.scss +1 -1
  49. package/dist/nutui.react.umd.js +51 -47
  50. package/dist/style-jmapp.css +1 -1
  51. package/dist/style-jmapp.scss +34 -34
  52. package/dist/style-jrkf.css +1 -1
  53. package/dist/style-jrkf.scss +30 -30
  54. package/dist/style.css +1 -1
  55. package/dist/style.scss +36 -36
  56. package/package.json +1 -1
@@ -588,7 +588,6 @@
588
588
  flex: 1 0 auto;
589
589
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
590
590
  height: var(--nutui-tabs-titles-height, 44px);
591
- line-height: var(--nutui-tabs-titles-height, 44px);
592
591
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
593
592
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
594
593
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -445,7 +445,6 @@
445
445
  flex: 1 0 auto;
446
446
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
447
447
  height: var(--nutui-tabs-titles-height, 44px);
448
- line-height: var(--nutui-tabs-titles-height, 44px);
449
448
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
450
449
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
451
450
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -33,7 +33,6 @@
33
33
  flex: 1;
34
34
  color: $color-title;
35
35
  font-size: $input-font-size;
36
- line-height: $input-lineheight;
37
36
  padding: 0;
38
37
  border: 0;
39
38
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title, #1a1a1a);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-size-xl, 18px));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title, #1a1a1a);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-size-xl, 18px));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -33,7 +33,6 @@
33
33
  flex: 1;
34
34
  color: $color-title;
35
35
  font-size: $input-font-size;
36
- line-height: $input-lineheight;
37
36
  padding: 0;
38
37
  border: 0;
39
38
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-text-large));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -33,7 +33,6 @@
33
33
  flex: 1;
34
34
  color: $color-title;
35
35
  font-size: $input-font-size;
36
- line-height: $input-lineheight;
37
36
  padding: 0;
38
37
  border: 0;
39
38
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-text-large));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -48,7 +48,7 @@ var NoticeBar = function NoticeBar(props) {
48
48
  var classPrefix = 'nut-noticebar';
49
49
  var wrapRef = (0, _react.useRef)(null);
50
50
  var contentRef = (0, _react.useRef)(null);
51
- var _useState = (0, _sliced_to_array._)((0, _react.useState)(true), 2), showNoticeBar = _useState[0], SetShowNoticeBar = _useState[1];
51
+ var _useState = (0, _sliced_to_array._)((0, _react.useState)(true), 2), showNoticeBar = _useState[0], setShowNoticeBar = _useState[1];
52
52
  var scrollList = (0, _react.useRef)([]);
53
53
  var _useState1 = (0, _sliced_to_array._)((0, _react.useState)(0), 2), wrapWidth = _useState1[0], SetWrapWidth = _useState1[1];
54
54
  var _useState2 = (0, _sliced_to_array._)((0, _react.useState)(true), 2), firstRound = _useState2[0], SetFirstRound = _useState2[1];
@@ -183,12 +183,6 @@ var NoticeBar = function NoticeBar(props) {
183
183
  click && click(event);
184
184
  onClick && onClick(event);
185
185
  };
186
- var onClickIcon = function onClickIcon(event) {
187
- event.stopPropagation();
188
- SetShowNoticeBar(!closeable);
189
- close && close(event);
190
- onClose && onClose(event);
191
- };
192
186
  var onAnimationEnd = function onAnimationEnd() {
193
187
  SetFirstRound(false);
194
188
  setTimeout(function() {
@@ -211,13 +205,16 @@ var NoticeBar = function NoticeBar(props) {
211
205
  SetAnimate(false);
212
206
  }, time);
213
207
  };
214
- // 点击滚动单元
215
- var handleClickIcon = function handleClickIcon(event) {
208
+ var handleClickIcon = (0, _react.useCallback)(function(event) {
216
209
  event.stopPropagation();
217
- SetShowNoticeBar(!closeable);
210
+ setShowNoticeBar(!closeable);
218
211
  close && close(event);
219
212
  onClose && onClose(event);
220
- };
213
+ }, [
214
+ close,
215
+ onClose,
216
+ closeable
217
+ ]);
221
218
  var isEllipsis = function isEllipsis() {
222
219
  if (isCanScroll == null && align === 'left') {
223
220
  return wrap;
@@ -365,10 +362,12 @@ var NoticeBar = function NoticeBar(props) {
365
362
  };
366
363
  // 无缝滚动第一个元素位移控制
367
364
  var itemStyle = function itemStyle(index) {
368
- var style = {};
365
+ var style = {
366
+ width: '100%'
367
+ };
369
368
  if (height) {
370
369
  style.height = "".concat(height, "px");
371
- style.lineHeight = "".concat(height, "px");
370
+ // style.lineHeight = `${height}px`
372
371
  }
373
372
  var offset = childOffset[index];
374
373
  if (offset) {
@@ -437,6 +436,32 @@ var NoticeBar = function NoticeBar(props) {
437
436
  container.current = ref;
438
437
  setIsContainerReady(true);
439
438
  }, []);
439
+ var renderLeftIcon = (0, _react.useCallback)(function() {
440
+ return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, leftIcon ? /*#__PURE__*/ _react.default.createElement(_components.View, {
441
+ className: "nut-noticebar-box-left-icon"
442
+ }, leftIcon) : null);
443
+ }, [
444
+ leftIcon
445
+ ]);
446
+ var renderRight = (0, _react.useCallback)(function() {
447
+ return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, right ? /*#__PURE__*/ _react.default.createElement(_components.View, {
448
+ className: "nut-noticebar-box-right"
449
+ }, right) : null);
450
+ }, [
451
+ right
452
+ ]);
453
+ var renderRightIcon = (0, _react.useCallback)(function() {
454
+ return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, rightIcon || closeable ? /*#__PURE__*/ _react.default.createElement(_components.View, {
455
+ className: "nut-noticebar-box-right-icon",
456
+ onClick: handleClickIcon
457
+ }, rightIcon || /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close, {
458
+ size: 12
459
+ })) : null);
460
+ }, [
461
+ rightIcon,
462
+ closeable,
463
+ handleClickIcon
464
+ ]);
440
465
  return /*#__PURE__*/ _react.default.createElement(_components.View, {
441
466
  className: cls,
442
467
  style: style
@@ -444,9 +469,7 @@ var NoticeBar = function NoticeBar(props) {
444
469
  className: noticebarClass,
445
470
  style: barStyle,
446
471
  onClick: handleClick
447
- }, leftIcon ? /*#__PURE__*/ _react.default.createElement(_components.View, {
448
- className: "nut-noticebar-box-left-icon"
449
- }, leftIcon) : null, /*#__PURE__*/ _react.default.createElement(_components.View, {
472
+ }, renderLeftIcon(), /*#__PURE__*/ _react.default.createElement(_components.View, {
450
473
  ref: wrapRef,
451
474
  className: "nut-noticebar-box-wrap"
452
475
  }, /*#__PURE__*/ _react.default.createElement(_components.View, {
@@ -454,21 +477,12 @@ var NoticeBar = function NoticeBar(props) {
454
477
  className: "nut-noticebar-box-wrap-content ".concat(animationClass, " ").concat(isEllipsis() ? 'nut-ellipsis' : ''),
455
478
  style: contentStyle,
456
479
  onAnimationEnd: onAnimationEnd
457
- }, children, content)), right ? /*#__PURE__*/ _react.default.createElement(_components.View, {
458
- className: "nut-noticebar-box-right"
459
- }, right) : null, closeable || rightIcon ? /*#__PURE__*/ _react.default.createElement(_components.View, {
460
- className: "nut-noticebar-box-right-icon",
461
- onClick: onClickIcon
462
- }, rightIcon || /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close, {
463
- size: 12
464
- })) : null) : null, showNoticeBar && hasVerticalContent && isVertical ? /*#__PURE__*/ _react.default.createElement(_components.View, {
480
+ }, children, content)), renderRight(), renderRightIcon()) : null, showNoticeBar && hasVerticalContent && isVertical ? /*#__PURE__*/ _react.default.createElement(_components.View, {
465
481
  className: "nut-noticebar-vertical",
466
482
  style: barStyle,
467
483
  ref: containerRefCallback,
468
484
  onClick: handleClick
469
- }, leftIcon ? /*#__PURE__*/ _react.default.createElement(_components.View, {
470
- className: "nut-noticebar-box-left-icon"
471
- }, leftIcon) : null, children ? /*#__PURE__*/ _react.default.createElement(_components.View, {
485
+ }, renderLeftIcon(), children ? /*#__PURE__*/ _react.default.createElement(_components.View, {
472
486
  className: "nut-noticebar-box-wrap",
473
487
  ref: innerRef
474
488
  }, scrollList.current.map(function(item, index) {
@@ -483,8 +497,7 @@ var NoticeBar = function NoticeBar(props) {
483
497
  className: "nut-noticebar-box-horseLamp-list",
484
498
  style: horseLampStyle
485
499
  }, scrollList.current.map(function(item, index) {
486
- return(// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
487
- /*#__PURE__*/ /*#__PURE__*/ _react.default.createElement(_components.View, {
500
+ return /*#__PURE__*/ _react.default.createElement(_components.View, {
488
501
  className: "nut-noticebar-box-horseLamp-list-item",
489
502
  style: {
490
503
  height: height
@@ -493,14 +506,7 @@ var NoticeBar = function NoticeBar(props) {
493
506
  onClick: function onClick(e) {
494
507
  handleItemClick(e, item);
495
508
  }
496
- }, item));
497
- })), /*#__PURE__*/ _react.default.createElement(_components.View, {
498
- className: "nut-noticebar-box-right-icon",
499
- onClick: function onClick(e) {
500
- handleClickIcon(e);
501
- }
502
- }, rightIcon || (closeable ? /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close, {
503
- size: 12
504
- }) : null))) : null);
509
+ }, item);
510
+ })), renderRight(), renderRightIcon()) : null);
505
511
  };
506
512
  NoticeBar.displayName = 'NutNoticeBar';
@@ -50,7 +50,6 @@
50
50
  flex: 1 0 auto;
51
51
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
52
52
  height: var(--nutui-tabs-titles-height, 44px);
53
- line-height: var(--nutui-tabs-titles-height, 44px);
54
53
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
55
54
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
56
55
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -65,7 +65,6 @@
65
65
  flex: 1 0 auto;
66
66
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
67
67
  height: var(--nutui-tabs-titles-height, 44px);
68
- line-height: var(--nutui-tabs-titles-height, 44px);
69
68
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
70
69
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
71
70
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -52,7 +52,7 @@
52
52
  flex: 1 0 auto;
53
53
  padding: 0 $tabs-titles-gap;
54
54
  height: $tabs-titles-height;
55
- line-height: $tabs-titles-height;
55
+ // line-height: $tabs-titles-height;
56
56
  min-width: $tabs-titles-item-min-width;
57
57
  font-size: $tabs-titles-font-size;
58
58
  color: $tabs-titles-item-color;
@@ -50,7 +50,6 @@
50
50
  flex: 1 0 auto;
51
51
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
52
52
  height: var(--nutui-tabs-titles-height, 32px);
53
- line-height: var(--nutui-tabs-titles-height, 32px);
54
53
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
55
54
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-text));
56
55
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title));
@@ -52,7 +52,7 @@
52
52
  flex: 1 0 auto;
53
53
  padding: 0 $tabs-titles-gap;
54
54
  height: $tabs-titles-height;
55
- line-height: $tabs-titles-height;
55
+ // line-height: $tabs-titles-height;
56
56
  min-width: $tabs-titles-item-min-width;
57
57
  font-size: $tabs-titles-font-size;
58
58
  color: $tabs-titles-item-color;
@@ -50,7 +50,6 @@
50
50
  flex: 1 0 auto;
51
51
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
52
52
  height: var(--nutui-tabs-titles-height, 32px);
53
- line-height: var(--nutui-tabs-titles-height, 32px);
54
53
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
55
54
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-text));
56
55
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title));
@@ -52,7 +52,7 @@
52
52
  flex: 1 0 auto;
53
53
  padding: 0 $tabs-titles-gap;
54
54
  height: $tabs-titles-height;
55
- line-height: $tabs-titles-height;
55
+ // line-height: $tabs-titles-height;
56
56
  min-width: $tabs-titles-item-min-width;
57
57
  font-size: $tabs-titles-font-size;
58
58
  color: $tabs-titles-item-color;
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-size-base, 14px);
25
- line-height: var(--nutui-font-size-base, 14px);
26
25
  margin-top: var(--nutui-spacing-base, 8px);
27
26
  color: var(--nutui-color-text-help, #888b94);
28
27
  }
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-size-base, 14px);
25
- line-height: var(--nutui-font-size-base, 14px);
26
25
  margin-top: var(--nutui-spacing-base, 8px);
27
26
  color: var(--nutui-color-text-help, #888b94);
28
27
  }
@@ -20,7 +20,7 @@
20
20
  &-limit {
21
21
  text-align: right;
22
22
  font-size: $font-size-base;
23
- line-height: $font-size-base;
23
+ // line-height: $font-size-base;
24
24
  margin-top: $spacing-base;
25
25
  color: $color-text-help;
26
26
  &-disabled {
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-text);
25
- line-height: var(--nutui-font-text);
26
25
  margin-top: var(--nutui-spacing-base);
27
26
  color: var(--nutui-color-text-help);
28
27
  }
@@ -20,7 +20,7 @@
20
20
  &-limit {
21
21
  text-align: right;
22
22
  font-size: $font-size-base;
23
- line-height: $font-size-base;
23
+ // line-height: $font-size-base;
24
24
  margin-top: $spacing-base;
25
25
  color: $color-text-help;
26
26
  &-disabled {
@@ -22,7 +22,6 @@
22
22
  .nut-textarea-limit {
23
23
  text-align: right;
24
24
  font-size: var(--nutui-font-text);
25
- line-height: var(--nutui-font-text);
26
25
  margin-top: var(--nutui-spacing-base);
27
26
  color: var(--nutui-color-text-help);
28
27
  }
@@ -20,7 +20,7 @@
20
20
  &-limit {
21
21
  text-align: right;
22
22
  font-size: $font-size-base;
23
- line-height: $font-size-base;
23
+ // line-height: $font-size-base;
24
24
  margin-top: $spacing-base;
25
25
  color: $color-text-help;
26
26
  &-disabled {
@@ -588,7 +588,6 @@
588
588
  flex: 1 0 auto;
589
589
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
590
590
  height: var(--nutui-tabs-titles-height, 44px);
591
- line-height: var(--nutui-tabs-titles-height, 44px);
592
591
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
593
592
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
594
593
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -445,7 +445,6 @@
445
445
  flex: 1 0 auto;
446
446
  padding: 0 var(--nutui-tabs-titles-gap, 12px);
447
447
  height: var(--nutui-tabs-titles-height, 44px);
448
- line-height: var(--nutui-tabs-titles-height, 44px);
449
448
  min-width: var(--nutui-tabs-titles-item-min-width, 50px);
450
449
  font-size: var(--nutui-tabs-titles-font-size, var(--nutui-font-size-base, 14px));
451
450
  color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
@@ -33,7 +33,6 @@
33
33
  flex: 1;
34
34
  color: $color-title;
35
35
  font-size: $input-font-size;
36
- line-height: $input-lineheight;
37
36
  padding: 0;
38
37
  border: 0;
39
38
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title, #1a1a1a);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-size-xl, 18px));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title, #1a1a1a);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-size-base, 14px));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-size-xl, 18px));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -33,7 +33,6 @@
33
33
  flex: 1;
34
34
  color: $color-title;
35
35
  font-size: $input-font-size;
36
- line-height: $input-lineheight;
37
36
  padding: 0;
38
37
  border: 0;
39
38
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-text-large));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -33,7 +33,6 @@
33
33
  flex: 1;
34
34
  color: $color-title;
35
35
  font-size: $input-font-size;
36
- line-height: $input-lineheight;
37
36
  padding: 0;
38
37
  border: 0;
39
38
  outline: 0 none;
@@ -34,7 +34,6 @@
34
34
  flex: 1;
35
35
  color: var(--nutui-color-title);
36
36
  font-size: var(--nutui-input-font-size, var(--nutui-font-text));
37
- line-height: var(--nutui-input-lineheight, var(--nutui-font-text-large));
38
37
  padding: 0;
39
38
  border: 0;
40
39
  outline: 0 none;
@@ -36,7 +36,7 @@ export var NoticeBar = function(props) {
36
36
  var classPrefix = 'nut-noticebar';
37
37
  var wrapRef = useRef(null);
38
38
  var contentRef = useRef(null);
39
- var _useState = _sliced_to_array(useState(true), 2), showNoticeBar = _useState[0], SetShowNoticeBar = _useState[1];
39
+ var _useState = _sliced_to_array(useState(true), 2), showNoticeBar = _useState[0], setShowNoticeBar = _useState[1];
40
40
  var scrollList = useRef([]);
41
41
  var _useState1 = _sliced_to_array(useState(0), 2), wrapWidth = _useState1[0], SetWrapWidth = _useState1[1];
42
42
  var _useState2 = _sliced_to_array(useState(true), 2), firstRound = _useState2[0], SetFirstRound = _useState2[1];
@@ -171,12 +171,6 @@ export var NoticeBar = function(props) {
171
171
  click && click(event);
172
172
  onClick && onClick(event);
173
173
  };
174
- var onClickIcon = function(event) {
175
- event.stopPropagation();
176
- SetShowNoticeBar(!closeable);
177
- close && close(event);
178
- onClose && onClose(event);
179
- };
180
174
  var onAnimationEnd = function() {
181
175
  SetFirstRound(false);
182
176
  setTimeout(function() {
@@ -199,13 +193,16 @@ export var NoticeBar = function(props) {
199
193
  SetAnimate(false);
200
194
  }, time);
201
195
  };
202
- // 点击滚动单元
203
- var handleClickIcon = function(event) {
196
+ var handleClickIcon = useCallback(function(event) {
204
197
  event.stopPropagation();
205
- SetShowNoticeBar(!closeable);
198
+ setShowNoticeBar(!closeable);
206
199
  close && close(event);
207
200
  onClose && onClose(event);
208
- };
201
+ }, [
202
+ close,
203
+ onClose,
204
+ closeable
205
+ ]);
209
206
  var isEllipsis = function() {
210
207
  if (isCanScroll == null && align === 'left') {
211
208
  return wrap;
@@ -353,10 +350,12 @@ export var NoticeBar = function(props) {
353
350
  };
354
351
  // 无缝滚动第一个元素位移控制
355
352
  var itemStyle = function(index) {
356
- var style = {};
353
+ var style = {
354
+ width: '100%'
355
+ };
357
356
  if (height) {
358
357
  style.height = "".concat(height, "px");
359
- style.lineHeight = "".concat(height, "px");
358
+ // style.lineHeight = `${height}px`
360
359
  }
361
360
  var offset = childOffset[index];
362
361
  if (offset) {
@@ -425,74 +424,77 @@ export var NoticeBar = function(props) {
425
424
  container.current = ref;
426
425
  setIsContainerReady(true);
427
426
  }, []);
428
- return (
429
- /*#__PURE__*/ React.createElement(View, {
430
- className: cls,
431
- style: style
432
- }, showNoticeBar && direction === 'horizontal' ? /*#__PURE__*/ React.createElement(View, {
433
- className: noticebarClass,
434
- style: barStyle,
435
- onClick: handleClick
436
- }, leftIcon ? /*#__PURE__*/ React.createElement(View, {
427
+ var renderLeftIcon = useCallback(function() {
428
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, leftIcon ? /*#__PURE__*/ React.createElement(View, {
437
429
  className: "nut-noticebar-box-left-icon"
438
- }, leftIcon) : null, /*#__PURE__*/ React.createElement(View, {
439
- ref: wrapRef,
440
- className: "nut-noticebar-box-wrap"
441
- }, /*#__PURE__*/ React.createElement(View, {
442
- ref: contentRef,
443
- className: "nut-noticebar-box-wrap-content ".concat(animationClass, " ").concat(isEllipsis() ? 'nut-ellipsis' : ''),
444
- style: contentStyle,
445
- onAnimationEnd: onAnimationEnd
446
- }, children, content)), right ? /*#__PURE__*/ React.createElement(View, {
430
+ }, leftIcon) : null);
431
+ }, [
432
+ leftIcon
433
+ ]);
434
+ var renderRight = useCallback(function() {
435
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, right ? /*#__PURE__*/ React.createElement(View, {
447
436
  className: "nut-noticebar-box-right"
448
- }, right) : null, closeable || rightIcon ? /*#__PURE__*/ React.createElement(View, {
437
+ }, right) : null);
438
+ }, [
439
+ right
440
+ ]);
441
+ var renderRightIcon = useCallback(function() {
442
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, rightIcon || closeable ? /*#__PURE__*/ React.createElement(View, {
449
443
  className: "nut-noticebar-box-right-icon",
450
- onClick: onClickIcon
444
+ onClick: handleClickIcon
451
445
  }, rightIcon || /*#__PURE__*/ React.createElement(Close, {
452
446
  size: 12
453
- })) : null) : null, showNoticeBar && hasVerticalContent && isVertical ? /*#__PURE__*/ React.createElement(View, {
454
- className: "nut-noticebar-vertical",
455
- style: barStyle,
456
- ref: containerRefCallback,
457
- onClick: handleClick
458
- }, leftIcon ? /*#__PURE__*/ React.createElement(View, {
459
- className: "nut-noticebar-box-left-icon"
460
- }, leftIcon) : null, children ? /*#__PURE__*/ React.createElement(View, {
461
- className: "nut-noticebar-box-wrap",
462
- ref: innerRef
463
- }, scrollList.current.map(function(item, index) {
464
- return /*#__PURE__*/ React.createElement(View, {
465
- style: itemStyle(index),
466
- key: index,
467
- onClick: function(e) {
468
- handleItemClick(e, item);
469
- }
470
- }, item);
471
- })) : /*#__PURE__*/ React.createElement(View, {
472
- className: "nut-noticebar-box-horseLamp-list",
473
- style: horseLampStyle
474
- }, scrollList.current.map(function(item, index) {
475
- return (
476
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
477
- /*#__PURE__*/ (React.createElement(View, {
478
- className: "nut-noticebar-box-horseLamp-list-item",
479
- style: {
480
- height: height
481
- },
482
- key: index,
483
- onClick: function(e) {
484
- handleItemClick(e, item);
485
- }
486
- }, item))
487
- );
488
- })), /*#__PURE__*/ React.createElement(View, {
489
- className: "nut-noticebar-box-right-icon",
447
+ })) : null);
448
+ }, [
449
+ rightIcon,
450
+ closeable,
451
+ handleClickIcon
452
+ ]);
453
+ return /*#__PURE__*/ React.createElement(View, {
454
+ className: cls,
455
+ style: style
456
+ }, showNoticeBar && direction === 'horizontal' ? /*#__PURE__*/ React.createElement(View, {
457
+ className: noticebarClass,
458
+ style: barStyle,
459
+ onClick: handleClick
460
+ }, renderLeftIcon(), /*#__PURE__*/ React.createElement(View, {
461
+ ref: wrapRef,
462
+ className: "nut-noticebar-box-wrap"
463
+ }, /*#__PURE__*/ React.createElement(View, {
464
+ ref: contentRef,
465
+ className: "nut-noticebar-box-wrap-content ".concat(animationClass, " ").concat(isEllipsis() ? 'nut-ellipsis' : ''),
466
+ style: contentStyle,
467
+ onAnimationEnd: onAnimationEnd
468
+ }, children, content)), renderRight(), renderRightIcon()) : null, showNoticeBar && hasVerticalContent && isVertical ? /*#__PURE__*/ React.createElement(View, {
469
+ className: "nut-noticebar-vertical",
470
+ style: barStyle,
471
+ ref: containerRefCallback,
472
+ onClick: handleClick
473
+ }, renderLeftIcon(), children ? /*#__PURE__*/ React.createElement(View, {
474
+ className: "nut-noticebar-box-wrap",
475
+ ref: innerRef
476
+ }, scrollList.current.map(function(item, index) {
477
+ return /*#__PURE__*/ React.createElement(View, {
478
+ style: itemStyle(index),
479
+ key: index,
490
480
  onClick: function(e) {
491
- handleClickIcon(e);
481
+ handleItemClick(e, item);
492
482
  }
493
- }, rightIcon || (closeable ? /*#__PURE__*/ React.createElement(Close, {
494
- size: 12
495
- }) : null))) : null)
496
- );
483
+ }, item);
484
+ })) : /*#__PURE__*/ React.createElement(View, {
485
+ className: "nut-noticebar-box-horseLamp-list",
486
+ style: horseLampStyle
487
+ }, scrollList.current.map(function(item, index) {
488
+ return /*#__PURE__*/ React.createElement(View, {
489
+ className: "nut-noticebar-box-horseLamp-list-item",
490
+ style: {
491
+ height: height
492
+ },
493
+ key: index,
494
+ onClick: function(e) {
495
+ handleItemClick(e, item);
496
+ }
497
+ }, item);
498
+ })), renderRight(), renderRightIcon()) : null);
497
499
  };
498
500
  NoticeBar.displayName = 'NutNoticeBar';