diff --git a/entry/src/main/ets/Item/VideoItem.ets b/entry/src/main/ets/Item/VideoItem.ets new file mode 100644 index 0000000000000000000000000000000000000000..445a5df40251e6d210048ef1fddc46baeaafa4af --- /dev/null +++ b/entry/src/main/ets/Item/VideoItem.ets @@ -0,0 +1,28 @@ +@Entry +@Component +export struct VideoItem{ + @State videoName : string = '' + @State videoTime : string = '' + public src : string | Resource + @State Change : boolean = true + build(){ + Column() { + Stack(){ + Video({src:this.src}) + .width(200) + .height(300) + Image($r('app.media.ic_play')).width(30).height(30).objectFit(ImageFit.Contain) + } + .width('100%') + + Text(this.videoName) + .fontSize(16) + .fontColor('#BCBCBC') + .fontWeight(FontWeight.Regular) + Text(this.videoTime) + .fontSize(16) + .fontColor('#BCBCBC') + .fontWeight(FontWeight.Regular) + } + } +} \ No newline at end of file diff --git a/entry/src/main/ets/Item/VoiceItem.ets b/entry/src/main/ets/Item/VoiceItem.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5c12d50debe9322c57c75a7267b83a8c7e2dbfd --- /dev/null +++ b/entry/src/main/ets/Item/VoiceItem.ets @@ -0,0 +1,38 @@ + +@Entry +@Component +export struct VoiceItem{ + private voiceImage: string | Resource = $r('app.media.r_c') + private voiceText: string + private voiceTime: string + private voiceNumber: string + build(){ + Flex({direction : FlexDirection.Row,justifyContent: FlexAlign.Start}){ + Flex({justifyContent: FlexAlign.Start}){ + Image(this.voiceImage) + .width(50) + .height(50) + } + .width(60) + Flex({direction : FlexDirection.Column,justifyContent: FlexAlign.Start}){ + Text(this.voiceText) + .fontSize(18) + Text(this.voiceTime) + .fontSize(12) + .fontColor('#ffa9a9a9') + } + .padding({top:5}) + .width(300) + Flex({direction:FlexDirection.Row,justifyContent : FlexAlign.Start}) { + Text(this.voiceNumber) + .fontSize(14) + .fontColor('#ffa9a9a9') + } + .padding({left: 30,top : 15}) + .width(100) + } .height(60) + .margin({left: 10,top:10}) + + + } +} \ No newline at end of file