--我的页面完成部分

This commit is contained in:
li tong bao
2022-06-09 19:31:40 +08:00
parent de38a42b2e
commit eceb170ece
17 changed files with 556 additions and 69 deletions
+2 -2
View File
@@ -162,7 +162,7 @@ const Progress = (props)=>{
},[props.progress])
const getCanvas = ()=>{
// const percentage = props.progress??0;
const percentage = props.progress;
const percentage = props.progress||0;
const query = Taro.createSelectorQuery();
query.select("#myCanvas").fields({ node: true, size: true }).exec((res) => {
const canvas = res[0]?.node;
@@ -235,7 +235,7 @@ const Progress = (props)=>{
gad2.addColorStop(0, props.style?.cir?.background?.end[0]);
gad2.addColorStop(1, props.style?.cir?.background?.start[1]);
ctx.strokeStyle = gad2;
ctx.arc(0,0,104,Math.PI*0.5,2*Math.PI/100*(percentage-25), false);
ctx.arc(0,0,104,Math.PI*0.4,2*Math.PI/100*(percentage-25), false);
ctx.stroke();
}
}else{