Microsoft团队-MS Team bot中的多选

时间:2020-07-03 12:11:44

标签: botframework microsoft-teams adaptive-cards

如何通过自适应卡在下拉列表中实施多重选择,以填写包含要选择的雇员姓名的表格。

如果不是,通过bot在Ms Teams中实施多重选择的其他方法是什么。

this这样的多选。

1 个答案:

答案 0 :(得分:0)

检查并构建samples。 检查此样本自适应卡

{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"speak": "<s>Your  meeting about \"Adaptive Card design session\"<break strength='weak'/> is starting at ${formatDateTime(start.dateTime, 'HH:mm')}pm</s><s>Do you want to snooze <break strength='weak'/> or do you want to send a late notification to the attendees?</s>",
"body": [
    {
        "type": "TextBlock",
        "text": "${summary}",
        "size": "Large",
        "weight": "Bolder"
    },
    {
        "type": "TextBlock",
        "text": " ${location} ",
        "isSubtle": true
    },
    {
        "type": "TextBlock",
        "text": "${formatDateTime(start.dateTime, 'HH:mm')} - ${formatDateTime(end.dateTime, 'hh:mm')}",
        "isSubtle": true,
        "spacing": "None"
    },
    {
        "type": "TextBlock",
        "text": "Snooze for"
    },
    {
        "type": "Input.ChoiceSet",
        "id": "snooze",
        "value": "${reminders.overrides[0].minutes}",
        "choices": [
                 {
                "$data": "${reminders.overrides}",
                "title": "${hours} hours",
                "value": "${hours}"
            },
            {
                "$data": "${reminders.overrides}",
                "title": "${minutes} minutes",
                "value": "${minutes}"
            },
                 {
                "$data": "${reminders.overrides}",
                "title": "${seconds} seconds",
                "value": "${seconds}"
            }

        ],
        "isMultiSelect": true
    }
],
"actions": [
    {
        "type": "Action.Submit",
        "title": "Snooze",
        "data": {
            "x": "snooze"
        }
    },
    {
        "type": "Action.Submit",
        "title": "I'll be late",
        "data": {
            "x": "late"
        }
    }
]

}