我正在尝试使用下面的模板在 Microsoft Bot Composer 中显示自适应卡,以显示具有一列的表格。
> To learn more Adaptive Cards format, read the documentation at
> https://docs.microsoft.com/en-us/adaptive-cards/getting-started/bots
- ```
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "${isArray($dialog.api_response.content)}",
"size": "large",
"weight": "bolder"
},
{
"type": "TextBlock",
"text": "${dialog.api_response.statusCode}",
"size": "large",
"weight": "bolder"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "${description}",
"wrap": true
}
]
}
],
"data": ${dialog.api_response.content}
}
以下是调试控制台中显示的内容:
${dialog.api_response.content}
[
{"description": "Information about Renewal application"},
{"description": "Information about Initial application"},
{"description": "Information about my reactivation application status"}
]
输出没有显示任何内容,甚至没有显示我要打印的数组的长度。有人可以表明他们是否出于类似原因成功使用了自适应卡吗?
谢谢你。
Composer 使用 Web Chat 作为聊天客户端的基础。这是网络聊天中的一个已知问题,在 Composer 在网络聊天中运行之前,该问题无法用于 Composer。这可以在这里监控: https://github.com/microsoft/BotFramework-WebChat/issues/4626