diff --git a/example/T_Carousel.qml b/example/T_Carousel.qml index a2df607..43f8d5c 100644 --- a/example/T_Carousel.qml +++ b/example/T_Carousel.qml @@ -10,13 +10,35 @@ FluScrollablePage{ title:"Carousel" + FluArea{ + width: parent.width + height: 370 + paddings: 10 + Layout.topMargin: 20 - FluCarousel{ - id:carousel + Column{ + spacing: 15 + anchors{ + verticalCenter: parent.verticalCenter + left:parent.left + } + FluText{ - Component.onCompleted: { - carousel.setData([{color:"#000000"},{color:"#FFFFFF"},{color:"#666666"}]) + text:"轮播图,支持无限轮播,无限滑动,用ListView实现的组件" + } + FluCarousel{ + id:carousel + Layout.topMargin: 20 + Layout.leftMargin: 5 + Component.onCompleted: { + carousel.setData([{url:"qrc:/res/image/banner_1.jpg"},{url:"qrc:/res/image/banner_2.jpg"},{url:"qrc:/res/image/banner_3.jpg"}]) + } + + } } - } + + + + } diff --git a/example/page/MainPage.qml b/example/page/MainPage.qml index f379438..9c7ddf0 100644 --- a/example/page/MainPage.qml +++ b/example/page/MainPage.qml @@ -19,7 +19,6 @@ FluWindow { title: "FluentUI" } - FluObject{ id:original_items diff --git a/example/qml.qrc b/example/qml.qrc index bec7fae..13c83eb 100644 --- a/example/qml.qrc +++ b/example/qml.qrc @@ -35,5 +35,8 @@ T_MultiWindow.qml T_Menu.qml T_Carousel.qml + res/image/banner_1.jpg + res/image/banner_2.jpg + res/image/banner_3.jpg diff --git a/example/res/image/banner_1.jpg b/example/res/image/banner_1.jpg new file mode 100644 index 0000000..87151d1 Binary files /dev/null and b/example/res/image/banner_1.jpg differ diff --git a/example/res/image/banner_2.jpg b/example/res/image/banner_2.jpg new file mode 100644 index 0000000..6714b25 Binary files /dev/null and b/example/res/image/banner_2.jpg differ diff --git a/example/res/image/banner_3.jpg b/example/res/image/banner_3.jpg new file mode 100644 index 0000000..a5df5c8 Binary files /dev/null and b/example/res/image/banner_3.jpg differ