样式优化
This commit is contained in:
@@ -80,34 +80,33 @@ onBeforeUnmount(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 12vw;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
.container > image {
|
.container > image {
|
||||||
width: 360rpx;
|
width: 360rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
transform: translateY(7px);
|
transform: translateY(24rpx);
|
||||||
}
|
}
|
||||||
.container > view:last-child {
|
.container > view:last-child {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #444444;
|
background-color: #444444;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
font-size: 12px;
|
height: 24rpx;
|
||||||
height: 15px;
|
|
||||||
line-height: 15px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.container > view:last-child > view {
|
.container > view:last-child > view {
|
||||||
position: absolute;
|
height: 24rpx;
|
||||||
height: 15px;
|
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
transition: all 1s linear;
|
transition: all 1s linear;
|
||||||
}
|
}
|
||||||
.container > view:last-child > text {
|
.container > view:last-child > text {
|
||||||
font-size: 10px;
|
font-size: 18rpx;
|
||||||
line-height: 15px;
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: relative;
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -55,7 +55,10 @@ watch(
|
|||||||
<image
|
<image
|
||||||
:src="isRed ? '../static/flag-red.png' : '../static/flag-blue.png'"
|
:src="isRed ? '../static/flag-red.png' : '../static/flag-blue.png'"
|
||||||
class="flag"
|
class="flag"
|
||||||
:style="{ [isRed ? 'left' : 'right']: '10rpx' }"
|
:style="{
|
||||||
|
[isRed ? 'left' : 'right']: '10rpx',
|
||||||
|
top: youTurn ? '-44rpx' : '-30rpx',
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in team"
|
v-for="(item, index) in team"
|
||||||
@@ -63,12 +66,12 @@ watch(
|
|||||||
class="player"
|
class="player"
|
||||||
:style="{
|
:style="{
|
||||||
width:
|
width:
|
||||||
(youTurn ? 40 - ((players[item.id] || {}).sort || 0) * 5 : 35) + 'px',
|
(youTurn ? 40 - ((players[item.id] || {}).sort || 0) * 8 : 30) + 'px',
|
||||||
height:
|
height:
|
||||||
(youTurn ? 40 - ((players[item.id] || {}).sort || 0) * 5 : 35) + 'px',
|
(youTurn ? 40 - ((players[item.id] || {}).sort || 0) * 8 : 30) + 'px',
|
||||||
borderColor: isRed ? '#ff6060' : '#5fadff',
|
borderColor: isRed ? '#ff6060' : '#5fadff',
|
||||||
zIndex: team.length - ((players[item.id] || {}).sort || 0),
|
zIndex: team.length - ((players[item.id] || {}).sort || 0),
|
||||||
top: youTurn ? ((players[item.id] || {}).sort || 0) * 2 + 'px' : '6px',
|
top: youTurn ? ((players[item.id] || {}).sort || 0) * 4 + 'px' : '6px',
|
||||||
left:
|
left:
|
||||||
(isRed
|
(isRed
|
||||||
? ((players[item.id] || {}).sort || 0) * 20
|
? ((players[item.id] || {}).sort || 0) * 20
|
||||||
@@ -87,7 +90,8 @@ watch(
|
|||||||
class="truncate"
|
class="truncate"
|
||||||
:style="{
|
:style="{
|
||||||
color: isRed ? '#ff6060' : '#5fadff',
|
color: isRed ? '#ff6060' : '#5fadff',
|
||||||
[isRed ? 'left' : 'right']: 0,
|
left: isRed ? '-4rpx' : 'unset',
|
||||||
|
right: isRed ? 'unset' : '-12rpx',
|
||||||
}"
|
}"
|
||||||
>{{ firstName }}</text
|
>{{ firstName }}</text
|
||||||
>
|
>
|
||||||
@@ -100,15 +104,16 @@ watch(
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 20vw;
|
width: 20vw;
|
||||||
height: 45px;
|
height: 10rpx;
|
||||||
margin: 0 20rpx;
|
margin: 0 20rpx;
|
||||||
}
|
}
|
||||||
.container > text {
|
.container > text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 40px;
|
width: 90rpx;
|
||||||
bottom: -12px;
|
bottom: -100rpx;
|
||||||
|
transform: translateY(-50% - 40rpx);
|
||||||
}
|
}
|
||||||
.player {
|
.player {
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
@@ -123,7 +128,7 @@ watch(
|
|||||||
}
|
}
|
||||||
.player > text {
|
.player > text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 8px;
|
font-size: 16rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
@@ -134,6 +139,6 @@ watch(
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
width: 45rpx;
|
width: 45rpx;
|
||||||
height: 45rpx;
|
height: 45rpx;
|
||||||
top: -30rpx;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ onHide(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: -7vw;
|
margin-top: -1%;
|
||||||
margin-top: -3vw;
|
margin-bottom: 6%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user