任务

组件1-任务看板

  1@Component   2export struct TaskList {   3 build() {   4 /**   5 * 第2个模块, 显示计划列表   6 */   7 Row() {   8 Column() {   9 Column({  10 space: 12  11 }) {  12 Image($r('app.media.startIcon'))  13 .width(28)  14 Text('已完成')  15 .fontWeight(FontWeight.Bold)  16 .fontSize(18)  17 .fontColor($r('app.color.title_color'))  18 Text('0任务')  19 .fontSize(18)  20 .fontWeight(FontWeight.Bold)  21 }  22 .height(164)  23 .width(168)  24 .backgroundColor('#8ff8f8')  25 .alignItems(HorizontalAlign.Center)  26 .justifyContent(FlexAlign.Center)  27 .borderRadius({  28 topLeft: 10  29 })  30  31 Column({  32 space: 12  33 }) {  34 Image($r('app.media.startIcon'))  35 .width(28)  36 Text('等待中')  37 .fontWeight(FontWeight.Bold)  38 .fontSize(18)  39 .fontColor($r('app.color.title_color'))  40 Text('0任务')  41 .fontSize(18)  42 .fontWeight(FontWeight.Bold)  43 }  44 .height(128)  45 .width(168)  46 .backgroundColor('#2ff8f8')  47 .alignItems(HorizontalAlign.Center)  48 .justifyContent(FlexAlign.Center)  49 .borderRadius({  50 bottomLeft: 10  51 })  52 .margin({  53 top: 2  54 })  55 }  56 .width('50%')  57 .height('100%')  58  59 Column() {  60 Column({  61 space: 12  62 }) {  63 Image($r('app.media.startIcon'))  64 .width(28)  65 Text('未完成')  66 .fontWeight(FontWeight.Bold)  67 .fontSize(18)  68 .fontColor($r('app.color.title_color'))  69 Text('0任务')  70 .fontSize(18)  71 .fontWeight(FontWeight.Bold)  72 }  73 .height(128)  74 .width(168)  75 .backgroundColor('#22f8f8')  76 .alignItems(HorizontalAlign.Center)  77 .justifyContent(FlexAlign.Center)  78 .borderRadius({  79 topRight: 10  80 })  81  82 Column({  83 space: 12  84 }) {  85 Image($r('app.media.startIcon'))  86 .width(28)  87 Text('计划中')  88 .fontWeight(FontWeight.Bold)  89 .fontSize(18)  90 .fontColor($r('app.color.title_color'))  91 Text('0任务')  92 .fontSize(18)  93 .fontWeight(FontWeight.Bold)  94 }  95 .height(164)  96 .width(168)  97 .backgroundColor('#8ff8f8')  98 .alignItems(HorizontalAlign.Center)  99 .justifyContent(FlexAlign.Center) 100 .borderRadius({ 101 bottomRight: 10 102 }) 103 .margin({ 104 top: 2 105 }) 106 } 107 .width('50%') 108 .height('100%') 109 } 110 .width('100%') 111 .height(302) 112 } 113}
@Component export struct TaskList { build() { /** * 第2个模块, 显示计划列表 */ Row() { Column() { Column({ space: 12 }) { Image($r('app.media.startIcon')) .width(28) Text('已完成') .fontWeight(FontWeight.Bold) .fontSize(18) .fontColor($r('app.color.title_color')) Text('0任务') .fontSize(18) .fontWeight(FontWeight.Bold) } .height(164) .width(168) .backgroundColor('#8ff8f8') .alignItems(HorizontalAlign.Center) .justifyContent(FlexAlign.Center) .borderRadius({ topLeft: 10 }) Column({ space: 12 }) { Image($r('app.media.startIcon')) .width(28) Text('等待中') .fontWeight(FontWeight.Bold) .fontSize(18) .fontColor($r('app.color.title_color')) Text('0任务') .fontSize(18) .fontWeight(FontWeight.Bold) } .height(128) .width(168) .backgroundColor('#2ff8f8') .alignItems(HorizontalAlign.Center) .justifyContent(FlexAlign.Center) .borderRadius({ bottomLeft: 10 }) .margin({ top: 2 }) } .width('50%') .height('100%') Column() { Column({ space: 12 }) { Image($r('app.media.startIcon')) .width(28) Text('未完成') .fontWeight(FontWeight.Bold) .fontSize(18) .fontColor($r('app.color.title_color')) Text('0任务') .fontSize(18) .fontWeight(FontWeight.Bold) } .height(128) .width(168) .backgroundColor('#22f8f8') .alignItems(HorizontalAlign.Center) .justifyContent(FlexAlign.Center) .borderRadius({ topRight: 10 }) Column({ space: 12 }) { Image($r('app.media.startIcon')) .width(28) Text('计划中') .fontWeight(FontWeight.Bold) .fontSize(18) .fontColor($r('app.color.title_color')) Text('0任务') .fontSize(18) .fontWeight(FontWeight.Bold) } .height(164) .width(168) .backgroundColor('#8ff8f8') .alignItems(HorizontalAlign.Center) .justifyContent(FlexAlign.Center) .borderRadius({ bottomRight: 10 }) .margin({ top: 2 }) } .width('50%') .height('100%') } .width('100%') .height(302) } }

组件2-任务列表

 1@Component  2export struct TaskFlow {  3 build() {  4 Column({  5 space: 10  6 }) {  7 Row() {  8 Image($r('app.media.startIcon'))  9 .width(28) 10 Text('完成HarmonyOS第一阶段项目') 11 .fontSize(18) 12 .fontWeight(FontWeight.Bold) 13 .fontColor($r('app.color.title_color')) 14 .margin({ 15 left: 10 16 }) 17 } 18 .width('100%') 19 20 Text('9:00-12:00') 21 .fontWeight(FontWeight.Bold) 22 .fontColor(Color.Gray) 23 24 Row() { 25 Text('生活') 26 .fontColor(Color.White) 27 } 28 .width(100) 29 .height(30) 30 .backgroundColor(Color.Brown) 31 .borderRadius(10) 32 .justifyContent(FlexAlign.Center) 33 } 34 .width('100%') 35 .height(120) 36 .backgroundColor(Color.White) 37 .borderRadius(10) 38 .alignItems(HorizontalAlign.Start) 39 .padding(10) 40 .margin({ 41 top: 10 42 }) 43 } 44}
@Component export struct TaskFlow { build() { Column({ space: 10 }) { Row() { Image($r('app.media.startIcon')) .width(28) Text('完成HarmonyOS第一阶段项目') .fontSize(18) .fontWeight(FontWeight.Bold) .fontColor($r('app.color.title_color')) .margin({ left: 10 }) } .width('100%') Text('9:00-12:00') .fontWeight(FontWeight.Bold) .fontColor(Color.Gray) Row() { Text('生活') .fontColor(Color.White) } .width(100) .height(30) .backgroundColor(Color.Brown) .borderRadius(10) .justifyContent(FlexAlign.Center) } .width('100%') .height(120) .backgroundColor(Color.White) .borderRadius(10) .alignItems(HorizontalAlign.Start) .padding(10) .margin({ top: 10 }) } }

Powered By 可尔物语

浙ICP备11005866号-12