Adaptive Card inside Adaptive Card 常见问题解答
Adaptive Card inside Adaptive Card for FAQ's
我正在考虑制作一张用于常见问题解答的自适应卡片。所以有一张带有 Action.Showcard 的卡片,标题为常见问题解答。一旦用户点击常见问题解答,该卡片应展开以显示 5 个问题。问题本身就是一张自适应卡片,因此当用户单击问题时,卡片会打开以显示答案。
我无法将卡片夹在卡片中。这是我使用 Adaptive Card designer
构建的 JSON
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "Hi I am a ChatBot."
},
{
"type": "TextBlock",
"text": "Look at FAQs below.",
"wrap": true
}
],
"actions": [
{
"type": "Action.ShowCard",
"title": "FAQs",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "TextBlock",
"text": "How quickly can we close?"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Comment",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "Input.Text",
"id": "comment",
"placeholder": "Enter your comment",
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "OK"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
当我将 Action.ShowCard 放入 Action.ShowCard 标签时,它给我一个错误并将 Action.ShowCard 更改为 AdpativeCard。谁能告诉我这种设计的结构。这将很有帮助,因为我需要扩展这些常见问题解答。
也许我不理解你的问题,但我能够在设计器中毫无问题地创建你想要的结构:
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "Hi I am a ChatBot."
},
{
"type": "TextBlock",
"text": "Look at FAQs below.",
"wrap": true
}
],
"actions": [
{
"type": "Action.ShowCard",
"title": "FAQs",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"actions": [
{
"type": "Action.ShowCard",
"title": "How quickly can we close?",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "TextBlock",
"text": "Never"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Second question",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "TextBlock",
"text": "Second answer"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Comment",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "Input.Text",
"id": "comment",
"placeholder": "Enter your comment",
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "OK"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
我正在考虑制作一张用于常见问题解答的自适应卡片。所以有一张带有 Action.Showcard 的卡片,标题为常见问题解答。一旦用户点击常见问题解答,该卡片应展开以显示 5 个问题。问题本身就是一张自适应卡片,因此当用户单击问题时,卡片会打开以显示答案。
我无法将卡片夹在卡片中。这是我使用 Adaptive Card designer
构建的 JSON{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "Hi I am a ChatBot."
},
{
"type": "TextBlock",
"text": "Look at FAQs below.",
"wrap": true
}
],
"actions": [
{
"type": "Action.ShowCard",
"title": "FAQs",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "TextBlock",
"text": "How quickly can we close?"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Comment",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "Input.Text",
"id": "comment",
"placeholder": "Enter your comment",
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "OK"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
当我将 Action.ShowCard 放入 Action.ShowCard 标签时,它给我一个错误并将 Action.ShowCard 更改为 AdpativeCard。谁能告诉我这种设计的结构。这将很有帮助,因为我需要扩展这些常见问题解答。
也许我不理解你的问题,但我能够在设计器中毫无问题地创建你想要的结构:
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "Hi I am a ChatBot."
},
{
"type": "TextBlock",
"text": "Look at FAQs below.",
"wrap": true
}
],
"actions": [
{
"type": "Action.ShowCard",
"title": "FAQs",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"actions": [
{
"type": "Action.ShowCard",
"title": "How quickly can we close?",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "TextBlock",
"text": "Never"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Second question",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "TextBlock",
"text": "Second answer"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Comment",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "Input.Text",
"id": "comment",
"placeholder": "Enter your comment",
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "OK"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}