【问题标题】:Adaptive cards version 1.3自适应卡片 1.3 版
【发布时间】:2021-11-14 18:30:43
【问题描述】:

谁能告诉我我们如何使用自适应卡 1.3 版,当我使用任何 1.3 版的卡并在应用程序工作室查看它时显示?

【问题讨论】:

    标签: json botframework microsoft-teams adaptive-cards


    【解决方案1】:

    在 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"
        }
      ]
    }
    

    【讨论】:

    • 你能告诉我如何更新 app studio 以及你正在使用哪个版本的 botbuilder 的团队
    • 我们使用的是 Microsoft Teams 版本 1.4.00.26376(64 位)和 Bot builder Version="4.13.2"
    猜你喜欢
    • 2021-06-21
    • 2020-07-07
    • 2021-02-06
    • 2020-07-29
    • 2018-10-14
    • 2021-10-23
    • 2021-02-17
    • 2022-01-08
    • 2017-12-29
    相关资源
    最近更新 更多