我们在以下自适应元素中存在“水平对齐”属性的问题: AdaptiveColumn、AdaptiveTextBlock和AdaptiveImage。将此属性设置为“中心”或“右”将导致重大设计问题(请参阅所附图像)。
原件:

“右”对齐:

下面是JSON:
{
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": 15,
"items": []
},
{
"type": "Column",
"width": 15,
"items": [
{
"type": "Image",
"url": "https://cdn4.iconfinder.com/data/icons/arrows-9/100/arrow-9-512.png",
"width": "30px",
"height": "24px"
}
],
"verticalContentAlignment": "Center",
"selectAction": {
"type": "Action.Submit",
"title": "Previous"
},
"horizontalAlignment": "Left"
},
{
"type": "Column",
"width": 40,
"items": [
{
"type": "Image",
"size": "Large",
"url": "https://aboutflowers.com/wp-content/uploads/2016/10/AboutFlowers_S600Alstroemera_SymphonyMorita_Esmeralda.jpg",
"horizontalAlignment": "Center"
}
]
},
{
"type": "Column",
"width": 15,
"items": [
{
"type": "Image",
"url": "https://cdn4.iconfinder.com/data/icons/arrows-9/100/arrow-10-512.png",
"width": "30px",
"horizontalAlignment": "Right",
"height": "24px"
}
],
"verticalContentAlignment": "Center",
"selectAction": {
"type": "Action.Submit",
"title": "Next"
}
},
{
"type": "Column",
"width": 15,
"items": []
}
]
}
]
},
{
"type": "TextBlock",
"text": "Image1",
"horizontalAlignment": "Center"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}同样的设计也适用于Android和桌面客户端。
发布于 2020-03-16 18:44:15
堆栈溢出不适用于错误报告。您可以通过团队应用程序本身提交反馈,也可以查看以下反馈页面:https://learn.microsoft.com/en-us/microsoftteams/platform/feedback
如果您确实提交了反馈,请随时链接到此堆栈溢出帖子,以便提供必要的信息。
在修复bug之前,您需要找到某种解决办法。也许您可以尝试“中间”对齐,而不是左和右。如果这样做不起作用,那么您可能不得不不使用任何对齐方式。您可能有兴趣知道,模式在使用height属性时提到了图像失真的可能性,因此您也可以尝试省略宽度和高度规范:https://adaptivecards.io/explorer/Image.html。
https://stackoverflow.com/questions/60693507
复制相似问题