uni-top.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="bottonBox">
  3. <view>
  4. <uni-icons type="wallet" size="20" color="#606266" class="iconMargin"></uni-icons>{{title}}
  5. </view>
  6. <view class="ksMain">
  7. <view class="boxStyle">
  8. <view class="fontColor">
  9. {{joinStuNum}}
  10. </view>
  11. <view class="fontStyle">
  12. {{joinStuNumTitle}}
  13. </view>
  14. </view>
  15. <view class="boxStyle">
  16. <view class="fontColor">
  17. {{myRanking}}
  18. </view>
  19. <view class="fontStyle">
  20. {{myRankingTitle}}
  21. </view>
  22. </view>
  23. <view class="boxStyle">
  24. <view class="fontColor">
  25. {{myScore}}
  26. </view>
  27. <view class="fontStyle">
  28. {{myScoreTitle}}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. name: 'UniTop',
  37. props: {
  38. joinStuNum: {
  39. type: String,
  40. default: '0'
  41. },
  42. joinStuNumTitle: {
  43. type: String,
  44. default: '参入人数'
  45. },
  46. myRanking: {
  47. type: String,
  48. default: '0'
  49. },
  50. myRankingTitle: {
  51. type: String,
  52. default: '我的排名'
  53. },
  54. myScore:{
  55. type: String,
  56. default: '0'
  57. },
  58. myScoreTitle:{
  59. type: String,
  60. default: '0'
  61. },
  62. title: {
  63. type: String,
  64. default: '我的分数'
  65. },
  66. },
  67. data() {
  68. return {}
  69. },
  70. methods: {
  71. }
  72. }
  73. </script>
  74. <style scoped>
  75. .bottonBox {
  76. border-radius: 10rpx;
  77. background-color: #FFFFFF;
  78. position: absolute;
  79. bottom: 20rpx;
  80. padding: 20rpx;
  81. display: flex;
  82. flex-direction: column;
  83. left: 50%;
  84. transform: translateX(-50%);
  85. width: 87%;
  86. box-shadow: 0 0 20rpx rgba(0, 0, 0, .1);
  87. }
  88. .ksMain {
  89. display: flex;
  90. }
  91. .boxStyle {
  92. text-align: center;
  93. margin-top: 10rpx;
  94. flex: 1;
  95. }
  96. .fontColor {
  97. color: rgb(245, 166, 35);
  98. font-size: 28rpx;
  99. margin-bottom: 10rpx;
  100. }
  101. </style>