import QtQuick import Felgo import "common" AppPage { title: "主界面" AppFlickable { id: scroll anchors.fill: parent contentHeight: content.height MouseArea { anchors.fill: parent onClicked: { scroll.forceActiveFocus() } } Column { id: content width: parent.width Section { title: "Convenience Controls" SectionItem { title: "AppCard" anchors.horizontalCenter: parent.horizontalCenter AppCard { id: card width: dp(300) property real resetX: parent.width/2 - width/2 x: resetX margin: dp(15) swipeEnabled: true cardSwipeArea.rotationFactor: 0.02 cardSwipeArea.swipeOutThreshold: dp(180) cardSwipeArea.swipeOutDuration: 500 paper.radius: dp(5) header: SimpleRow { imageSource: Qt.resolvedUrl("../../assets/architecture-1477041_960_720.jpg") text: "Title" detailText: "AppCard detailed text" image.radius: image.width / 2 image.fillMode: Image.PreserveAspectCrop style: StyleSimpleRow { showDisclosure: false backgroundColor: "transparent" } } media: AppImage { width: parent.width fillMode: Image.PreserveAspectFit source: Qt.resolvedUrl("../../assets/architecture-1477041_960_720.jpg") } content: AppText{ width: parent.width padding: dp(15) text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." } actions: Row { IconButton { iconType: IconType.thumbsup } IconButton { iconType: IconType.sharealt } AppButton { text: "Follow" flat: true } } cardSwipeArea.onSwipeOutCompleted: { card.x = card.resetX card.y = 0 card.rotation = 0 } } } // AppCard section // SwipeView section } // convenience controls section } } }