diff --git a/src/App.tsx b/src/App.tsx index 7dd29b0..e74c970 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,7 @@ import "react-wave-progress-ball-svg/dist/style.css"; function App() { const [value, setValue] = useState(50); + const [adaptive, setAdaptive] = useState(false); const [size, setSize] = useState(350); const [circleColor, setCircleColor] = useState("#bdc3c7"); const [circleLineWidth, setCircleLineWidth] = useState(1); @@ -34,6 +35,7 @@ function App() { const [reverseWaveBg, setReverseWaveBg] = useState(false); const setting = { size, + adaptive, circleColor, circleLineWidth, waveHeight, @@ -62,9 +64,19 @@ function App() { - - + + + {!adaptive && ( + + + + )} ), }, @@ -307,7 +319,10 @@ function App() { label: "导出设置", children: ( <> - {JSON.stringify(setting, null, 2)} @@ -333,8 +348,7 @@ function App() { ); } - -function ExampleCode(props:any) { +function ExampleCode(props: any) { return (