fix: ux bug

This commit is contained in:
jialin
2024-07-02 17:30:03 +08:00
parent 49efbd1a7f
commit 316019586f
19 changed files with 102 additions and 133 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ const LineChart: React.FC<LineChartProps> = (props) => {
yField: yField || 'value',
autoFit: true,
slider,
shapeField: 'smooth',
// shapeField: 'smooth',
axis: {
x: {
textStyle: {
@@ -5,7 +5,6 @@
height: 54px;
padding: 0 16px;
border-radius: var(--ant-table-header-border-radius);
background-color: var(--color-fill-1);
transition: all 0.2s ease;
&:hover {
+1 -1
View File
@@ -12,7 +12,7 @@
overflow: hidden;
&.download {
background-color: rgb(47 191 133 / 30%);
background-color: var(--ant-blue-2);
}
.download {
+9 -1
View File
@@ -13,11 +13,18 @@ interface TransitionWrapProps {
header?: React.ReactNode;
variant?: 'bordered' | 'filled';
children: React.ReactNode;
setCollapsed?: (val: boolean) => void;
ref?: any;
}
const TransitionWrapper: React.FC<TransitionWrapProps> = forwardRef(
(props, ref) => {
const { minHeight = 50, header, variant = 'bordered', children } = props;
const {
minHeight = 50,
header,
variant = 'bordered',
children,
setCollapsed
} = props;
const [isOpen, setIsOpen] = useState(true);
const [height, setHeight] = useState(0);
const contentRef = useRef(null);
@@ -32,6 +39,7 @@ const TransitionWrapper: React.FC<TransitionWrapProps> = forwardRef(
const toggleOpen = () => {
setIsOpen(!isOpen);
setCollapsed?.(!isOpen);
};
const setHeightByContent = () => {