@hw-component/table 1.9.76 → 1.9.79
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/index.css +4 -6
- package/es/render/CopyComponent.js +10 -1
- package/lib/index.css +4 -6
- package/lib/render/CopyComponent.js +10 -1
- package/package.json +1 -1
- package/src/components/HTableBody/HeaderTitle/index.tsx +1 -1
- package/src/components/index.less +8 -7
- package/src/components/render/CopyComponent.tsx +10 -1
- package/src/index.less +6 -1
- package/src/pages/Table/index.tsx +1 -1
package/es/index.css
CHANGED
|
@@ -118,17 +118,15 @@
|
|
|
118
118
|
display: -ms-flexbox;
|
|
119
119
|
display: flex;
|
|
120
120
|
position: relative;
|
|
121
|
-
padding: 10px;
|
|
122
|
-
margin: -10px;
|
|
123
|
-
overflow-x: auto;
|
|
124
121
|
box-sizing: border-box;
|
|
122
|
+
overflow: auto;
|
|
123
|
+
margin: -10px 0px;
|
|
124
|
+
padding: 10px 0px;
|
|
125
|
+
margin-right: 12px;
|
|
125
126
|
}
|
|
126
127
|
.ant-hw-table-header-title-box .ant-hw-table-header-title-box-content {
|
|
127
128
|
white-space: nowrap;
|
|
128
129
|
}
|
|
129
|
-
.ant-hw-table-header-right-node {
|
|
130
|
-
padding-left: 12px;
|
|
131
|
-
}
|
|
132
130
|
.ant-hw-table-render-copy {
|
|
133
131
|
margin-bottom: 0 !important;
|
|
134
132
|
color: #1890ff !important;
|
|
@@ -3,6 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import copy from 'copy-to-clipboard';
|
|
4
4
|
import { Typography, message } from 'antd';
|
|
5
5
|
import { useClassName } from '../hooks/index.js';
|
|
6
|
+
import { useMemo } from 'react';
|
|
6
7
|
|
|
7
8
|
var Paragraph = Typography.Paragraph;
|
|
8
9
|
var CopyComponent = (function (_ref) {
|
|
@@ -11,8 +12,16 @@ var CopyComponent = (function (_ref) {
|
|
|
11
12
|
successMsg = _ref.successMsg,
|
|
12
13
|
ellipsis = _ref.ellipsis;
|
|
13
14
|
var className = useClassName("hw-table-render-copy");
|
|
15
|
+
var propsEllipsis = useMemo(function () {
|
|
16
|
+
if (ellipsis === true) {
|
|
17
|
+
return {
|
|
18
|
+
tooltip: text
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return ellipsis;
|
|
22
|
+
}, [ellipsis, text]);
|
|
14
23
|
return jsx(Paragraph, {
|
|
15
|
-
ellipsis:
|
|
24
|
+
ellipsis: propsEllipsis,
|
|
16
25
|
className: className,
|
|
17
26
|
style: {
|
|
18
27
|
margin: 0,
|
package/lib/index.css
CHANGED
|
@@ -118,17 +118,15 @@
|
|
|
118
118
|
display: -ms-flexbox;
|
|
119
119
|
display: flex;
|
|
120
120
|
position: relative;
|
|
121
|
-
padding: 10px;
|
|
122
|
-
margin: -10px;
|
|
123
|
-
overflow-x: auto;
|
|
124
121
|
box-sizing: border-box;
|
|
122
|
+
overflow: auto;
|
|
123
|
+
margin: -10px 0px;
|
|
124
|
+
padding: 10px 0px;
|
|
125
|
+
margin-right: 12px;
|
|
125
126
|
}
|
|
126
127
|
.ant-hw-table-header-title-box .ant-hw-table-header-title-box-content {
|
|
127
128
|
white-space: nowrap;
|
|
128
129
|
}
|
|
129
|
-
.ant-hw-table-header-right-node {
|
|
130
|
-
padding-left: 12px;
|
|
131
|
-
}
|
|
132
130
|
.ant-hw-table-render-copy {
|
|
133
131
|
margin-bottom: 0 !important;
|
|
134
132
|
color: #1890ff !important;
|
|
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var copy = require('copy-to-clipboard');
|
|
7
7
|
var antd = require('antd');
|
|
8
8
|
var index = require('../hooks/index.js');
|
|
9
|
+
var React = require('react');
|
|
9
10
|
|
|
10
11
|
var Paragraph = antd.Typography.Paragraph;
|
|
11
12
|
var CopyComponent = (function (_ref) {
|
|
@@ -14,8 +15,16 @@ var CopyComponent = (function (_ref) {
|
|
|
14
15
|
successMsg = _ref.successMsg,
|
|
15
16
|
ellipsis = _ref.ellipsis;
|
|
16
17
|
var className = index.useClassName("hw-table-render-copy");
|
|
18
|
+
var propsEllipsis = React.useMemo(function () {
|
|
19
|
+
if (ellipsis === true) {
|
|
20
|
+
return {
|
|
21
|
+
tooltip: text
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return ellipsis;
|
|
25
|
+
}, [ellipsis, text]);
|
|
17
26
|
return jsxRuntime.jsx(Paragraph, {
|
|
18
|
-
ellipsis:
|
|
27
|
+
ellipsis: propsEllipsis,
|
|
19
28
|
className: className,
|
|
20
29
|
style: {
|
|
21
30
|
margin: 0,
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ export default ({ headerTitle, contentStyle, rNode }: IProps) => {
|
|
|
20
20
|
}
|
|
21
21
|
return (
|
|
22
22
|
<Row justify={"space-between"} align={"middle"} style={contentStyle}>
|
|
23
|
-
<div className={headerBox}>
|
|
23
|
+
<div className={headerBox} >
|
|
24
24
|
<div className={headerBoxContent}>
|
|
25
25
|
{headerTitle &&
|
|
26
26
|
React.cloneElement(
|
|
@@ -106,24 +106,25 @@
|
|
|
106
106
|
color:#1890ff;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
.@{ant-prefix}-hw-table-pointer-not-hover{
|
|
109
|
+
.@{ant-prefix}-hw-table-pointer-not-hover {
|
|
110
110
|
cursor: pointer;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.@{ant-prefix}-hw-table-header-title-box{
|
|
113
|
+
.@{ant-prefix}-hw-table-header-title-box {
|
|
114
114
|
flex: 1;
|
|
115
115
|
display: flex;
|
|
116
116
|
position: relative;
|
|
117
|
-
padding: 10px;
|
|
118
|
-
margin: -10px;
|
|
119
|
-
overflow-x: auto;
|
|
120
117
|
box-sizing: border-box;
|
|
121
|
-
|
|
118
|
+
overflow: auto;
|
|
119
|
+
margin: -10px 0px;
|
|
120
|
+
padding: 10px 0px;
|
|
121
|
+
margin-right: 12px;
|
|
122
|
+
.@{ant-prefix}-hw-table-header-title-box-content {
|
|
122
123
|
white-space: nowrap;
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
.@{ant-prefix}-hw-table-header-right-node{
|
|
126
|
-
|
|
127
|
+
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
.@{ant-prefix}-hw-table-render-copy{
|
|
@@ -2,6 +2,7 @@ import copy from "copy-to-clipboard";
|
|
|
2
2
|
import { message, Typography } from "antd";
|
|
3
3
|
import type { EllipsisConfig } from "antd/lib/typography/Base";
|
|
4
4
|
import { useClassName } from "../hooks";
|
|
5
|
+
import {useMemo} from "react";
|
|
5
6
|
const { Paragraph } = Typography;
|
|
6
7
|
interface IProps {
|
|
7
8
|
text: string;
|
|
@@ -11,9 +12,17 @@ interface IProps {
|
|
|
11
12
|
}
|
|
12
13
|
export default ({ cpText, text, successMsg, ellipsis }: IProps) => {
|
|
13
14
|
const className = useClassName("hw-table-render-copy");
|
|
15
|
+
const propsEllipsis=useMemo(()=>{
|
|
16
|
+
if (ellipsis===true){
|
|
17
|
+
return {
|
|
18
|
+
tooltip:text
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return ellipsis;
|
|
22
|
+
},[ellipsis,text]);
|
|
14
23
|
return (
|
|
15
24
|
<Paragraph
|
|
16
|
-
ellipsis={
|
|
25
|
+
ellipsis={propsEllipsis}
|
|
17
26
|
className={className}
|
|
18
27
|
style={{ margin: 0, width: "100%", padding: 0 }}
|
|
19
28
|
onClick={() => {
|
package/src/index.less
CHANGED