Commit 51b09f3d authored by zhangwenshuai's avatar zhangwenshuai

update

parent f3cf7e75
......@@ -11,6 +11,9 @@ export const ApolloTextAreaDetail = (props: TextAreaProps) => {
return null;
}
const [value, setValue] = useState(formatValue);
useEffect(() => {
setValue(formatValue);
}, [formatValue]);
const { cutLength, getDetail } = componentAttr;
const [dotVisible, setDotVisible] = useState(false);
const container = useRef(null);
......@@ -44,11 +47,15 @@ export const ApolloTextAreaDetail = (props: TextAreaProps) => {
<div className={styles.container} ref={container}>
{dotVisible ? (
<Tooltip
overlayClassName={styles.tooltip}
overlayClassName={styles.tooltip}
title={
<div className={styles.tooltipTitle}>
{value}
{value.length === cutLength && <span className={styles.more} onClick={getMore}>查看更多</span>}
{value.length === cutLength && (
<span className={styles.more} onClick={getMore}>
查看更多
</span>
)}
</div>
}
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment