feat:颜色选择器 添加默认色块的选择
This commit is contained in:
@@ -187,6 +187,7 @@
|
|||||||
@active-change="(val)=>colorChangeTable(item,val)"
|
@active-change="(val)=>colorChangeTable(item,val)"
|
||||||
popper-class="no-style-class"
|
popper-class="no-style-class"
|
||||||
v-model="item.showColor"
|
v-model="item.showColor"
|
||||||
|
:predefine="predefineColors"
|
||||||
>
|
>
|
||||||
</el-color-picker>
|
</el-color-picker>
|
||||||
</div>
|
</div>
|
||||||
@@ -1168,6 +1169,7 @@
|
|||||||
name:this.$t("project.topology.fade")
|
name:this.$t("project.topology.fade")
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
predefineColors:['#FF0000','#FF5300','#FFC900','#00B536','#00CAFF','#0092FF','#B600D9','#FF666C','#FF9348','#FFDD33','#00D063','#00deff','#62B9FF','#D55BE9']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins:[rz],
|
mixins:[rz],
|
||||||
|
|||||||
@@ -1166,7 +1166,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onMessage(event,data,e){
|
onMessage(event,data,e){
|
||||||
console.log('onMessage',event);
|
// console.log('onMessage',event);
|
||||||
// console.log(getTopology(this.topologyIndex))
|
// console.log(getTopology(this.topologyIndex))
|
||||||
if(!Array.isArray(data)&&data){//判断不是数组 提前个data配置好节点属性
|
if(!Array.isArray(data)&&data){//判断不是数组 提前个data配置好节点属性
|
||||||
// if(data.type===0){
|
// if(data.type===0){
|
||||||
@@ -1269,7 +1269,6 @@
|
|||||||
this.tooltipPosition.top=ePosition.layerY;
|
this.tooltipPosition.top=ePosition.layerY;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
if(this.$refs['topoTooltip']){
|
if(this.$refs['topoTooltip']){
|
||||||
// console.log(boxWidth,ePosition.layerX,this.$refs['topoTooltip'].offsetWidth,boxHeight,ePosition.layerY,);
|
|
||||||
if((boxWidth/2)>ePosition.layerX){
|
if((boxWidth/2)>ePosition.layerX){
|
||||||
this.tooltipPosition.left=ePosition.layerX+20;
|
this.tooltipPosition.left=ePosition.layerX+20;
|
||||||
}else {
|
}else {
|
||||||
@@ -1321,9 +1320,6 @@
|
|||||||
// };
|
// };
|
||||||
// }
|
// }
|
||||||
// },50);
|
// },50);
|
||||||
|
|
||||||
console.log(getTopology(this.topologyIndex).caches);
|
|
||||||
|
|
||||||
switch(event){
|
switch(event){
|
||||||
case 'node':
|
case 'node':
|
||||||
case 'addNode':
|
case 'addNode':
|
||||||
@@ -1734,7 +1730,6 @@
|
|||||||
index:0,
|
index:0,
|
||||||
list:[JSON.parse(JSON.stringify(getTopology(this.topologyIndex).data))]
|
list:[JSON.parse(JSON.stringify(getTopology(this.topologyIndex).data))]
|
||||||
}
|
}
|
||||||
console.log(getTopology(this.topologyIndex));
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1863,12 +1858,13 @@
|
|||||||
/*tools 方法*/
|
/*tools 方法*/
|
||||||
|
|
||||||
winResize(){
|
winResize(){
|
||||||
let domRect=document.getElementById('topology-canvas'+this.topologyIndexF).getBoundingClientRect();
|
let domRect=document.getElementById('topology-canvas'+this.topologyIndex).getBoundingClientRect();
|
||||||
this.toolShow.attrCord=[domRect.width-350,0];
|
// this.toolShow.attrCord=[domRect.width-350,0];
|
||||||
this.toolShow.height=domRect.height;
|
// this.toolShow.height=domRect.height;
|
||||||
getTopology(this.topologyIndex).canvasPos=domRect;
|
getTopology(this.topologyIndex).canvasPos=domRect;
|
||||||
getTopology(this.topologyIndex).centerView();
|
getTopology(this.topologyIndex).centerView();
|
||||||
this.getNodesArr();
|
this.getNodesArr();
|
||||||
|
console.log(213213123123);
|
||||||
},
|
},
|
||||||
canvasMove(e){// 画布上的移动 确定tooltip的位置
|
canvasMove(e){// 画布上的移动 确定tooltip的位置
|
||||||
if(this.tooltipPosition.show){
|
if(this.tooltipPosition.show){
|
||||||
@@ -1923,7 +1919,6 @@
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
redoIndexChange(index){
|
redoIndexChange(index){
|
||||||
console.log(index);
|
|
||||||
this.redoIndex=index
|
this.redoIndex=index
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user