在 ms teams bot 响应中配置事实集项目的宽度
Configure the width of fact-set items in ms teams bot response
我在机器人响应中使用 factset 来显示列,如下面的屏幕截图所示...
当事实的值增加一定长度时,第一列会自行调整,使“更新”进入下一行..
有什么办法可以避免这种情况吗?我希望所有情况下的“最后更新”都在同一行...
没有任何 属性 与 FactSet 或 Fact 关联来处理宽度。
您可以尝试制作 AdaptiveCard:Full width 这可能会解决您的问题(不是 100%,但如果文本包含全角)。
您也可以尝试使用 ColumnSet,因为列具有宽度属性。
我使用 Columns 尝试了您的方案,它呈现得很好。查看我的 AdaptiveCard JSON 及其下面的输出。
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "100px",
"items": [
{
"type": "TextBlock",
"text": "Author",
"wrap": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Last Updated",
"wrap": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Tickers",
"wrap": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Tags",
"wrap": true,
"weight": "Bolder"
}
]
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "Matt Hidinger"
},
{
"type": "TextBlock",
"text": "Created {{DATE(2017-02-14T06:08:39Z, SHORT)}}",
"wrap": true
},
{
"type": "TextBlock",
"text": "#5 Some VALUE"
},
{
"type": "TextBlock",
"text": "#someTags #someTags#someTags#someTags#so someTags#someTags #someTags#someTags#someTags#someTags #someTags#someTags #someTags #someTags #someTags #someTags #someTags #someTags",
"wrap": true
}
]
}
]
}
]
}
]
}
结果如下所示:
我在机器人响应中使用 factset 来显示列,如下面的屏幕截图所示...
当事实的值增加一定长度时,第一列会自行调整,使“更新”进入下一行..
有什么办法可以避免这种情况吗?我希望所有情况下的“最后更新”都在同一行...
没有任何 属性 与 FactSet 或 Fact 关联来处理宽度。
您可以尝试制作 AdaptiveCard:Full width 这可能会解决您的问题(不是 100%,但如果文本包含全角)。
您也可以尝试使用 ColumnSet,因为列具有宽度属性。
我使用 Columns 尝试了您的方案,它呈现得很好。查看我的 AdaptiveCard JSON 及其下面的输出。
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "100px",
"items": [
{
"type": "TextBlock",
"text": "Author",
"wrap": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Last Updated",
"wrap": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Tickers",
"wrap": true,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Tags",
"wrap": true,
"weight": "Bolder"
}
]
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "Matt Hidinger"
},
{
"type": "TextBlock",
"text": "Created {{DATE(2017-02-14T06:08:39Z, SHORT)}}",
"wrap": true
},
{
"type": "TextBlock",
"text": "#5 Some VALUE"
},
{
"type": "TextBlock",
"text": "#someTags #someTags#someTags#someTags#so someTags#someTags #someTags#someTags#someTags#someTags #someTags#someTags #someTags #someTags #someTags #someTags #someTags #someTags",
"wrap": true
}
]
}
]
}
]
}
]
}
结果如下所示: