From 83a5393949d5891d9c48fdf71b69407eadae046a Mon Sep 17 00:00:00 2001 From: li tong bao <2903733959@qq.com> Date: Tue, 7 Jun 2022 18:08:34 +0800 Subject: [PATCH] =?UTF-8?q?--=E4=BF=AE=E5=A4=8D=E6=8E=88=E4=BF=A1=E5=9C=86?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/creditLine/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/creditLine/index.tsx b/src/pages/creditLine/index.tsx index ee609ec..e28f80b 100644 --- a/src/pages/creditLine/index.tsx +++ b/src/pages/creditLine/index.tsx @@ -156,11 +156,13 @@ export default ()=>{ const Progress = (props)=>{ useEffect(()=>{ - getCanvas(); + if(props.progress!=0){ + getCanvas(); + } },[props.progress]) const getCanvas = ()=>{ // const percentage = props.progress??0; - const percentage = props.progress??0; + const percentage = props.progress; const query = Taro.createSelectorQuery(); query.select("#myCanvas").fields({ node: true, size: true }).exec((res) => { const canvas = res[0]?.node;