json - 自适应卡片 1.3 版
解决方案
在 App Studio 和 MS Teams 中尝试了 1.3 版的自适应卡,它运行良好。请您尝试升级您的版本并检查它是否有效。附上我测试过的json:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"speak": "Tom's Pie is a pizza restaurant which is rated 9.3 by customers.",
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": 2,
"items": [
{
"type": "TextBlock",
"text": "PIZZA"
},
{
"type": "TextBlock",
"text": "Tom's Pie",
"weight": "bolder",
"size": "extraLarge",
"spacing": "none"
},
{
"type": "TextBlock",
"text": "4.2 ★★★☆ (93) · $$",
"isSubtle": true,
"spacing": "none"
},
{
"type": "TextBlock",
"text": "**Matt H. said** \"I'm compelled to give this place 5 stars due to the number of times I've chosen to eat here this past year!\"",
"size": "small",
"wrap": true
},
{
"type": "Input.ChoiceSet",
"label": "Select a user",
"isMultiSelect": false,
"choices": [
{
"title": "User 1",
"value": "User1"
},
{
"title": "User 2",
"value": "User2"
},
{
"title": "User 3",
"value": "User3"
},
{
"title": "User 4",
"value": "User4"
},
{
"title": "User 5",
"value": "User5"
}
],
"style": "filtered"
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "Image",
"url": "https://picsum.photos/300?image=882",
"size": "auto"
}
]
}
]
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "More Info",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
]
}
推荐阅读
- node.js - 使用点语法解析嵌套主体
- blockchain - 如何使用 cardano-rosetta 和 cardano-addresses 构建 cardano 交易
- javascript - 仅通过电子应用程序的前端向服务器发送和获取请求
- python - 当没有数学函数时,借助机器学习预测进行pymoo优化?
- excel - 如何使用户窗体将数据添加到工作簿中所有可见工作表中的相同单元格
- c - 如何使用 printf 格式化(有符号)长整型?
- java - 如何使用 Java 和 XmlSchema Core 解析 XSD 并读取所有复杂元素及其子元素
- c# - 如何在 Chrome 中打开 URL,如果在后台打开或最小化,请将其放在前面
- angular - 角度错误 setInterval:不清除间隔或不做我不理解的事情
- excel - 修改 Countif rank 公式,匹配结果只计算一次