From 53333a73bedd10e3ac877049f330bb077b51e15e Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 1 Mar 2021 14:27:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8Dtopology=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=90=E5=8F=98=E8=89=B2=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=AE=9E=E6=97=B6=E6=94=B9=E5=8F=98=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/project/L5/CanvasProps.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue index 6b15f8d5e..4c486f112 100644 --- a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue +++ b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue @@ -1415,6 +1415,7 @@ }, colorChange(val,name){//改变颜色 + let bktype= this.selection.pen.data.gradientType; if(name==='toArrowColor'){ this.selection.pen.fromArrowColor=this.colorRGBtoHex(val); this.selection.pen.toArrowColor=this.colorRGBtoHex(val); @@ -1426,10 +1427,17 @@ } if(name==='gradientColor'){ this.selection.pen.data['gradientColor']=this.colorRGBtoHex(val); + if(bktype===1 || bktype===2){ + this.selection.pen.gradientToColor=this.selection.pen.data.gradientColor; + this.selection.pen.gradientFromColor=this.selection.pen.fillStyle?this.selection.pen.fillStyle:'#fff'; + } + if(bktype===3 || bktype===4){ + this.selection.pen.gradientFromColor=this.selection.pen.data.gradientColor; + this.selection.pen.gradientToColor=this.selection.pen.fillStyle?this.selection.pen.fillStyle:'#fff'; + } } - if(name=='fillStyle'){ - let bktype= this.selection.pen.data.gradientType; + if(name==='fillStyle'){ if(bktype===1 || bktype===2){ this.selection.pen.gradientToColor=this.selection.pen.data.gradientColor; this.selection.pen.gradientFromColor=this.selection.pen.fillStyle?this.selection.pen.fillStyle:'#fff';