本文整理汇总了TypeScript中blessed.layout函数的典型用法代码示例。如果您正苦于以下问题:TypeScript layout函数的具体用法?TypeScript layout怎么用?TypeScript layout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了layout函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
screen = blessed.screen({
dump: __dirname + "/logs/layout.log",
smartCSR: true,
autoPadding: true,
warnings: true
});
const layout = blessed.layout({
parent: screen,
top: "center",
left: "center",
width: "50%",
height: "50%",
border: "line",
layout: process.argv[2] === "grid" ? "grid" : "inline",
style: {
bg: "red",
border: {
fg: "blue"
}
}
});
blessed.box({
parent: layout,
top: "center",
left: "center",
width: 20,
height: 10,
border: "line",
示例2:
screen = blessed.screen({
dump: __dirname + '/logs/layout.log',
smartCSR: true,
autoPadding: true,
warnings: true
});
var layout = blessed.layout({
parent: screen,
top: 'center',
left: 'center',
width: '50%',
height: '50%',
border: 'line',
layout: process.argv[2] === 'grid' ? 'grid' : 'inline',
style: {
bg: 'red',
border: {
fg: 'blue'
}
}
});
var box1 = blessed.box({
parent: layout,
top: 'center',
left: 'center',
width: 20,
height: 10,
border: 'line',