如何显示自适应卡选择选项,就像用户键入它一样? [英] How to display adaptive card selected option as if the user typed it in?

查看:80
本文介绍了如何显示自适应卡选择选项,就像用户键入它一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,当我们在瀑布对话框中使用自适应卡时,机器人会记录所选的动作并处理下一个瀑布步骤- 它的外观

By default when we use adaptive cards in a waterfall dialog, the bot records the selected action and process the next waterfall step - how it actually looks

相反,我们可以在自适应卡中显示选定的选项,就像用户在选项中键入的内容一样- 我希望它看起来像

Instead can we display the selected option in the adaptive card as if the user typed in the option like - What I want it to look like

我有一个要求,我们希望将其显示为好像用户键入它一样,而不是机器人说您选择了X选项".

I have a requirement where we want to display it as if the user typed it in and not like the bot says "you selectd X option".

推荐答案

您可以通过使用自适应卡中的'data'属性来完成此操作.

You can do this by using the 'data' property in your Adaptive Card.

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
      {
        "type": "TextBlock",
        "spacing": "medium",
        "size": "small",
        "weight": "bolder",
        "text": "",
        "wrap": true,
        "maxLines": 0
      },
      {
        "type": "Container"
      }
    ],
    "actions": [
      {
        "type": "Action.Submit",
        "title": "Policy",
        "data": "Policy"
      },
      {
        "type": "Action.Submit",
        "title": "Scheduled",
        "data": "Scheduled"
      }
    ]
}

这篇关于如何显示自适应卡选择选项,就像用户键入它一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆