@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.
- package/es/ellipsis/index.js +21 -18
- package/es/ellipsis/index.less +7 -0
- package/es/table/index.less +6 -0
- package/package.json +1 -1
package/es/ellipsis/index.js
CHANGED
|
@@ -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 {
|
|
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(
|
|
96
|
-
|
|
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
|
-
|
|
102
|
+
color: token.colorPrimary,
|
|
103
|
+
display: 'block'
|
|
102
104
|
},
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
118
|
+
placement: "bottomLeft"
|
|
119
|
+
// destroyTooltipOnHide
|
|
120
|
+
,
|
|
118
121
|
overlayInnerStyle: {
|
|
119
122
|
whiteSpace: 'normal'
|
|
120
123
|
},
|
package/es/ellipsis/index.less
CHANGED
package/es/table/index.less
CHANGED