离子自定义弹出窗口

时间:2020-10-25 06:38:16

标签: angular ionic-framework popup

enter image description here 代码中换行的字符转义不起作用,并且输入的标签在某处丢失了...我不确定如何创建自定义弹出窗口

let alert = this.alertCtrl.create({

      header: trip.name,

      subHeader: "Enter the number of slots\r\nPricing for the slots is " + trip.price + "\r\n" +

      "Slots remaining " + trip.slots + "\r\n"+ "Bookable slots " + (trip.slots*.1),

      inputs: [

        {

          label: 'Slots',

          name: 'Slots',

          placeholder: 'Slots',

          type: 'number',

          value: this.tripvalues,

          max: Math.trunc((trip.slots*.1)),

          min: 1

        }

      ],

      buttons: [

        {

          text: 'Cancel',

          role: 'cancel',

          handler: data => {

            console.log('Cancel clicked');

          }

        },

        {

          text: 'Login',

          handler: data => {

            

          }

        }

      ]

    });

    (await alert).present();

  }

我该如何实现这样的东西?

enter image description here

0 个答案:

没有答案