微信小程序个人信息展示页面样式设计 - สวยงาม และใช้งานง่าย
<view class='container'>
<view class='info-row-img'>
<text class='info-label'></text>
<image class='avatar' src='{{avatar}}' mode='aspectFit'></image>
</view>
<view class='user-info'>
<view class='info-row'>
<text class='info-label'>User ID:</text>
<input class='info-value' value='{{userId}}' disabled='{{!isEditing}}' bindinput='onUserIdInput'/>
</view>
<view class='info-row'>
<text class='info-label'>OpenID:</text>
<input class='info-value' value='{{openid}}' disabled='{{!isEditing}}' bindinput='onOpenIdInput'/>
</view>
<view class='info-row'>
<text class='info-label'>昵称:</text>
<input class='info-value' value='{{nickname}}' disabled='true' bindinput='onNicknameInput'/>
</view>
<pre><code><view class='info-row'>
<text class='info-label'>性别:</text>
<view wx:if='{{gender==1}}'> <text class='info-value'>男</text> </view>
<view wx:if='{{gender==2}}'> <text class='info-value'>女</text> </view>
<view wx:if='{{gender==0}}'> <text class='info-value'>未认证</text> </view>
</view>
<view class='info-row'>
<text class='info-label'>学院:</text>
<input class='info-value' value='{{school}}' disabled='true' bindinput='onSchoolInput'/>
</view>
<view class='info-row'>
<text class='info-label'>校内身份:</text>
<text class='info-value'>{{identity}}</text>
</view>
<view class='info-row'>
<text class='info-label'>注册时间:</text>
<text class='info-value'>{{createTime}}</text>
</view>
<view class='info-row'>
<text class='info-label'>真名:</text>
<input class='info-value' value='{{realname}}' disabled='true' bindinput='onRealNameInput'/>
</view>
<view class='info-row'>
<text class='info-label'>身份证号:</text>
<input class='info-value' value='{{idnumber}}' disabled='true' bindinput='onIdNumberInput' type='idcard'/>
</view>
<view class='info-row'>
<text class='info-label'>学/工号:</text>
<input class='info-value' value='{{studentnumber}}'disabled='true' bindinput='onStudentNumberInput' type='number' />
</view>
<view class='info-row'>
<text class='info-label'>邮箱:</text>
<input class='info-value' value='{{email}}'disabled='true' bindinput='onEmailInput'/>
</view>
</code></pre>
</view>
</view>
<view class='btn'>
<button type='primary' bindtap='submit'>主页</button>
</view>
<style>
.container{
padding: 20rpx;
background-color: #fff;
}
.info-row-img{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #eee;
margin-bottom: 20rpx;
}
.avatar{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
border: 2rpx solid #eee;
}
.user-info{
font-size: 28rpx;
}
.info-row{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #eee;
}
.info-label{
color: #999;
margin-right: 20rpx;
}
.info-value{
color: #333;
flex-grow: 1;
text-align: right;
}
.btn{
margin-top: 40rpx;
display: flex;
justify-content: center;
align-items: center;
}
button{
background-color: #007aff;
color: #fff;
font-size: 32rpx;
padding: 20rpx 40rpx;
border-radius: 10rpx;
}
</style>
原文地址: https://www.cveoy.top/t/topic/m8ib 著作权归作者所有。请勿转载和采集!