【发布时间】:2020-01-10 20:50:51
【问题描述】:
要在 Input.ChoiceSet 上设置选择,需要什么数据 json?
卡 Json
{
"type": "AdaptiveCard",
"body": [
{
"type": "Input.ChoiceSet",
"placeholder": "Placeholder text",
"choices": [
{
"title": "Choice 1",
"value": "1"
},
{
"title": "Choice 2",
"value": "2"
}
],
"style": "expanded",
"id": "sample"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
示例数据 Json
如果我想将Choice 1 的值设置为选中,这个结构应该是什么?
{
// I've tried this:
"sample": {
"value": "1"
}
}
-----------------------------
{
// Also tried
"sample": "1"
}
我正在阅读Adaptive Card schema for Input.ChoiceSet,我看到卡json "value": 属性可以在卡中设置为默认值,但我希望有一种方法可以从模板json 中做到这一点。否则,我必须在构建卡片之前将其“注入”到卡片 json 中。
【问题讨论】:
标签: adaptive-cards