本文整理匯總了TypeScript中tabris.Page.appendTo方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Page.appendTo方法的具體用法?TypeScript Page.appendTo怎麽用?TypeScript Page.appendTo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tabris.Page
的用法示例。
在下文中一共展示了Page.appendTo方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Page
import {Page, Composite} from 'tabris';
let widget: Page = new Page();
widget.appendTo(new Composite());
widget.insertBefore(new Composite());
widget.insertAfter(new Composite());
/*Expected
(4,
not assignable to parameter
(5,
not assignable to parameter
(6,
not assignable to parameter
*/
示例2: Page
autoDispose = widget.autoDispose;
image = widget.image as ImageValue;
nullValue = widget.image as null;
title = widget.title;
widget.autoDispose = autoDispose;
widget.image = image;
widget.image = nullValue;
widget.title = title;
let properties: Properties<Page> = {autoDispose, image, title};
widget = new Page(properties);
widget.set(properties);
widget.appendTo(new NavigationView());
widget.insertBefore(new Page());
widget.insertAfter(new Page());
const siblings: WidgetCollection<Page|Action> = widget.siblings();
const actions: WidgetCollection<Action> = widget.siblings(Action);
const pages: WidgetCollection<Page> = widget.siblings(Page);
// Events
let target: Page = widget;
let timeStamp: number = 0;
let type: string = 'foo';
let appearEvent: EventObject<Page> = {target, timeStamp, type};
let disappearEvent: EventObject<Page> = {target, timeStamp, type};
widget