【发布时间】:2020-11-10 03:21:19
【问题描述】:
我在 MSTeams Bot 中使用自适应卡,点击一次我想禁用提交按钮以防止用户再次点击它,因为后端正在为按钮点击事件运行。
自适应卡代码-
async specialRewards() {
const specialRewardCard = CardFactory.adaptiveCard({
'$schema': 'http://adaptivecards.io/schemas/adaptive-card.json',
'version': '1.2',
'type': 'AdaptiveCard',
'body': [
{
'type': 'TextBlock',
'text': "Hey there! \n\n",
'wrap': true,
},
{
'type': 'TextBlock',
'text': 'Your birthday???? :',
'weight': 'Bolder',
'wrap': true,
},
{
'type': 'Input.Date',
'id': 'birthday',
'placeholder': 'Enter a date',
'spacing': 'Padding',
},
{
'type': 'TextBlock',
'text': 'Your work anniversary???? :',
'weight': 'Bolder',
'wrap': true,
},
{
'type': 'Input.Date',
'id': 'anniversary',
'placeholder': 'Enter a date',
'spacing': 'Padding',
},
],
'actions': [
{
'type': 'Action.Submit',
'title': 'Submit',
'isPrimary': true,
},
],
});
return specialRewardCard;
}
这就是它在 MSTeams 上的样子
【问题讨论】:
标签: node.js botframework adaptive-cards