1import { TaskFlow } from '../view/TaskFlow' 2import { TaskList } from '../view/TaskList' 3 4@Entry 5@Component 6struct Page02_TaskList { 7 build() { 8 RelativeContainer() { 9 Column() { 10 /** 11 * 第1个模块, 显示标题 12 */ 13 Text('你好,小王') 14 .fontSize(30) 15 .fontWeight(FontWeight.Bold) 16 .fontColor($r('app.color.title_color')) 17 18 Text('每天的工作,都拥有价值') 19 .fontSize(14) 20 .fontColor(Color.Gray) 21 .margin({ 22 top: 6 23 }) 24 25 Text('我的计划') 26 .fontSize(26) 27 .fontWeight(FontWeight.Bold) 28 .fontColor($r('app.color.title_color')) 29 .margin({ 30 top: 10 31 }) 32 33 // 第2个模块, 显示模块列表 34 TaskList() 35 36 // 第3个模块, 当天任务列表 37 Column() { 38 // 标题板块 39 Row() { 40 Text('今日任务') 41 .fontSize(26) 42 .fontWeight(FontWeight.Bold) 43 .fontColor($r('app.color.title_color')) 44 Text('查看更多') 45 .fontSize(14) 46 .fontColor($r('app.color.title_color')) 47 } 48 .width('100%') 49 .justifyContent(FlexAlign.SpaceBetween) 50 .alignItems(VerticalAlign.Bottom) 51 } 52 .width('100%') 53 .margin({ 54 top: 10 55 }) 56 57 // 第3个模块, 任务进度列表 58 Scroll() { 59 Column({ 60 space: 10 61 }) { 62 TaskFlow() 63 TaskFlow() 64 TaskFlow() 65 TaskFlow() 66 TaskFlow() 67 } 68 } 69 .height(250) 70 .width('100%') 71 .margin({ 72 top: 10, 73 bottom: 10 74 }) 75 .edgeEffect(EdgeEffect.Fade) 76 .scrollable(ScrollDirection.Vertical) 77 .scrollBar(BarState.Off) 78 } 79 .height('100%') 80 .width('100%') 81 .backgroundColor('#f1f3f5') 82 .alignItems(HorizontalAlign.Start) 83 .padding(6) 84 85 Stack({ 86 alignContent: Alignment.Center 87 }) { 88 Image($r('app.media.square')) 89 .width(28) 90 Image($r('app.media.square')) 91 .width(28) 92 } 93 .alignRules({ 94 right: { 95 anchor: '__container__', align: HorizontalAlign.End 96 }, 97 bottom: { 98 anchor: '__container__', align: VerticalAlign.Bottom 99 } 100 }) 101 .offset({ 102 x: -30, 103 y: -80 104 }) 105 } 106 } 107}
Copyright ©2010-2022 比特日记 All Rights Reserved.
Powered By 可尔物语