Button
data class Button @JvmOverloads constructor(val theme: Theme = Theme.Default, val value: String = "", val click: String = "", val text: CardElement.Text) : CardElement(source)
按钮
作用说明: 提供交互的功能
规则:
click 代表用户点击的事件,默认为"",代表无任何事件。
当为 link 时,会跳转到 value 代表的链接;
当为 return-val 时,系统会通过系统消息将消息 id,点击用户 id 和 value 发回给发送者, 发送者可以根据自己的需求进行处理,消息事件参见button 点击事件。 私聊和频道内均可使用按钮点击事件。
e.g.
{
"type": "button",
"theme": "primary|warning|info|danger|...", //按钮的主题颜色
"value": "", //要传递的value,为string
"click": "", //click时的事件类型, return-val 返回value值
"text": "",
}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(theme: Theme = Theme.Default, value: String = "", click: String = "", text: CardElement.Text)