1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <view class="user-list">
- <view class="user first">
- <image src="https://picsum.photos/100/100?random=1" class="user-head"></image> <text>拼主</text>
- </view>
- <view class="user"> <image v-if="status" src="https://picsum.photos/100/100?random=2" class="user-head"></image> </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- userList: {
- type: Object,
- default: () => ({})
- },
- status: {
- type: Boolean,
- default: false
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .flex-center-box {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .user-list {
- @extend .flex-center-box;
- .user {
- @extend .flex-center-box;
- position: relative;
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- border: 2rpx dashed #cccccc;
- border-radius: 50%;
- box-sizing: border-box;
- &::before {
- content: '?';
- font-size: 36rpx;
- color: #999999;
- }
- &.first {
- margin-right: 32rpx;
- }
- .user-head {
- position: absolute;
- left: -2rpx;
- top: -2rpx;
- z-index: 1;
- display: block;
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- }
- text {
- @extend .flex-center-box;
- position: absolute;
- left: -20rpx;
- top: 0;
- z-index: 2;
- width: 56rpx;
- height: 28rpx;
- background: #ff457b;
- border: 1rpx solid #ffffff;
- border-radius: 14rpx;
- font-size: 20rpx;
- color: #ffffff;
- }
- }
- }
- </style>
|