@nutui/nutui-react 3.0.17 → 3.0.18

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 (63) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/packages/lottie/animation/dark/global.gif +0 -0
  3. package/dist/cjs/packages/lottie/animation/dark/global.json +0 -0
  4. package/dist/cjs/packages/lottie/animation/dark/loading.gif +0 -0
  5. package/dist/cjs/packages/lottie/animation/dark/loading.json +0 -0
  6. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh-white.gif +0 -0
  7. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh-white.json +0 -0
  8. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh.gif +0 -0
  9. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh.json +0 -0
  10. package/dist/cjs/packages/lottie/animation/light/global.gif +0 -0
  11. package/dist/cjs/packages/lottie/animation/light/global.json +0 -0
  12. package/dist/cjs/packages/lottie/animation/light/loading.gif +0 -0
  13. package/dist/cjs/packages/lottie/animation/light/loading.json +0 -0
  14. package/dist/cjs/packages/lottie/animation/light/pulltorefresh.gif +0 -0
  15. package/dist/cjs/packages/lottie/animation/light/pulltorefresh.json +0 -0
  16. package/dist/cjs/packages/noticebar/style/noticebar.scss +6 -0
  17. package/dist/cjs/packages/noticebar/style/style.css +6 -0
  18. package/dist/cjs/packages/noticebar/style-jmapp/noticebar.scss +6 -0
  19. package/dist/cjs/packages/noticebar/style-jmapp/style.css +6 -0
  20. package/dist/cjs/packages/noticebar/style-jrkf/noticebar.scss +6 -0
  21. package/dist/cjs/packages/noticebar/style-jrkf/style.css +6 -0
  22. package/dist/cjs/packages/notify/notify.d.ts +1 -1
  23. package/dist/cjs/packages/notify/notify.js +5 -2
  24. package/dist/cjs/packages/price/price.js +42 -14
  25. package/dist/cjs/types/spec/price/base.d.ts +8 -2
  26. package/dist/cjs/types/spec/price/base.js +12 -0
  27. package/dist/cjs/utils/taro/get-rect.d.ts +1 -0
  28. package/dist/cjs/utils/taro/get-rect.js +36 -0
  29. package/dist/es/packages/lottie/animation/dark/global.gif +0 -0
  30. package/dist/es/packages/lottie/animation/dark/global.json +0 -0
  31. package/dist/es/packages/lottie/animation/dark/loading.gif +0 -0
  32. package/dist/es/packages/lottie/animation/dark/loading.json +0 -0
  33. package/dist/es/packages/lottie/animation/dark/pulltorefresh-white.gif +0 -0
  34. package/dist/es/packages/lottie/animation/dark/pulltorefresh-white.json +0 -0
  35. package/dist/es/packages/lottie/animation/dark/pulltorefresh.gif +0 -0
  36. package/dist/es/packages/lottie/animation/dark/pulltorefresh.json +0 -0
  37. package/dist/es/packages/lottie/animation/light/global.gif +0 -0
  38. package/dist/es/packages/lottie/animation/light/global.json +0 -0
  39. package/dist/es/packages/lottie/animation/light/loading.gif +0 -0
  40. package/dist/es/packages/lottie/animation/light/loading.json +0 -0
  41. package/dist/es/packages/lottie/animation/light/pulltorefresh.gif +0 -0
  42. package/dist/es/packages/lottie/animation/light/pulltorefresh.json +0 -0
  43. package/dist/es/packages/noticebar/style/noticebar.scss +6 -0
  44. package/dist/es/packages/noticebar/style/style.css +6 -0
  45. package/dist/es/packages/noticebar/style-jmapp/noticebar.scss +6 -0
  46. package/dist/es/packages/noticebar/style-jmapp/style.css +6 -0
  47. package/dist/es/packages/noticebar/style-jrkf/noticebar.scss +6 -0
  48. package/dist/es/packages/noticebar/style-jrkf/style.css +6 -0
  49. package/dist/es/packages/notify/notify.d.ts +1 -1
  50. package/dist/es/packages/notify/notify.js +5 -2
  51. package/dist/es/packages/price/price.js +41 -14
  52. package/dist/es/types/spec/price/base.d.ts +10 -4
  53. package/dist/es/types/spec/price/base.js +6 -1
  54. package/dist/es/utils/taro/get-rect.d.ts +1 -0
  55. package/dist/es/utils/taro/get-rect.js +34 -0
  56. package/dist/nutui.react.umd.js +1083 -922
  57. package/dist/style-jmapp.css +1 -1
  58. package/dist/style-jmapp.scss +31 -31
  59. package/dist/style-jrkf.css +1 -1
  60. package/dist/style-jrkf.scss +30 -30
  61. package/dist/style.css +1 -1
  62. package/dist/style.scss +44 -44
  63. package/package.json +1 -72
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v3.0.18
2
+ `2025-08-15`
3
+
4
+
5
+ * 🏡 chore: 升级icon库 (#3330)
6
+ * 🏡 chore: 发布taro下的样式按需插件
7
+ * 📖 docs: 更新介绍部分内容 (#3324)
8
+ * :sparkles: feat: Ellipsis校验越界不走缓存配置 (#3329)
9
+ * :sparkles: feat(price): 支持自定义颜色&数据原样输出 (#3328)
10
+ * :sparkles: feat(notify): 支持promise调用notice (#3319)
11
+ * :bug: fix(noticebar): 适配鸿蒙样式修复 (#3332)
12
+ * :bug: Fix icons svg (#3331)
13
+
14
+
15
+ # v3.0.17
16
+
17
+ `2025-08-01`
18
+
19
+ - :sparkles: feat: add plugin for bizui using nutui (#3318)
20
+ - :bug: fix(skeleton): correct v3 update docs (#3313)
21
+ - :bug: fix(pulltorefresh): 增加 catchMove 属性,用于显示控制 (#3311)
22
+ - :bug: fix: 修复日历只有一个月的情况 (#3306)
23
+ - 🏡 chore(harmonycss): 每个组件构建全量的css (#3316)
24
+
1
25
  # v3.0.16
2
26
 
3
27
  `2025-07-04`
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  declare const _default: {
3
- text(message: string | React.ReactNode, option?: {}): void;
3
+ text(message: string | React.ReactNode, option?: {}): Promise<void>;
4
4
  hide(): void;
5
5
  };
6
6
  export default _default;
@@ -39,8 +39,11 @@ function getInstance(props, callback) {
39
39
  }
40
40
  function notice(opts) {
41
41
  opts = (0, _object_spread._)({}, options, opts);
42
- getInstance(opts, function(notification) {
43
- messageInstance = notification;
42
+ return new Promise(function(resolve) {
43
+ getInstance(opts, function(notification) {
44
+ messageInstance = notification;
45
+ resolve();
46
+ });
44
47
  });
45
48
  }
46
49
  var errorMsg = function errorMsg(message) {
@@ -9,14 +9,16 @@ Object.defineProperty(exports, "Price", {
9
9
  }
10
10
  });
11
11
  var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
12
+ var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
13
  var _define_property = require("@swc/helpers/_/_define_property");
13
14
  var _object_spread = require("@swc/helpers/_/_object_spread");
14
15
  var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
15
16
  var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
16
- var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
17
+ var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
17
18
  var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
18
19
  var _typings = require("../../utils/typings");
19
20
  var _index = require("../configprovider/index");
21
+ var _types = require("../../types");
20
22
  var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
21
23
  color: 'primary',
22
24
  price: 0,
@@ -28,7 +30,7 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
28
30
  line: false
29
31
  });
30
32
  var Price = function Price(props) {
31
- var _ref = (0, _object_spread._)({}, defaultProps, props), color = _ref.color, price = _ref.price, symbol = _ref.symbol, digits = _ref.digits, thousands = _ref.thousands, position = _ref.position, size = _ref.size, line = _ref.line, className = _ref.className, style = _ref.style, rest = (0, _object_without_properties._)(_ref, [
33
+ var _ref = (0, _object_spread._)({}, defaultProps, props), color = _ref.color, originalPrice = _ref.price, symbol = _ref.symbol, digits = _ref.digits, thousands = _ref.thousands, position = _ref.position, size = _ref.size, line = _ref.line, className = _ref.className, style = _ref.style, rest = (0, _object_without_properties._)(_ref, [
32
34
  "color",
33
35
  "price",
34
36
  "symbol",
@@ -42,6 +44,25 @@ var Price = function Price(props) {
42
44
  ]);
43
45
  var classPrefix = 'nut-price';
44
46
  var rtl = (0, _index.useRtl)();
47
+ var price = (0, _react.useMemo)(function() {
48
+ return originalPrice.toString().replace(/[^\d.]/g, '');
49
+ }, [
50
+ originalPrice
51
+ ]);
52
+ var isCustomPriceColor = (0, _react.useMemo)(function() {
53
+ var specificPriceColor = Object.values(_types.PriceColorEnum);
54
+ return !specificPriceColor.includes(color);
55
+ }, [
56
+ color
57
+ ]);
58
+ var priceColorStyle = (0, _react.useMemo)(function() {
59
+ return isCustomPriceColor ? {
60
+ color: color
61
+ } : {};
62
+ }, [
63
+ isCustomPriceColor,
64
+ color
65
+ ]);
45
66
  var checkPoint = function checkPoint(price) {
46
67
  return String(price).indexOf('.') > 0;
47
68
  };
@@ -63,14 +84,17 @@ var Price = function Price(props) {
63
84
  decimalNum = 0;
64
85
  }
65
86
  if (checkPoint(decimalNum)) {
66
- decimalNum = Number(decimalNum).toFixed(digits);
67
- decimalNum = typeof decimalNum.split('.') === 'string' ? 0 : decimalNum.split('.')[1] || 0;
87
+ decimalNum = digits ? Number(decimalNum).toFixed(digits) : "".concat(decimalNum);
88
+ decimalNum = typeof decimalNum.split('.') === 'string' ? 0 : decimalNum.split('.')[1] || '';
68
89
  } else {
69
- decimalNum = 0;
90
+ decimalNum = '';
91
+ }
92
+ if (digits) {
93
+ var result = "0.".concat(decimalNum);
94
+ var resultFixed = Number(result).toFixed(digits);
95
+ return String(resultFixed).substring(2, resultFixed.length);
70
96
  }
71
- var result = "0.".concat(decimalNum);
72
- var resultFixed = Number(result).toFixed(digits);
73
- return String(resultFixed).substring(2, resultFixed.length);
97
+ return decimalNum;
74
98
  };
75
99
  var renderSymbol = function renderSymbol() {
76
100
  var _obj;
@@ -80,20 +104,24 @@ var Price = function Price(props) {
80
104
  "".concat(classPrefix, "-symbol-").concat(size),
81
105
  (_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-line"), line), (0, _define_property._)(_obj, "".concat(classPrefix, "-rtl"), rtl), _obj)
82
106
  ]),
107
+ style: priceColorStyle,
83
108
  dangerouslySetInnerHTML: {
84
109
  __html: symbol || ''
85
110
  }
86
111
  });
87
112
  };
88
113
  return /*#__PURE__*/ _react.default.createElement("div", (0, _object_spread._)({
89
- className: "".concat(classPrefix, " ").concat(classPrefix, "-").concat(color, " ").concat(className),
114
+ className: "".concat(classPrefix, " ").concat(classPrefix, "-").concat(isCustomPriceColor ? 'custom' : color, " ").concat(className),
90
115
  style: style
91
116
  }, rest), symbol && position === 'before' ? renderSymbol() : null, /*#__PURE__*/ _react.default.createElement("div", {
92
- className: "".concat(classPrefix, "-integer ").concat(classPrefix, "-integer-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : '')
93
- }, formatThousands(price)), digits ? /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement("div", {
94
- className: "".concat(classPrefix, "-decimal ").concat(classPrefix, "-decimal-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : '')
95
- }, "."), /*#__PURE__*/ _react.default.createElement("div", {
96
- className: "".concat(classPrefix, "-decimal ").concat(classPrefix, "-decimal-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : '')
117
+ className: "".concat(classPrefix, "-integer ").concat(classPrefix, "-integer-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : ''),
118
+ style: priceColorStyle
119
+ }, formatThousands(price)), digits !== 0 ? /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, checkPoint(price) || digits ? /*#__PURE__*/ _react.default.createElement("div", {
120
+ className: "".concat(classPrefix, "-decimal ").concat(classPrefix, "-decimal-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : ''),
121
+ style: priceColorStyle
122
+ }, ".") : null, /*#__PURE__*/ _react.default.createElement("div", {
123
+ className: "".concat(classPrefix, "-decimal ").concat(classPrefix, "-decimal-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : ''),
124
+ style: priceColorStyle
97
125
  }, formatDecimal(price))) : null, symbol && position === 'after' ? renderSymbol() : null);
98
126
  };
99
127
  Price.displayName = 'NutPrice';
@@ -1,12 +1,18 @@
1
1
  import { BaseProps } from '../../base/props';
2
2
  import { SimpleValue, UISize } from '../../base/atoms';
3
3
  export type PriceSize = Exclude<UISize, 'mini'>;
4
- export type PriceColor = 'primary' | 'gray' | 'darkgray';
4
+ export type SpecificPriceColor = 'primary' | 'gray' | 'darkgray';
5
+ export type PriceColor = SpecificPriceColor | string;
6
+ export declare enum PriceColorEnum {
7
+ Primary = "primary",
8
+ Gray = "gray",
9
+ Darkgray = "darkgray"
10
+ }
5
11
  export interface BasePrice extends BaseProps {
6
12
  color: PriceColor;
7
13
  price: SimpleValue;
8
14
  symbol: string;
9
- digits: number;
15
+ digits: number | null;
10
16
  thousands: boolean;
11
17
  position: string;
12
18
  size: PriceSize;
@@ -2,3 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ Object.defineProperty(exports, "PriceColorEnum", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PriceColorEnum;
9
+ }
10
+ });
11
+ var PriceColorEnum = /*#__PURE__*/ function(PriceColorEnum) {
12
+ PriceColorEnum["Primary"] = "primary";
13
+ PriceColorEnum["Gray"] = "gray";
14
+ PriceColorEnum["Darkgray"] = "darkgray";
15
+ return PriceColorEnum;
16
+ }({});
@@ -10,3 +10,4 @@ export interface Rect {
10
10
  }
11
11
  export declare function makeRect(width: number, height: number): Rect;
12
12
  export declare const getRectInMultiPlatform: (element: any, harmonyId?: string) => Promise<Rect>;
13
+ export declare const getRectInMultiPlatformWithoutCache: (element: any, harmonyId?: string) => Promise<Rect>;
@@ -12,6 +12,9 @@ _export(exports, {
12
12
  getRectInMultiPlatform: function() {
13
13
  return getRectInMultiPlatform;
14
14
  },
15
+ getRectInMultiPlatformWithoutCache: function() {
16
+ return getRectInMultiPlatformWithoutCache;
17
+ },
15
18
  makeRect: function() {
16
19
  return makeRect;
17
20
  }
@@ -74,3 +77,36 @@ var getRectInMultiPlatform = /*#__PURE__*/ function() {
74
77
  return _ref.apply(this, arguments);
75
78
  };
76
79
  }();
80
+ var getRectInMultiPlatformWithoutCache = /*#__PURE__*/ function() {
81
+ var _ref = (0, _async_to_generator._)(function(element) {
82
+ var harmonyId;
83
+ var _arguments = arguments;
84
+ return (0, _ts_generator._)(this, function(_state) {
85
+ harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : '';
86
+ if (element) {
87
+ if (_getrect.inBrowser) {
88
+ return [
89
+ 2,
90
+ Promise.resolve((0, _getrect.getRect)(element))
91
+ ];
92
+ }
93
+ return [
94
+ 2,
95
+ new Promise(function(resolve, reject) {
96
+ (0, _taro.createSelectorQuery)().select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
97
+ var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
98
+ resolve(rects);
99
+ });
100
+ })
101
+ ];
102
+ }
103
+ return [
104
+ 2,
105
+ Promise.resolve(makeRect(0, 0))
106
+ ];
107
+ });
108
+ });
109
+ return function getRectInMultiPlatformWithoutCache(element) {
110
+ return _ref.apply(this, arguments);
111
+ };
112
+ }();
File without changes
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;