本文整理匯總了TypeScript中tabris.Tab.set方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Tab.set方法的具體用法?TypeScript Tab.set怎麽用?TypeScript Tab.set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tabris.Tab
的用法示例。
在下文中一共展示了Tab.set方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: test_Tab
function test_Tab() {
var tab: Tab = new Tab();
tab.set("foo", 23);
tab.set({
badge: "foo",
title: "bar",
image: {src: "http://example.org"}
});
var folder = new TabFolder();
tab.appendTo(folder);
}
示例2: Tab
selectedImage = widget.selectedImage as ImageValue;
nullValue = widget.selectedImage as null;
title = widget.title;
badgeColor = widget.badgeColor;
widget.badge = badge;
widget.image = image;
widget.image = nullValue;
widget.selectedImage = selectedImage;
widget.selectedImage = nullValue;
widget.title = title;
widget.badgeColor = badgeColor;
let properties: Properties<Tab> = {badge, image, selectedImage, title, badgeColor};
widget = new Tab(properties);
widget.set(properties);
widget.appendTo(new TabFolder());
widget.insertBefore(new Tab());
widget.insertAfter(new Tab());
const siblings: WidgetCollection<Tab> = widget.siblings();
class CustomComponent extends Tab {
public foo: string;
constructor(props: Properties<Tab> & Partial<Pick<CustomComponent, 'foo'>>) { super(props); }
}
new CustomComponent({foo: 'bar'}).set({foo: 'bar'});
const components: WidgetCollection<CustomComponent> = widget.siblings(CustomComponent);