SmartFactoryCard.ets 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @Component
  2. export struct SmartFactoryCard{
  3. build(){
  4. Column(){
  5. Text('装配工位001')
  6. .fontSize(px2vp(27))
  7. .fontWeight(FontWeight.Medium)
  8. .opacity(0.6)
  9. .width('100%')
  10. .padding({left:10,top:10})
  11. .fontColor($r('app.color.start_window_background'))
  12. Blank()
  13. Row(){
  14. Column(){
  15. Text('16')
  16. .fontColor('#ffff')
  17. .textAlign(TextAlign.Center)
  18. .fontSize(px2vp(64))
  19. .fontWeight(FontWeight.Bold)
  20. Text('设备')
  21. .opacity(0.6)
  22. .fontColor('#FFFFFF')
  23. .textAlign(TextAlign.Center)
  24. .fontSize(px2vp(19))
  25. .fontWeight(FontWeight.Bold)
  26. }.height('100%')
  27. .width('20%')
  28. Divider().vertical(true)
  29. .color('#ffff')
  30. Column(){
  31. Text('8')
  32. .fontColor('#ffff')
  33. .textAlign(TextAlign.Center)
  34. .fontSize(px2vp(64))
  35. .fontWeight(FontWeight.Bold)
  36. Text('在线设备')
  37. .opacity(0.6)
  38. .fontColor('#FFFFFF')
  39. .textAlign(TextAlign.Center)
  40. .fontSize(px2vp(19))
  41. .fontWeight(FontWeight.Bold)
  42. }.height('100%')
  43. .width('20%')
  44. }.width('100%')
  45. .height('30%')
  46. }
  47. .padding(10)
  48. .width('100%')
  49. .height('90%')
  50. .margin({left:10})
  51. .borderRadius(15)
  52. .backgroundImage($r('app.media.smartFactoryCard'))
  53. .backgroundImageSize({width:'100%',height:'100%'})
  54. }
  55. }