mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Implement page property for ActionItem
This commit is contained in:
@@ -297,6 +297,10 @@ export class ActionItem extends bindable.Bindable implements dts.ActionItem {
|
||||
}
|
||||
}
|
||||
|
||||
get page(): pages.Page {
|
||||
return this.actionBar ? this.actionBar.page : undefined;
|
||||
}
|
||||
|
||||
public _raiseTap() {
|
||||
this._emit(ActionItem.tapEvent);
|
||||
}
|
||||
|
||||
5
ui/action-bar/action-bar.d.ts
vendored
5
ui/action-bar/action-bar.d.ts
vendored
@@ -128,6 +128,11 @@ declare module "ui/action-bar" {
|
||||
*/
|
||||
actionBar: ActionBar;
|
||||
|
||||
/**
|
||||
* Gets the page that contains the action item.
|
||||
*/
|
||||
page: pages.Page;
|
||||
|
||||
/**
|
||||
* A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
|
||||
* @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
|
||||
|
||||
Reference in New Issue
Block a user