diff --git a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
index e30a5f187..762799573 100644
--- a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
+++ b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
@@ -339,19 +339,29 @@
{{$t('project.topology.gradient')}}
-
colorChange(val,'gradientToColor')"
- size="small"
- >
-
-
+
+
+
+
+
{{selection.pen.data.gradientColor}}
+
+
+
+
+
+
+ colorChange(val,'gradientColor')"
+ >
+
+
@@ -1102,13 +1112,21 @@
id:0,
name:'X'
},
+ {
+ id:2,
+ name:'↑'
+ },
+ {
+ id:4,
+ name:'↓'
+ },
{
id:1,
name:'→'
},
{
- id:2,
- name:'↑'
+ id:3,
+ name:'←'
}
],
penDash:[
@@ -1360,13 +1378,28 @@
this.onChange();
},
bkTypeChange(val){
-
- if(!this.selection.pen.gradientToColor&&val){
- this.selection.pen.gradientToColor='#bae7ff'
+ // console.log(val);
+ this.selection.pen.data.gradientType=val;
+ this.$forceUpdate()
+ console.log(this.selection.pen.gradientType,this.selection.pen.data.gradientType);
+ if(val===0){
+ this.selection.pen.bkType=0;
}
- if(!this.selection.pen.gradientFromColor&&val){
- this.selection.pen.gradientFromColor='#c6ebb4'
- this.selection.pen.fillStyle='#c6ebb4'
+
+ if(val===1 || val===3){
+ this.selection.pen.bkType=1;
+ }
+ if(val===2 || val===4){
+ this.selection.pen.bkType=2;
+ }
+
+ if(val===1 || val===2){
+ this.selection.pen.gradientToColor=this.selection.pen.data.gradientColor;
+ this.selection.pen.gradientFromColor=this.selection.pen.fillStyle?this.selection.pen.fillStyle:'#fff';
+ }
+ if(val===3 || val===4){
+ this.selection.pen.gradientFromColor=this.selection.pen.data.gradientColor;
+ this.selection.pen.gradientToColor=this.selection.pen.fillStyle?this.selection.pen.fillStyle:'#fff';
}
this.onChange()
},
@@ -1391,8 +1424,20 @@
}else{
this.selection.pen[name]=this.colorRGBtoHex(val);
}
+ if(name==='gradientColor'){
+ this.selection.pen.data['gradientColor']=this.colorRGBtoHex(val);
+ }
+
if(name=='fillStyle'){
- this.selection.pen.gradientFromColor=this.selection.pen.fillStyle;
+ let bktype= this.selection.pen.data.gradientType;
+ 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';
+ }
}
this.selection.pen.data[name]=this.colorRGBtoHex(val);
this.onChange();
@@ -1629,6 +1674,9 @@
width: 24px;
height: 24px;
}
+ .color-before-select .el-input__inner{
+ background: rgb(245, 247, 250);
+ }