本文介绍了CardAction DisplayText似乎不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建(v4 sdk)具有标题,DisplayText和值的postBack CardAction时,我希望该值被回发,标题将显示在按钮中,而DisplayText将显示在路径中.我通常得到的要么是什么都不显示轨迹(如果值不是字符串),要么是值(如果它是字符串).我是否误解了该如何工作? PS,主要是在模拟器中进行测试.

When I create (v4 sdk) a postBack CardAction with Title, DisplayText and a Value I expect the value to be posted back, the Title to be shown in a button and the DisplayText to be shown in the trail. What I typically get is either nothing the display trail (if the value isn't a string) or the value if it is a string. Have I misread how this is supposed to work? PS, mostly testing in the emulator.

推荐答案

不幸的是,每个频道在使用按钮时都会有不同的行为.作为一般的最佳实践,我将使用相同的值填充所有字符串参数,以覆盖通道之间的差异.您可以在此示例

Unfortunately, every channel can have different behavior when it comes buttons. As a general best practice I will fill in all the string parameters with the same value to cover the differences across channels. You can see an example of this in this sample

现在听起来像您这样:

new CardAction(ActionTypes.ImBack, title: "Help", displayText: "Help", value: "Help")

尝试像这样添加text参数:

new CardAction(ActionTypes.ImBack, title: "Help", text:"Help", displayText: "Help", value: "Help")

这篇关于CardAction DisplayText似乎不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 04:29
查看更多