图片组件增加旋转速度控制

jian_fei_zhang 3 years ago
parent 743141290c
commit 91625411c8

@ -77,3 +77,21 @@
.el-table td {
padding: 6px 0;
}
@keyframes turn {
0% {
-webkit-transform: rotate(0deg);
}
25% {
-webkit-transform: rotate(90deg);
}
50% {
-webkit-transform: rotate(180deg);
}
75% {
-webkit-transform: rotate(270deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}

@ -1,6 +1,6 @@
/*
* @Descripttion: 图片json
* @version:
* @version:
* @Author: qianlishi
* @Date: 2021-08-29 07:07:23
* @LastEditors: qianlishi
@ -30,6 +30,14 @@ export const widgetImage = {
placeholder: '',
value: false,
},
{
type: 'el-slider',
label: '旋转速度',
name: 'rotationSpeed',
required: false,
placeholder: '',
value: 70
},
{
type: 'el-slider',
label: '透明度',

@ -41,7 +41,8 @@ export default {
return {
imageAdress: this.transStyle.imageAdress,
"border-radius": this.transStyle.borderRadius + "px",
opacity: this.transStyle.transparency / 100
opacity: this.transStyle.transparency / 100,
animation: this.transStyle.startRotate? "turn "+(101-this.transStyle.rotationSpeed)/10+"s linear infinite":"none"
};
}
},
@ -74,21 +75,5 @@ export default {
.startImg {
animation: turn 1s linear infinite;
}
@keyframes turn {
0% {
-webkit-transform: rotate(0deg);
}
25% {
-webkit-transform: rotate(90deg);
}
50% {
-webkit-transform: rotate(180deg);
}
75% {
-webkit-transform: rotate(270deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
</style>

Loading…
Cancel
Save