<view class='container'>
  <view class='header'>用户信息</view>
  <view class='user-list'>
    <block wx:for='{{users}}' wx:key='openid'>
      <view class='user-item'>
        <view class='user-name'>{{item.nickname}}</view>
        <view class='user-account'>{{item.openid}}</view>
        <view class='user-role'>{{item.identity}}</view>
        <view class='user-edit'>
          <button class='btn' bindtap='editRole' data-account='{{item.openid}}'>修改身份</button>
        </view>
      </view>
    </block>
  </view>
</view>
<style>
  .container {
    padding: 20px;
  }
  .header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
  }
  .user-list {
    display: flex;
    flex-direction: column;
  }
  .user-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
  }
  .user-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
  }
  .user-account {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .user-role {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .user-edit {
    display: flex;
    justify-content: flex-end;
  }
  .btn {
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
  }
</style>
微信小程序用户管理页面样式 - 显示用户账号、姓名和身份

原文地址: https://www.cveoy.top/t/topic/jqig 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录