@yilianjituan/yilian_dgerm 1.0.5-alpha.1 → 1.0.5-alpha.2

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.
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface IndexProps {
3
+ className?: string;
3
4
  text: string;
4
5
  rows?: number;
5
6
  copy?: boolean;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["text", "rows", "copy", "type", "expandable", "ellipsis"];
2
+ var _excluded = ["className", "text", "rows", "copy", "type", "expandable", "ellipsis"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -21,7 +21,8 @@ import "./index.scss";
21
21
  // 参考antd的Typography,只能用与Paragraph
22
22
  /// 如果需要自定义,则手动传入ellipsis,会覆盖默认值
23
23
  var Index = function Index(props) {
24
- var text = props.text,
24
+ var className = props.className,
25
+ text = props.text,
25
26
  _props$rows = props.rows,
26
27
  rows = _props$rows === void 0 ? 1 : _props$rows,
27
28
  _props$copy = props.copy,
@@ -41,7 +42,7 @@ var Index = function Index(props) {
41
42
  var textRender = function textRender() {
42
43
  return /*#__PURE__*/React.createElement(Typography.Paragraph, _extends({
43
44
  // rows = 1时,需要自行设置css,否则会默认全部展示
44
- className: rows === 1 && !expanded && !expandable ? 'custom_Typography_row1' : '',
45
+ className: "".concat(rows === 1 && !expanded && !expandable ? 'custom_Typography_row1' : '', " ").concat(className || ''),
45
46
  style: {
46
47
  marginBottom: 0,
47
48
  color: '#000000'
@@ -62,6 +63,7 @@ var Index = function Index(props) {
62
63
  }, rest), /*#__PURE__*/React.createElement(React.Fragment, null, text || ''));
63
64
  };
64
65
  return /*#__PURE__*/React.createElement(React.Fragment, null, !expanded ? /*#__PURE__*/React.createElement(Tooltip, {
66
+ className: "".concat(className || ''),
65
67
  title: text
66
68
  }, textRender()) : /*#__PURE__*/React.createElement(React.Fragment, null, textRender()));
67
69
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yilianjituan/yilian_dgerm",
3
- "version": "1.0.5-alpha.1",
3
+ "version": "1.0.5-alpha.2",
4
4
  "description": "A react library developed with dumi",
5
5
  "keywords": [
6
6
  "React",