feat:添加动效的中英文切换
This commit is contained in:
@@ -1053,6 +1053,16 @@ const cn = {
|
||||
fontColor:'字体颜色',
|
||||
align:'对齐',
|
||||
opacity:'透明度',
|
||||
bounce:"上下跳动",
|
||||
shakeX:'左右跳动',
|
||||
swing:'摇摆',
|
||||
heartBeat:'心跳',
|
||||
flash:'闪烁',
|
||||
fade:'若隐若现',
|
||||
flow:'水流',
|
||||
beads:'水珠流动',
|
||||
dot:'圆点',
|
||||
comet:'彗星',
|
||||
},
|
||||
},
|
||||
date:{
|
||||
|
||||
@@ -1058,6 +1058,16 @@ const en = {
|
||||
fontColor:'Font Color',
|
||||
align:'Align',
|
||||
opacity:'Opacity',
|
||||
bounce:'bounce',
|
||||
shakeX:'shakeX',
|
||||
swing:'swing',
|
||||
heartBeat:'heartBeat',
|
||||
flash:'flash',
|
||||
fade:'fade',
|
||||
flow:'flow',
|
||||
beads:'beads',
|
||||
dot:'dot',
|
||||
comet:'comet',
|
||||
},
|
||||
},
|
||||
date:{
|
||||
|
||||
@@ -1137,40 +1137,36 @@
|
||||
{d:'M5 14 l85 0',fill:'#ffffff',stroke:"#000000",'stroke-width':"1",cx:"10",cy:"14",r:"5",name:'circle'},
|
||||
],
|
||||
lineAnimateOptions:[
|
||||
{id:1,name:'水流'},
|
||||
{id:'beads',name:'水珠流动'},
|
||||
{id:'dot',name:'圆点'},
|
||||
{id:'comet',name:'彗星'},
|
||||
{id:1,name:this.$t("project.topology.flow")},
|
||||
{id:'beads',name:this.$t("project.topology.beads")},
|
||||
{id:'dot',name:this.$t("project.topology.dot")},
|
||||
{id:'comet',name:this.$t("project.topology.comet")},
|
||||
],
|
||||
nodeAnimateOptions:[
|
||||
{
|
||||
id:'upDown',
|
||||
name:'上下跳动'
|
||||
name:this.$t("project.topology.bounce")
|
||||
},
|
||||
{
|
||||
id:'leftRight',
|
||||
name:'左右跳动'
|
||||
name:this.$t("project.topology.shakeX")
|
||||
},
|
||||
{
|
||||
id:'heart',
|
||||
name:'心跳'
|
||||
},
|
||||
{
|
||||
id:'success',
|
||||
name:'成功'
|
||||
name:this.$t("project.topology.heartBeat")
|
||||
},
|
||||
{
|
||||
id:'warning',
|
||||
name:'警告'
|
||||
},
|
||||
{
|
||||
id:'error',
|
||||
name:'错误'
|
||||
name:this.$t("project.topology.flash")
|
||||
},
|
||||
{
|
||||
id:'show',
|
||||
name:'炫耀'
|
||||
name:this.$t("project.topology.swing")
|
||||
},
|
||||
{
|
||||
id:'fade',
|
||||
name:this.$t("project.topology.fade")
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
@@ -502,6 +502,33 @@ export function onChangeAnimate(node,animateType,fillStyle,strokeStyle) {
|
||||
state: Node.cloneState(state)
|
||||
});
|
||||
break;
|
||||
case 'fade':
|
||||
state.strokeStyle = strokeStyle?strokeStyle: '#fa541c';
|
||||
state.globalAlpha = 0.3;
|
||||
node.animateFrames.push({
|
||||
duration: 300,
|
||||
linear: true,
|
||||
state: Node.cloneState(state)
|
||||
});
|
||||
state.globalAlpha = 0.5;
|
||||
node.animateFrames.push({
|
||||
duration: 300,
|
||||
linear: true,
|
||||
state: Node.cloneState(state)
|
||||
});
|
||||
state.globalAlpha = 0.8;
|
||||
node.animateFrames.push({
|
||||
duration: 300,
|
||||
linear: true,
|
||||
state: Node.cloneState(state)
|
||||
});
|
||||
state.globalAlpha = 1;
|
||||
node.animateFrames.push({
|
||||
duration: 300,
|
||||
linear: true,
|
||||
state: Node.cloneState(state)
|
||||
});
|
||||
break;
|
||||
}
|
||||
node.animatePlay=true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user