[英]How can i make an horizontal carousel in dialogflow?
When I try to create a carousel dynamically in dialogflow it appears vertically and with two items per row. 当我尝试在dialogflow中动态创建轮播时,它垂直出现,每行有两个项目。
This is for a google assistant application, the actions on google documentation say that the carousel scrolls horizontally, but I can´t make it happen. 这是针对Google助手应用程序的,Google文档上的操作表示轮播会水平滚动,但我无法实现。
for (let i = 0; i < data_JSON.length; i++) {
let name;
let imageurl;
let venue;
name = datosJSON[i].nombre_evento
imageurl = datosJSON[i].nombre_imagen;
venue = name;
items[i] = {
optionInfo: {
key: (i + 1).toString(),
synonyms: name,
},
description: "Imagen "+i,
title: name,
url: imageurl,
image: new Image({
url: imageurl,
alt: venue
}),
}
}
var carrusel = new Carousel({
title: 'Search Items ',
items: items
});
conv.ask(carrusel);
});
I expect in google assistant only one row wich i can scroll horizontally, but i have multiple rows with 2 items per row. 我希望在Google Assistant中只有一行可以水平滚动,但是我有多行,每行有2个项目。
轮播在智能显示器上水平显示,但在电话上使用2xN网格。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.