--我的页面完成部分
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user