本文整理匯總了TypeScript中tabris.Tab.insertBefore方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Tab.insertBefore方法的具體用法?TypeScript Tab.insertBefore怎麽用?TypeScript Tab.insertBefore使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tabris.Tab
的用法示例。
在下文中一共展示了Tab.insertBefore方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Tab
import {Tab, Composite, WidgetCollection, Button} from 'tabris';
let widget: Tab = new Tab();
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: 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);