本文整理匯總了TypeScript中tabris.Page.set方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Page.set方法的具體用法?TypeScript Page.set怎麽用?TypeScript Page.set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tabris.Page
的用法示例。
在下文中一共展示了Page.set方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: test_Page
function test_Page() {
var page: Page = new Page();
page.set("foo", 23);
page.set({
image: {src: "http://example.com"},
title: "foo",
topLevel: true
});
page.open().close();
}
示例2: Page
let title: string;
let nullValue: null;
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};