@lobehub/ui 2.5.4 → 2.5.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 (2) hide show
  1. package/es/Text/Text.js +8 -8
  2. package/package.json +1 -1
package/es/Text/Text.js CHANGED
@@ -83,15 +83,15 @@ var Text = /*#__PURE__*/memo(function (_ref) {
83
83
  }
84
84
  });
85
85
  }, [styles]);
86
- var textStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), color && {
86
+ var textStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, color && {
87
87
  color: color
88
88
  }), weight && {
89
89
  fontWeight: weight
90
90
  }), _typeof(ellipsis) === 'object' && ellipsis.rows && {
91
91
  WebkitLineClamp: ellipsis.rows
92
- }), {}, {
92
+ }), fontSize && {
93
93
  fontSize: fontSize
94
- });
94
+ }), style);
95
95
  var content = /*#__PURE__*/_jsx(Container, _objectSpread(_objectSpread({
96
96
  className: cx(variants({
97
97
  as: ['h1', 'h2', 'h3', 'h4', 'h5', 'p'].includes(Container) ? Container : undefined,
@@ -111,11 +111,11 @@ var Text = /*#__PURE__*/memo(function (_ref) {
111
111
  }));
112
112
 
113
113
  // 处理带有 tooltip 的省略
114
- if (ellipsis) {
115
- var title = typeof ellipsis === 'string' ? ellipsis : children;
116
- if (_typeof(ellipsis) === 'object') return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
117
- title: title
118
- }, ellipsis), {}, {
114
+ if (ellipsis && _typeof(ellipsis) === 'object' && ellipsis.tooltip) {
115
+ var _ellipsis$tooltip;
116
+ var title = typeof ellipsis.tooltip === 'string' ? ellipsis.tooltip : children;
117
+ if (_typeof(ellipsis.tooltip) === 'object') return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({}, ellipsis.tooltip), {}, {
118
+ title: ((_ellipsis$tooltip = ellipsis.tooltip) === null || _ellipsis$tooltip === void 0 ? void 0 : _ellipsis$tooltip.title) || title,
119
119
  children: content
120
120
  }));
121
121
  return /*#__PURE__*/_jsx(Tooltip, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.5.4",
3
+ "version": "2.5.6",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",