bug 修复
This commit is contained in:
@@ -98,13 +98,13 @@ watch(
|
||||
}
|
||||
);
|
||||
|
||||
function calcRealX(num) {
|
||||
function calcRealX(num, offset = 3.4) {
|
||||
const len = 20.4 + num;
|
||||
return `calc(${(len / 40.8) * 100 - 1.5}%)`;
|
||||
return `calc(${(len / 40.8) * 100 - offset / 2}%)`;
|
||||
}
|
||||
function calcRealY(num) {
|
||||
function calcRealY(num, offset = 3.4) {
|
||||
const len = num < 0 ? Math.abs(num) + 20.4 : 20.4 - num;
|
||||
return `calc(${(len / 40.8) * 100 - 1.5}%)`;
|
||||
return `calc(${(len / 40.8) * 100 - offset / 2}%)`;
|
||||
}
|
||||
const simulShoot = async () => {
|
||||
if (device.value.deviceId) await simulShootAPI(device.value.deviceId);
|
||||
@@ -136,8 +136,8 @@ onMounted(() => {
|
||||
v-if="latestOne && user.id === latestOne.playerId"
|
||||
class="e-value fade-in-out"
|
||||
:style="{
|
||||
left: calcRealX(latestOne.ring ? latestOne.x : 0, 66),
|
||||
top: calcRealY(latestOne.ring ? latestOne.y : 0, 150),
|
||||
left: calcRealX(latestOne.ring ? latestOne.x : 0, 20),
|
||||
top: calcRealY(latestOne.ring ? latestOne.y : 0, 40),
|
||||
}"
|
||||
>
|
||||
经验 +1
|
||||
@@ -146,8 +146,8 @@ onMounted(() => {
|
||||
v-if="latestOne"
|
||||
class="round-tip fade-in-out"
|
||||
:style="{
|
||||
left: calcRealX(latestOne.ring ? latestOne.x : 0, 100),
|
||||
top: calcRealY(latestOne.ring ? latestOne.y : 0, 100),
|
||||
left: calcRealX(latestOne.ring ? latestOne.x : 0, 28),
|
||||
top: calcRealY(latestOne.ring ? latestOne.y : 0, 28),
|
||||
}"
|
||||
>{{ latestOne.ring || "未上靶"
|
||||
}}<text v-if="latestOne.ring">环</text></view
|
||||
@@ -246,10 +246,10 @@ onMounted(() => {
|
||||
}
|
||||
.hit {
|
||||
position: absolute;
|
||||
width: 3%;
|
||||
height: 3%;
|
||||
min-width: 3%;
|
||||
min-height: 3%;
|
||||
width: 3.4%;
|
||||
height: 3.4%;
|
||||
min-width: 3.4%;
|
||||
min-height: 3.4%;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #fff;
|
||||
z-index: 1;
|
||||
|
||||
Reference in New Issue
Block a user