【发布时间】:2021-10-23 21:44:56
【问题描述】:
只是想问一下微软团队是否已经支持此功能? 我已经在这个网站上检查过: https://blog.botframework.com/2019/07/02/using-adaptive-cards-with-the-microsoft-bot-framework/ 自适应卡版本已更新至 1.3。但是当我实现了提前类型支持时,它就不起作用了。如果我遗漏了什么,请告诉我:
我正在使用 AdaptiveCardTemplate 来渲染卡片:
{
""type"": ""AdaptiveCard"",
""body"": [
{
""type"": ""TextBlock"",
""size"": ""Large"",
""weight"": ""Bolder"",
""text"": ""Hey ${sender.first}!"",
""wrap"": true
},
{
""type"": ""TextBlock"",
""text"": ""I am not sure what you mean by '${text}'. You can ask me for **help** if you are not sure how to interact with me."",
""wrap"": true,
""$when"": ""${showProperty}""
},
{
""type"": ""TextBlock"",
""text"": ""I'm sorry, I didn't quite understand what you wanted. Can I help you with something or are you looking to get an update on one of your requests?"",
""wrap"": true,
""$when"": ""${!showProperty}""
},
{
""type"": ""Image"",
""url"": ""https://picsum.photos/200/200?image=110"",
""msTeams"": {
""allowExpand"": true
}
},
{
""type"": ""Input.ChoiceSet"",
""placeholder"": ""Select one or more options"",
""isMultiSelect"": false,
""choices"": [
{ ""title"": ""user 1"", ""value"": ""user1"" },
{ ""title"": ""user 2"", ""value"": ""user2"" }
],
""style"": ""filtered"",
""id"": ""changePriorityOptionsTest2"",
}
],
""actions"": [
{
""type"": ""Action.ShowCard"",
""title"": ""Make a request"",
""card"": {
""type"": ""AdaptiveCard"",
""body"": [
{
""type"": ""TextBlock"",
""text"": ""Request"",
""weight"": ""Bolder"",
""wrap"": true
},
{
""type"": ""TextBlock"",
""text"": ""Maximum 500 characters"",
""wrap"": true,
""size"": ""Small"",
""weight"": ""Lighter""
},
{
""type"": ""Input.Text"",
""id"": ""title"",
""value"": ""${text}"",
""placeholder"": ""Add a title"",
""isMultiline"": true,
""spacing"": ""none""
},
{
""type"": ""TextBlock"",
""text"": ""Priority"",
""weight"": ""Bolder"",
""wrap"": true,
},
{
""type"": ""Input.ChoiceSet"",
""isMultiSelect"": true,
""choices"": [
{
""$data"": ""${priorityOptions}"",
""title"": ""${Value}"",
""value"": ""${Id}""
}
],
""value"": ""${priorityId}"",
""id"": ""changePriorityOptions"",
""style"": ""compact"",
}
],
""actions"": [
{
""type"": ""Action.Submit"",
""title"": ""Submit"",
""id"": ""CreateTicket"",
""data"": { ""title"": ""${title}"", ""commandId"": ""CreateTicket"" }
}
],
""$schema"": ""http://adaptivecards.io/schemas/adaptive-card.json""
},
""$when"": ""${!showProperty}""
},
{
""type"": ""Action.Submit"",
""title"": ""Status of my requests"",
""id"": ""MyTickets"",
""data"": { ""text"": ""${text}"", ""commandId"": ""MyTickets"" },
""$when"": ""${!showProperty}""
}
],
""$schema"": ""http://adaptivecards.io/schemas/adaptive-card.json"",
""version"": ""1.2"",
""msteams"": {
""width"": ""Full""
},
}
【问题讨论】:
标签: microsoft-teams adaptive-cards