style: 会员标签显示在user-name-row右上角
- user-name-row保持水平居中 - vip-tag使用position: absolute定位到右上角(top: 0, right: 0)
This commit is contained in:
1 parent
3b99719a4c
commit
e8d1d3b123
1 file changed
+7
-3
@@ -7,10 +7,10 @@
|
||||
<view class="user-info">
|
||||
<view class="user-name-row">
|
||||
<text class="username">玄机用户</text>
|
||||
<view class="vip-tag" :class="vipClass">
|
||||
</view>
|
||||
<view class="vip-tag" :class="vipClass">
|
||||
<text class="vip-tag-text">{{ vipText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="user-coins">金币:{{ coins }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -167,6 +167,7 @@ page {
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
margin-bottom: 8rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.username {
|
||||
@@ -177,6 +178,9 @@ page {
|
||||
}
|
||||
|
||||
.vip-tag {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin-left: 6rpx;
|
||||
padding: 1rpx 8rpx;
|
||||
border-radius: 12rpx;
|
||||
@@ -204,7 +208,7 @@ page {
|
||||
}
|
||||
|
||||
.vip-tag-text {
|
||||
font-size: 16rpx;
|
||||
font-size: 18rpx;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user