如何在机器人框架中为 MS 团队垂直堆叠自适应卡片中的按钮

How to vertically stack buttons in adaptive cards for MS teams in bot framework

我尝试使用 Column Set,每列都包含一个按钮,但 MS Teams 不会以首选格式呈现按钮,而 webchat 会。

此外,我尝试在 MS Teams 中更改 "MIS Reports" 按钮的大小,以便所有按钮的大小都相同,而不管内容如何,​​但我发现自适应中没有这样的 属性牌。

能否尝试将按钮添加到不同列集中的不同列中?我已经尝试了下面的 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"
}

截图如下: