gpt4 book ai didi

python - 自适应卡 : How to create table with 6 columns without truncating text?

转载 作者:行者123 更新时间:2023-12-04 03:50:36 24 4
gpt4 key购买 nike

我创建了一张自适应卡片以显示为表格。但是,文本被截断为 Today I... 而不是 Today In Count 完整文本。

此自适应卡片适用于 Microsoft Teams。

自适应卡片:

{
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.2",
"body":[
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"Zone",
"weight":"bolder"
},
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"EAST ZONE",
"separator":true
}
]
},
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"Today In Counter",
"weight":"bolder"
},
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"168",
"separator":true
}
]
},
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"Monthly Count (A)",
"weight":"bolder"
},
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"5884",
"separator":true
}
]
},
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"Cancel (B)",
"weight":"bolder"
},
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"1",
"separator":true
}
]
},
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"Return (C)",
"weight":"bolder"
},
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"19",
"separator":true
}
]
},
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"NET Re Count (A-B-C)",
"weight":"bolder"
},
{
"type":"TextBlock",
"isSubtle":true,
"width":"stretch",
"text":"5864",
"separator":true
}
]
}
]
}
]
}

输出:

enter image description here

如何在所有列中获取完整的文本或如何增加列的宽度?

更新-1:

在设计器中将 width: 'stretch' 更改为 width: 'auto' 后,即使选择 host app as Microsoft Teams 也能正常工作.但不适用于实际的团队应用程序。

有什么建议吗?

预期输出:

enter image description here

最佳答案

虽然您不能像 Manish 所说的那样加宽自适应卡片,但您可以将文本换行,以便每个单元格根据需要变高。为了将单元格格式化为整齐的行而不仅仅是列,您可以为每一行使用单独的列集,如以下答案中所述:Is there a way I can give column padding to an adaptive card- Adaptive MS BOT

关于python - 自适应卡 : How to create table with 6 columns without truncating text?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64480028/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com