解决 Adaptive Cards 1.2 缺乏支持的问题
Working around the lack of support for Adaptive Cards 1.2
我在 Bot Framework 中使用 AdaptiveCards 包 (1.2.3)。
我设计了一张漂亮的卡片,然后我发现 AdaptiveCards 1.2 不受支持(至少在 Azure WebChat 和模拟器中)。
1.2 包中有很多有用的功能:
- 容器和列中的
bleed
效果。
ActionSet
功能可在卡片上的任意位置显示按钮。
- 能够
ToggleVisibility
一个元素。
- ...
是否有可能很快支持 AdaptiveCards 1.2?
无论如何,我正在尝试解决该问题并使用 1.1 版本获得类似的结果。我试图用 padding
属性 模拟出血效果(没有成功),我也想在单独的列中进行操作,如下所示:
有没有办法在 AdaptiveCards 1.1 中实现这一点?
Adaptive Cards 1.1 无法实现您想要的效果。
Adaptive Cards 1.2 在 Web Chat 中的支持已有一段时间了。 Direct Line 存在一个问题,它会从 Adaptive Cards 中删除某些元素,但应该会尽快修复。同时,有一个 workaround,您可以在其中将内容类型更改为 application/vnd.microsoft.card.adaptive
以外的内容,然后在客户端再次将其更改回来。
Adaptive Cards 1.2 也已经在 Emulator 中得到支持一段时间了。只需确保您安装了最新版本:https://github.com/microsoft/BotFramework-Emulator/releases
我在 Bot Framework 中使用 AdaptiveCards 包 (1.2.3)。
我设计了一张漂亮的卡片,然后我发现 AdaptiveCards 1.2 不受支持(至少在 Azure WebChat 和模拟器中)。
1.2 包中有很多有用的功能:
- 容器和列中的
bleed
效果。 ActionSet
功能可在卡片上的任意位置显示按钮。- 能够
ToggleVisibility
一个元素。 - ...
是否有可能很快支持 AdaptiveCards 1.2?
无论如何,我正在尝试解决该问题并使用 1.1 版本获得类似的结果。我试图用 padding
属性 模拟出血效果(没有成功),我也想在单独的列中进行操作,如下所示:
有没有办法在 AdaptiveCards 1.1 中实现这一点?
Adaptive Cards 1.1 无法实现您想要的效果。
Adaptive Cards 1.2 在 Web Chat 中的支持已有一段时间了。 Direct Line 存在一个问题,它会从 Adaptive Cards 中删除某些元素,但应该会尽快修复。同时,有一个 workaround,您可以在其中将内容类型更改为 application/vnd.microsoft.card.adaptive
以外的内容,然后在客户端再次将其更改回来。
Adaptive Cards 1.2 也已经在 Emulator 中得到支持一段时间了。只需确保您安装了最新版本:https://github.com/microsoft/BotFramework-Emulator/releases