如果您需要使用Add-in UI外观来呈现Adaptive card JSON,则需要通过添加适当的外观元素来自定义Adaptive card JSON。以下是一个示例代码片段,说明如何使用ActionSet来自定义Adaptive card JSON以呈现Add-in UI外观。
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "Choose your payment method:",
"size": "Medium",
"weight": "Bolder"
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Pay with Credit Card",
"data": { "PaymentMethod": "Credit Card" }
},
{
"type": "Action.Submit",
"title": "Pay with PayPal",
"data": { "PaymentMethod": "PayPal" }
}
]
}
]
}
这个示例代码片段使用TextBlock和ActionSet元素来自定义Adaptive card JSON以呈现Add-in UI外观。您可以根据需求添加其他元素来自定义Adaptive card JSON。