抽奖转盘旋转
2024-11-19 本文已影响0人
zhuyx0304
<view class="dish" :style="{ transform: `rotate(${angle}deg)` }"></view>
var angle = 0;
.dish {
width: 582rpx;
height: 582rpx;
background-image: url("../../static/dish.png");
background-repeat: no-repeat;
background-size: 100% 100%;
transform-origin: center;
transition: all 2s ease-in-out;
}
const circle = 8;
const point = 90;
this.angle += (360 * circle) + (360 - this.angle%360) + point;