<nav title="编辑信息"></nav>
<ion-content class="content">
  <ion-list>
    <ion-item>
      <div class="row portrait">
        <div>头像</div>
        @if (formData.avatar) {
        <!-- <img [src]="avatar" alt="" /> -->
        <app-upload
          (onChange)="saveEdit($event)"
          #upload
          [maxlenght]="1"
          [files]="[{ url: formData.avatar }]"
          [fileWidth]="80"
          [fileHeight]="80"
          [boxWidth]="100"
        ></app-upload>
        }
      </div>
    </ion-item>
    <ion-item>
      <div class="row">
        <div>昵称</div>
        <div class="right">
          <ion-input
            placeholder="请输入昵称"
            value="{{ formData.nickname }}"
            (ionChange)="onChange($event,'nickname')"
          ></ion-input>
          <ion-icon name="chevron-forward-outline"></ion-icon>
        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="row">
        <div>真实姓名</div>
        <div class="right">
          <ion-input
            placeholder="待认证"
            value="{{ formData.name }}"
            [disabled]="true"
          ></ion-input>
          <ion-icon name="chevron-forward-outline"></ion-icon>
        </div>
      </div>
    </ion-item>
    <ion-item>
      <ion-select
        label="性别"
        (ionChange)="onChange($event,'sex')"
        interface="popover"
        placeholder="{{ formData.sex }}"
      >
        <ion-select-option value="男">男</ion-select-option>
        <ion-select-option value="女">女</ion-select-option>
      </ion-select>
    </ion-item>
    <ion-item>
      <div class="row">
        <div>年龄</div>
        <div class="right">
          <ion-input
            placeholder="请输入年龄"
            value="{{ formData.age }}"
            (ionChange)="onChange($event,'age')"
          ></ion-input>
          <ion-icon name="chevron-forward-outline"></ion-icon>
        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="row">
        <div>签名</div>
        <div class="right">
          <ion-input
            placeholder="请填写签名"
            value="{{ formData.remark }}"
            (ionChange)="onChange($event,'remark')"
          ></ion-input>
          <ion-icon name="chevron-forward-outline"></ion-icon>
        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="row">
        <div>手机号</div>
        <div class="right">
          <!-- <span>{{ mobile }}</span
          > -->
          <ion-input
            placeholder="待认证"
            value="{{ mobile }}"
            [disabled]="true"
          ></ion-input>
          <ion-icon name="chevron-forward-outline"></ion-icon>
        </div>
      </div>
    </ion-item>
    <!-- <div class="address" (click)="toAddress()">
      <span>收货地址管理</span
      ><ion-icon name="chevron-forward-outline"></ion-icon>
    </div> -->
  </ion-list>
  <button class="submit" (click)="upload.onUpload()">保存修改</button>
</ion-content>
