mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
alert fixed
This commit is contained in:
@ -12,6 +12,32 @@ export function alertWithOptionsTapped(args) {
|
||||
});
|
||||
}
|
||||
|
||||
export function alertWithNullTapped(args) {
|
||||
dialogs.alert(null);
|
||||
}
|
||||
|
||||
export function alertWithUndefinedTapped(args) {
|
||||
dialogs.alert(undefined);
|
||||
}
|
||||
|
||||
export function alertWithNumberTapped(args) {
|
||||
dialogs.alert(1);
|
||||
}
|
||||
|
||||
export function alertWithBooleanTapped(args) {
|
||||
dialogs.alert(false);
|
||||
}
|
||||
|
||||
export function alertWithFunctionTapped(args) {
|
||||
dialogs.alert(function () {
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
export function alertWithObjectTapped(args) {
|
||||
dialogs.alert({});
|
||||
}
|
||||
|
||||
export function confirmTapped(args) {
|
||||
dialogs.confirm("Are you sure?").then(r=> console.log(`Confirm result: ${r}`));
|
||||
}
|
||||
|
@ -4,6 +4,12 @@
|
||||
<StackLayout>
|
||||
<Button text="alert" tap="alertTapped"/>
|
||||
<Button text="alert with options" tap="alertWithOptionsTapped"/>
|
||||
<Button text="alert with null" tap="alertWithNullTapped"/>
|
||||
<Button text="alert with undefined" tap="alertWithUndefinedTapped"/>
|
||||
<Button text="alert with number" tap="alertWithNumberTapped"/>
|
||||
<Button text="alert with boolean" tap="alertWithBooleanTapped"/>
|
||||
<Button text="alert with function" tap="alertWithFunctionTapped"/>
|
||||
<Button text="alert with object" tap="alertWithObjectTapped"/>
|
||||
<Button text="confirm" tap="confirmTapped"/>
|
||||
<Button text="confirm with options" tap="confirmWithOptionsTapped"/>
|
||||
<Button text="prompt" tap="promptTapped"/>
|
||||
|
Reference in New Issue
Block a user