• Ionic4.x 中的 UI 组件(UI Components)表单相关组件


    1ion-input 单行文本框

    2ion-toggle 开关

    3ion-radio-groupion-radio 单选按钮组

    4ion-checkbox 多选按钮组

    5ion-select 选择框

    6ion-textarea 多行文本框

    <ion-list>
      <ion-item>
        <ion-label>用户名:</ion-label>
        <ion-input [(ngModel)]="peopleInfo.username"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label>年 龄:</ion-label>
        <ion-input [(ngModel)]="peopleInfo.age"></ion-input>
      </ion-item>
    </ion-list>
    <ion-item>
      <ion-label>是否本科</ion-label>
      <ion-toggle slot="end" [(ngModel)]="peopleInfo.falg"></ion-toggle>
    </ion-item>
    <ion-list>
      <ion-radio-group [(ngModel)]="peopleInfo.payType">
        <ion-item>
          <ion-avatar slot="start">
            <img src="assets/alipay.png"> </ion-avatar>
          <ion-label>支付宝</ion-label>
          <ion-radio value='1' slot="end"></ion-radio>
        </ion-item>
        <ion-item>
          <ion-avatar slot="start">
            <img src="assets/weixinpay.png"> </ion-avatar>
          <ion-label>微信</ion-label>
          <ion-radio value='2' slot="end"></ion-radio>
        </ion-item>
      </ion-radio-group>
    </ion-list>
    <ion-list>
      <ion-item *ngFor="let item of peopleInfo.checkBoxList">
        <ion-label>{{item.val}}</ion-label>
        <ion-checkbox slot="start" [(ngModel)]="item.isChecked"></ion-checkbox>
      </ion-item>
    </ion-list>
    <ion-list>
      <ion-select slot="end" [(ngModel)]="peopleInfo.city">
        <ion-select-option *ngFor="let item of peopleInfo.cityList" [value]="item">{{item}}</ion-select-option>
      </ion-select>
    </ion-list>
    <ion-list>
      <ion-item>
        <ion-textarea [(ngModel)]="peopleInfo.info"></ion-textarea>
      </ion-item>
    </ion-list>
  • 相关阅读:
    7maven依赖排除
    5maven生命周期
    4maven依赖范围、依赖有效性
    3maven常用命令和配置依赖
    1maven概念作用
    6在Eclipse中创建maven和修改默认配置
    2maven下载与配置
    Class 'org.apache.tomcat.jdbc.pool.DataSource' not found
    17 alternatives to your default image viewer on Fedora
    zip压缩包解压后的文件名是乱码?
  • 原文地址:https://www.cnblogs.com/loaderman/p/10956098.html
Copyright © 2020-2023  润新知