如何在对话框中实现表格 [英] How to create table in dialogflow-fulfillment
本文介绍了如何在对话框中实现表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Google行动中,我们可以添加如下表:
const {dialogflow,Table} = require('actions -on-google');
const request = require(’request’);
const conv = new DialogflowConversation(request);
conv.ask(这是一个简单的表格示例。);
conv.ask(新表格({
分隔符:true,
列:['header 1','header 2','header 3'],
行:[
['行1项目1','行1项目2','行1项目3'],
['行2项目1','行2项目2','行2项目3'],
],
}));
如何使用dialogflow-fillfillment创建表??
实际上,对于我来说,我使用的是dialogflow-fillfillment。
和我想像这样使用:
agent.add(new Table({
分隔符:true ,
列:['header 1','header 2','header 3'],
行:[
['row 1 item 1','row 1 item 2', '行1项目3'],
['行2项目1','行2项目2','行2项目3'],
],
})));
我可以使用dialogflow-fulfillment这样吗?
解决方案
从库的源代码来看,似乎仍然没有提供 Table
。 p>
通过查看
In actions-on-google we can add table like :
const {dialogflow, Table} = require('actions-on-google');
const request = require('request');
const conv = new DialogflowConversation(request);
conv.ask('This is a simple table example.');
conv.ask(new Table({
dividers: true,
columns: ['header 1', 'header 2', 'header 3'],
rows: [
['row 1 item 1', 'row 1 item 2', 'row 1 item 3'],
['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],
],
}));
How to create the table using dialogflow-fulfillment ??
Actually in my case, I am using dialogflow-fulfillment. ANd I want to use like :
agent.add(new Table({
dividers: true,
columns: ['header 1', 'header 2', 'header 3'],
rows: [
['row 1 item 1', 'row 1 item 2', 'row 1 item 3'],
['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],
],
}));
Can I do it like this using dialogflow-fulfillment?
解决方案
From the source code of library, it doesn't seem that Table
is still provided in that.
By looking at the source I can say it is providing
- Text
- Cards
- Images
- Suggestion Chips (Quick Replies)
Even if we look at src folder it is not having anything related to Table
这篇关于如何在对话框中实现表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文