From e44a8800c2f86451e97732d2656529633b79d27c Mon Sep 17 00:00:00 2001 From: tengsonglin Date: Mon, 10 Oct 2022 14:42:55 +0800 Subject: [PATCH] add viewing file list Signed-off-by: tengsonglin --- entry/src/main/ets/Item/FilesItem.ets | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 entry/src/main/ets/Item/FilesItem.ets diff --git a/entry/src/main/ets/Item/FilesItem.ets b/entry/src/main/ets/Item/FilesItem.ets new file mode 100644 index 0000000..84ac642 --- /dev/null +++ b/entry/src/main/ets/Item/FilesItem.ets @@ -0,0 +1,39 @@ + +@Entry +@Component +export struct FilesItem { + private filesImage: string | Resource + private filesText: string + private fileTime: string + private fileNumber: string + + build() { + Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start }) { + Flex({ justifyContent: FlexAlign.Start }) { + Image(this.filesImage) + .width(50) + .height(50) + } + .width(60) + .margin({right:8}) + + Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Start }) { + Text(this.filesText) + .fontSize(18) + Text(this.fileTime) + .fontSize(12) + .fontColor('#ffa9a9a9') + }.padding({ top: 5 }) + .width(150) + + Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start }) { + Text(this.fileNumber) + .fontSize(12) + .fontColor('#ffa9a9a9') + } + .padding({ left: 30, top: 25 }) + .width(100) + }.height(60) + .margin({left: 10,top: 10}) + } +} \ No newline at end of file -- Gitee