mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Added closeModal() to the d.ts and updated the sample app.
This commit is contained in:
@@ -17,3 +17,7 @@ export function onTap(args: observable.EventData) {
|
|||||||
label.text = username + "/" + password;
|
label.text = username + "/" + password;
|
||||||
}, fullscreen);
|
}, fullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function onCloseModal(args: observable.EventData) {
|
||||||
|
page.closeModal();
|
||||||
|
}
|
||||||
@@ -3,5 +3,6 @@
|
|||||||
<Button text="Login (small)" tap="onTap" />
|
<Button text="Login (small)" tap="onTap" />
|
||||||
<Button text="Login (full-screen)" tap="onTap" />
|
<Button text="Login (full-screen)" tap="onTap" />
|
||||||
<Label id="label" text="Anonymous"/>
|
<Label id="label" text="Anonymous"/>
|
||||||
|
<Button text="Close Modal" tap="onCloseModal" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</Page>
|
</Page>
|
||||||
5
ui/page/page.d.ts
vendored
5
ui/page/page.d.ts
vendored
@@ -157,6 +157,11 @@ declare module "ui/page" {
|
|||||||
*/
|
*/
|
||||||
showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean);
|
showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Closes the current modal dialog that this page is showing.
|
||||||
|
*/
|
||||||
|
closeModal();
|
||||||
|
|
||||||
//@private
|
//@private
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user