@ccs-ui/rc-pro 2.3.6-beta-18 → 2.3.6-beta-20

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.
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { CopyOutlined } from '@ant-design/icons';
8
8
  import CcsUtils from '@ccs-ui/utils';
9
- import { Button, Popover } from 'antd';
9
+ import { Popover, theme } from 'antd';
10
10
  import React from 'react';
11
11
  import CcsDialog from "../dialog";
12
12
  import "./index.less";
@@ -15,6 +15,7 @@ import { useResizeEffect } from "./useResizeEffect";
15
15
  import { withStopPropagation } from "./withStopPropagation";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { Fragment as _Fragment } from "react/jsx-runtime";
18
19
  var classPrefix = "ccs-ellipsis";
19
20
  var defaultProps = {
20
21
  direction: 'end',
@@ -35,6 +36,8 @@ var defaultProps = {
35
36
  */
36
37
  var CcsEllipsis = function CcsEllipsis(p) {
37
38
  var props = CcsUtils.mergeProps(defaultProps, p);
39
+ var _theme$useToken = theme.useToken(),
40
+ token = _theme$useToken.token;
38
41
  var direction = props.direction,
39
42
  rows = props.rows,
40
43
  expandText = props.expandText,
@@ -91,30 +94,30 @@ var CcsEllipsis = function CcsEllipsis(p) {
91
94
  if (showTooltip) {
92
95
  return /*#__PURE__*/_jsx(Popover, {
93
96
  zIndex: 9999,
97
+ rootClassName: "ccs-ellipsis-tooltips",
94
98
  content: function content() {
95
- return /*#__PURE__*/_jsxs("div", {
96
- style: {
97
- maxWidth: 300
98
- },
99
- children: [_content, /*#__PURE__*/_jsx("div", {
99
+ return /*#__PURE__*/_jsxs(_Fragment, {
100
+ children: [_content, /*#__PURE__*/_jsxs("a", {
100
101
  style: {
101
- textAlign: 'right'
102
+ color: token.colorPrimary,
103
+ display: 'block'
102
104
  },
103
- children: /*#__PURE__*/_jsx(Button, {
104
- icon: /*#__PURE__*/_jsx(CopyOutlined, {}),
105
- size: "small",
106
- type: "link",
107
- onClick: function onClick() {
108
- var _CcsDialog$message;
109
- CcsUtils.copy(_content);
110
- (_CcsDialog$message = CcsDialog.message) === null || _CcsDialog$message === void 0 || _CcsDialog$message.info('复制成功');
105
+ onClick: function onClick() {
106
+ var _CcsDialog$message;
107
+ CcsUtils.copy(_content);
108
+ (_CcsDialog$message = CcsDialog.message) === null || _CcsDialog$message === void 0 || _CcsDialog$message.info('复制成功');
109
+ },
110
+ children: [/*#__PURE__*/_jsx(CopyOutlined, {
111
+ style: {
112
+ marginRight: 5
111
113
  }
112
- })
114
+ }), "\u590D\u5236"]
113
115
  })]
114
116
  });
115
117
  },
116
- placement: "bottomLeft",
117
- destroyTooltipOnHide: true,
118
+ placement: "bottomLeft"
119
+ // destroyTooltipOnHide
120
+ ,
118
121
  overlayInnerStyle: {
119
122
  whiteSpace: 'normal'
120
123
  },
@@ -3,3 +3,10 @@
3
3
  line-height: 1.5;
4
4
  word-break: break-word;
5
5
  }
6
+
7
+ .ccs-ellipsis-tooltips {
8
+ .ant-popover-inner {
9
+ max-height: 50%;
10
+ overflow: auto;
11
+ }
12
+ }
@@ -150,3 +150,9 @@
150
150
  }
151
151
  }
152
152
  }
153
+
154
+ .ccs-table-ellipsis {
155
+ overflow: hidden;
156
+ text-overflow: ellipsis;
157
+ white-space: nowrap;
158
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "2.3.6-beta-18",
3
+ "version": "2.3.6-beta-20",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": {