细节优化
This commit is contained in:
@@ -27,6 +27,7 @@ watch(
|
||||
barColor.value = "linear-gradient( 180deg, #FFA0A0 0%, #FF6060 100%)";
|
||||
if (newVal.includes("蓝队"))
|
||||
barColor.value = "linear-gradient( 180deg, #9AB3FF 0%, #4288FF 100%)";
|
||||
if (newVal.includes("重回")) return;
|
||||
if (newVal.includes("红队") || newVal.includes("蓝队")) {
|
||||
if (timer.value) clearInterval(timer.value);
|
||||
remain.value = props.total;
|
||||
@@ -41,6 +42,8 @@ watch(
|
||||
);
|
||||
|
||||
const updateRemain = (value) => {
|
||||
if (Math.ceil(value) === remain.value || Math.floor(value) === remain.value)
|
||||
return;
|
||||
if (timer.value) clearInterval(timer.value);
|
||||
remain.value = Math.round(value);
|
||||
timer.value = setInterval(() => {
|
||||
@@ -84,7 +87,6 @@ onBeforeUnmount(() => {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.container > image {
|
||||
width: 360rpx;
|
||||
|
||||
Reference in New Issue
Block a user