[英]Dialogflow - Google Assistant: Show suggestions in multiple lines
I want to show a list of suggestions to the user, and as expected I do it like: 我想向用户显示建议列表,并且按预期方式执行:
new Suggestions('option 1', 'option 2', 'option 3', '...');
But the problem is that this way the suggestions are shown in a single row and the user will have to do horizontal scroll to reach all suggestions. 但是问题在于,这样建议以单行显示,并且用户将不得不进行水平滚动才能找到所有建议。
Instead, I would prefer to organize the suggestions in a table view in order to have multiple rows. 相反,我希望在表格视图中组织建议,以便具有多行。
I thought I could get through this using this approach but it doesn't seem to work: 我以为我可以使用这种方法来解决这个问题,但似乎行不通:
new Table({
dividers: true,
columns: ['header 1', 'header 2', 'header 3'],
rows: [
[new Suggestions('opt 1-1'), new Suggestions('opt 1-2'), new Suggestions('opt 1-3')],
[new Suggestions('opt 2-1'), new Suggestions('opt 2-2'), new Suggestions('opt 2-3')],
]
})
Does anyone know any other way how to achieve this? 有谁知道其他方法如何实现这一目标?
There's not really a way to show suggestions within a table. 表格中实际上没有显示建议的方法。 You could show a table of plain text, inviting the user to say one of the options, but you won't get the interactive widgets.
您可以显示一个纯文本表,邀请用户说出其中一个选项,但是您不会获得交互式窗口小部件。
The idea of the suggestion chips is to suggest but not mandate a handful of potential things that the user might say to continue the conversation, and the horizontal row is meant to highlight the most frequent. 建议芯片的想法是建议但不强制要求用户说几句可能会继续对话的内容,并且水平行旨在突出显示最频繁的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.