[英]How to vertically stack buttons in adaptive cards for MS teams in bot framework
I tried using Column Set with each column containing a button, But MS Teams doesn't render buttons in preferred format whereas webchat does.我尝试使用列集,每列包含一个按钮,但 MS Teams 不会以首选格式呈现按钮,而 webchat 会。
In addition, I tried changing the size of "MIS Reports" button in MS Teams such that all buttons are of same size irrespective of the content, but I found there is no such property in adaptive cards.此外,我尝试更改 MS Teams 中“MIS 报告”按钮的大小,以便所有按钮的大小相同,而与内容无关,但我发现自适应卡片中没有这样的属性。
Could you please try adding the buttons inside different columns in different columnsets?您能否尝试在不同列集中的不同列中添加按钮? I have tried the below json and it worked for me:
我已经尝试了以下 json 它对我有用:
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Action.Submit"
}
]
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Submit action 2"
}
]
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Submit action3"
}
]
}
]
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.