适应性卡片Bot Framework构建器是一个用于创建适应性卡片的工具,可以将其与Bot Framework项目一起使用。以下是一个基本的适应性卡片示例:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "适应性卡片Bot Framework Composer示例",
"size": "large",
"weight": "bolder"
},
{
"type": "TextBlock",
"text": "这是一个适应性卡片示例",
"separator": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "查看更多",
"url": "https://adaptivecards.io"
}
]
}
要在Bot Framework composer中使用适应性卡片,请按照以下步骤进行操作:
在Bot Framework Composer中创建一个新的Dialog,例如“AdaptiveCardDialog”。
在设计界面中添加一个适应性卡片,或者使用下面的JSON代码替换默认字段:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "适应性卡片Bot Framework Composer示例",
"size": "large",
"weight": "bolder"
},
{
"type": "TextBlock",
"text": "这是一个适应性卡片示例",
"separator": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "查看更多",
"url": "https://adaptive