【发布时间】:2020-12-16 07:40:29
【问题描述】:
我正在尝试显示一个复选框以及一个文本输入字段。 (离子 3.5.3)
复选框未显示。我查看了another SO thread 的类似问题。代码好像和我做的一样。
代码:
let alert = this.alert.create({
title: 'Name your trip',
inputs: [
{
name: 'name',
placeholder: 'Your trip name',
},
{
name: 'gpsxy',
type:'checkbox',
checked:true,
label:'Log GPS co-ords',
value:"true"
}
],
buttons: [{
text: 'Cancel',
role: 'cancel',
handler: data => {
}
},
{
text: 'Ok',
handler: data => {
}],
});
alert.present();
【问题讨论】:
-
您可以使用模态框代替您想要的任何输入和元素来模拟警报。
-
好的,谢谢。这就是我打算做的——更多的工作,但唯一的选择:)