本文整理汇总了TypeScript中blessed.listtable函数的典型用法代码示例。如果您正苦于以下问题:TypeScript listtable函数的具体用法?TypeScript listtable怎么用?TypeScript listtable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了listtable函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
blessed
.listtable({
parent: screen,
left: "50%-1",
top: "50%-1",
width: "50%+3",
height: "50%+3",
border: "line",
align: "center",
tags: true,
keys: true,
vi: true,
mouse: true,
style: {
header: {
fg: "blue",
bold: true
},
cell: {
fg: "magenta",
selected: {
bg: "blue"
}
}
},
data: [
["Animals", "Foods", "Times", "Numbers"],
["Elephant", "Apple", "1:00am", "One"],
["Bird", "Orange", "2:15pm", "Two"],
["T-Rex", "Taco", "8:45am", "Three"],
["Mouse", "Cheese", "9:05am", "Four"]
]
})
示例2:
blessed.listtable({
parent: screen,
left: '50%-1',
top: '50%-1',
width: '50%+3',
height: '50%+3',
border: 'line',
align: 'center',
tags: true,
keys: true,
vi: true,
mouse: true,
style: {
header: {
fg: 'blue',
bold: true
},
cell: {
fg: 'magenta',
selected: {
bg: 'blue'
}
}
},
data: [
[ 'Animals', 'Foods', 'Times', 'Numbers' ],
[ 'Elephant', 'Apple', '1:00am', 'One' ],
[ 'Bird', 'Orange', '2:15pm', 'Two' ],
[ 'T-Rex', 'Taco', '8:45am', 'Three' ],
[ 'Mouse', 'Cheese', '9:05am', 'Four' ]
]
}).focus();