本文整理匯總了TypeScript中phosphor-tabs.TabPanel類的典型用法代碼示例。如果您正苦於以下問題:TypeScript TabPanel類的具體用法?TypeScript TabPanel怎麽用?TypeScript TabPanel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TabPanel類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: main
/**
* The main application entry point.
*/
function main(): void {
var model = new app.TodoModel('react-todos');
var todo = new TodoWidget(model);
todo.title.text = 'Demo';
var cmSource = new CodeMirrorWidget({
mode: 'text/typescript',
lineNumbers: true,
tabSize: 2,
});
cmSource.loadTarget('./index.ts');
cmSource.title.text = 'Source';
var cmCss = new CodeMirrorWidget({
mode: 'text/css',
lineNumbers: true,
tabSize: 2,
});
cmCss.loadTarget('./index.css');
cmCss.title.text = 'CSS';
var panel = new TabPanel()
panel.id = 'main';
panel.addChild(todo);
panel.addChild(cmSource);
panel.addChild(cmCss);
panel.attach(document.body);
window.onresize = () => { panel.update(); };
}
示例2: createDocumentTabPanel
function createDocumentTabPanel(app: App): TabPanel {
let panel = new TabPanel();
panel.tabsMovable = true;
let docPanel = new DocumentPanel();
panel.addChild(docPanel);
return panel;
}
示例3: addContent
/**
* Add a new content widget the the given tab panel.
*/
function addContent(panel: TabPanel): void {
var content = new ContentWidget(nextTitle());
panel.addChild(content);
}