Botframework 自适应卡中未显示分隔符
我一直在尝试让自适应卡的“分隔符”属性工作,但它似乎没有在BotFramework模拟器中呈现 以下是针对相同代码的Emulator和Visualizer的图像: 两处代码相同,如下所示:Botframework 自适应卡中未显示分隔符,botframework,adaptive-cards,Botframework,Adaptive Cards,我一直在尝试让自适应卡的“分隔符”属性工作,但它似乎没有在BotFramework模拟器中呈现 以下是针对相同代码的Emulator和Visualizer的图像: 两处代码相同,如下所示: { "contentType": "application/vnd.microsoft.card.adaptive", "content": { '$schema': 'http://adaptivecards.io/schemas/adaptive-card.json',
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
'$schema': 'http://adaptivecards.io/schemas/adaptive-card.json',
'version': '1.0',
'type': 'AdaptiveCard',
'body': [
{
'type': 'TextBlock',
'text': 'Meeting Title',
'weight': 'bolder'
},
{
'type': 'TextBlock',
'text': 'Location',
'separator': true,
'isSubtle': true,
'size': 'small'
},
{
'type': 'TextBlock',
'text': 'Location',
'spacing': 'none'
},
{
'type': 'TextBlock',
'text': 'Organizer',
'separator': true,
'isSubtle': true,
'size': 'small'
},
{
'type': 'TextBlock',
'text': 'Organizer Name',
'spacing': 'none'
},
{
'type': 'TextBlock',
'text': 'Start Time',
'separator': true,
'isSubtle': true,
'size': 'small'
},
{
'type': 'ColumnSet',
'spacing': 'none',
'columns': [
{
'type': 'Column',
'width': 'auto',
'items': [
{
'type': 'TextBlock',
'text': '05:00 PM',
'isSubtle': false,
'weight': 'bolder'
}
]
},
{
'type': 'Column',
'width': 'auto',
'items': [
{
'type': 'TextBlock',
'text': 'May 21'
}
]
},
{
'type': 'Column',
'width': 'auto',
'items': [
{
'type': 'TextBlock',
'text': '2017',
'isSubtle': true,
'weight': 'bolder'
}
]
}
]
},
{
'type': 'TextBlock',
'text': 'End Time',
'separator': true,
'isSubtle': true,
'size': 'small'
},
{
'type': 'ColumnSet',
'spacing': 'none',
'columns': [
{
'type': 'Column',
'width': 'auto',
'items': [
{
'type': 'TextBlock',
'text': '05:30 PM',
'isSubtle': false,
'weight': 'bolder'
}
]
},
{
'type': 'Column',
'width': 'auto',
'items': [
{
'type': 'TextBlock',
'text': 'May 21'
}
]
},
{
'type': 'Column',
'width': 'auto',
'items': [
{
'type': 'TextBlock',
'text': '2017',
'isSubtle': true,
'weight': 'bolder'
}
]
}
]
}
],
'actions': [
{
'type': 'Action.Submit',
'title': 'Accept',
'data':{
'accept': true
}
},
{
'type': 'Action.Submit',
'title': 'Decline',
'data':{
'accept': false
}
}
]
}
}
如图所示,对于相同的代码,分隔符仅出现在可视化工具中。我遗漏了什么吗?你可以用分隔符代替 分离=分离方式。强
这对我来说是可行的,可能有点棘手,因为分隔符文档有点模糊(至少对我来说是这样) 看一看-用于分隔符的语法似乎在任何地方都不起作用 我的发现:
属性工作正常(至少对于这些值间距
)“无”|“小”|“默认”|“中”|“大”|“超大”|“填充”
- 它仅在容器中使用时有效(
,容器
,列集
等)列
- 它也适用于(顾名思义)容器的外部区域(类似于CSS
属性)margin
- 不适用于第一个容器
您可以转到自适应卡并在第二个
容器
部分(只有两个)上放置间距(比如说“间距”:“大”
),然后自己观察间距影响。顺便说一句:不要完全相信自适应卡的机器人项目可视化工具,它通常呈现的内容与真实频道中的内容不完全相同。你必须仔细检查另一篇文章,答案是我们可以创建自定义模拟器。我想能够自己换牌。不是模拟器。比如,可以在其中插入一个HTML div。或者修改以某种方式将卡片JSON转换为HTML的解析器,以便能够添加额外的HTML div。例如,由于分隔符似乎不起作用,另一种方法是插入您自己的div,然后手动添加分隔符。“或者以某种方式修改将卡片JSON转换为HTML的解析器,以便能够添加额外的HTML div”我将如何实现这一点?