mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Fixes alertview when displaying more than 2 buttons
This commit is contained in:
@@ -51,6 +51,25 @@ class E2EPage {
|
||||
});
|
||||
}
|
||||
|
||||
doAlertLongMessage() {
|
||||
let alert = Alert.create({
|
||||
title: 'Alert',
|
||||
message: 'Message <strong>text</strong>!!!',
|
||||
buttons: ['Cancel', 'Continue to grant access']
|
||||
});
|
||||
this.nav.present(alert);
|
||||
}
|
||||
|
||||
doMultipleButtons() {
|
||||
let alert = Alert.create({
|
||||
title: 'Alert',
|
||||
subTitle: 'Subtitle',
|
||||
message: 'This is an alert message.',
|
||||
buttons: ['Cancel', 'Continue', 'Delete']
|
||||
});
|
||||
this.nav.present(alert);
|
||||
}
|
||||
|
||||
doPrompt() {
|
||||
let alert = Alert.create();
|
||||
alert.setTitle('Prompt!');
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
<ion-navbar *navbar>
|
||||
<ion-title>Alerts</ion-title>
|
||||
</ion-navbar>
|
||||
@@ -6,6 +5,8 @@
|
||||
<ion-content padding>
|
||||
|
||||
<button block class="e2eOpenAlert" (click)="doAlert()">Alert</button>
|
||||
<button block class="e2eOpenAlertLongMessage" (click)="doAlertLongMessage()">Alert Long Message</button>
|
||||
<button block class="e2eOpenMultipleButtons" (click)="doMultipleButtons()">Multiple Buttons (>2)</button>
|
||||
<button block class="e2eOpenConfirm" (click)="doConfirm()">Confirm</button>
|
||||
<button block class="e2eOpenPrompt" (click)="doPrompt()">Prompt</button>
|
||||
<button block class="e2eOpenRadio" (click)="doRadio()">Radio</button>
|
||||
@@ -23,4 +24,4 @@
|
||||
Checkbox Result: {{testCheckboxResult}}
|
||||
</pre>
|
||||
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
Reference in New Issue
Block a user