Commit c98e7f28 authored by 周宏民's avatar 周宏民

fix: 修改演示功能 动画影起字体模糊

parent ec3c175c
...@@ -58,7 +58,7 @@ const Demonstration = props => { ...@@ -58,7 +58,7 @@ const Demonstration = props => {
const [productData, setProductData] = useState([]); const [productData, setProductData] = useState([]);
const [newProductData, setNewProductData] = useState([]); const [newProductData, setNewProductData] = useState([]);
const [productConfig, setProductConfig] = useState({}); // 项目案例是否可免密跳转 const [productConfig, setProductConfig] = useState({}); // 项目案例是否可免密跳转
const [showAnimation, setShowAnimation] = useState(true);
const [showBackBtn, setShowBackBtn] = useState(true); // 是否显示iframe 返回按钮,三维平台用 const [showBackBtn, setShowBackBtn] = useState(true); // 是否显示iframe 返回按钮,三维平台用
const [ref, isFullscreen, handleFullScreen, handleExitFullScreen] = useFullScreen(false); const [ref, isFullscreen, handleFullScreen, handleExitFullScreen] = useFullScreen(false);
// 退出 // 退出
...@@ -435,6 +435,10 @@ const Demonstration = props => { ...@@ -435,6 +435,10 @@ const Demonstration = props => {
setTimeout(() => { setTimeout(() => {
setShowContent(true); setShowContent(true);
}, 0); }, 0);
// 延迟1s去掉入场动画,解决动画会使字体模糊
setTimeout(() => {
setShowAnimation(false);
}, 1000);
} }
}, [loading]); }, [loading]);
useEffect(() => { useEffect(() => {
...@@ -537,7 +541,12 @@ const Demonstration = props => { ...@@ -537,7 +541,12 @@ const Demonstration = props => {
{showContent ? ( {showContent ? (
<> <>
<div className={classNames(styles.row, 'animate__fadeInDown', 'animate__animated', 'duration-500ms')}> <div
className={classNames(
styles.row,
showAnimation ? 'animate__fadeInDown animate__animated duration-500ms' : '',
)}
>
<div className={styles.row_l}> <div className={styles.row_l}>
<LeftItem <LeftItem
setSelectKey={setSelectKey} setSelectKey={setSelectKey}
...@@ -554,11 +563,21 @@ const Demonstration = props => { ...@@ -554,11 +563,21 @@ const Demonstration = props => {
<RightItem listData={newProductData} productConfig={productConfig} handToProduct={handToProduct} /> <RightItem listData={newProductData} productConfig={productConfig} handToProduct={handToProduct} />
</div> </div>
</div> </div>
<div className={classNames(styles.center_wrap, 'animate__fadeIn', 'animate__animated', 'duration-500ms')}> <div
className={classNames(
styles.center_wrap,
showAnimation ? 'animate__fadeIn animate__animated duration-500ms' : '',
)}
>
<div className={styles.center_tip} /> <div className={styles.center_tip} />
<div className={styles.center}>{renderCenter}</div> <div className={styles.center}>{renderCenter}</div>
</div> </div>
<div className={classNames(styles.bottom, 'animate__fadeInUp', 'animate__animated', 'duration-500ms')}> <div
className={classNames(
styles.bottom,
showAnimation ? 'animate__fadeInUp animate__animated duration-500ms' : '',
)}
>
<BottomItem <BottomItem
listData={projectData} listData={projectData}
configData={configData} configData={configData}
......
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