Class Carousel
Băng chuyền
Băng chuyền (còn gọi là thanh trượt) xoay và hiển thị danh sách các tiện ích ở định dạng trình chiếu, với các nút điều hướng đến tiện ích trước hoặc tiếp theo.
Có sẵn cho các tiện ích bổ sung của Google Workspace và ứng dụng Google Chat.
const carousel =
CardService.newCarousel()
.addCarouselCard(CardService.newCarouselCard().addWidget(
CardService.newTextParagraph().setText('The first text paragraph in carousel')))
.addCarouselCard(CardService.newCarouselCard().addWidget(
CardService.newTextParagraph().setText('The second text paragraph in carousel')))
.addCarouselCard(CardService.newCarouselCard().addWidget(
CardService.newTextParagraph().setText('The third text paragraph in carousel')))
Tài liệu chi tiết
addCarouselCard(card)
Thêm thẻ băng chuyền.
const carousel =
CardService.newCarousel()
.addCarouselCard(CardService.newCarouselCard().addWidget(
CardService.newTextParagraph().setText('The first text paragraph in carousel')));
Thông số
Cầu thủ trả bóng
Carousel
– Đối tượng này, để tạo chuỗi.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-01-30 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-01-30 UTC."],[[["Carousel, also known as a slider, displays widgets in a rotating slideshow format with navigation buttons."],["Carousels are available for use in Google Workspace add-ons and Google Chat apps."],["The `addCarouselCard(card)` method is used to add a carousel card to the carousel, and it returns the Carousel object for chaining."],["Carousels are currently part of the Google Workspace Developer Preview Program, providing early access to this feature."]]],["Carousel, or slider, displays widgets in a slideshow format, navigable via buttons. It's available for Google Workspace add-ons and Google Chat apps. Developers use `CardService.newCarousel()` to create it. `addCarouselCard(card)` method adds individual cards, such as text paragraphs, to the carousel. Each card can be created using `CardService.newCarouselCard()`. This method returns the Carousel object, allowing for chaining of card additions. This is available in the Google Workspace Developer Preview Program.\n"]]