【PT.SCC实名制管理系统】24.10.01 -30天,考勤打卡小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.2 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="">
  3. <view class="tabbar-box"></view>
  4. <view class="tabbar">
  5. <view
  6. :class="{item : true, active : select == index}"
  7. v-for="(item, index) in list"
  8. :key="index"
  9. @click="toPath(item, index)">
  10. <view class="icon">
  11. <image :src="select == index ?
  12. item.selectedIconPath :
  13. item.iconPath" class="icon-image" mode=""></image>
  14. </view>
  15. <view class="title">
  16. {{ item.title }}
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import { mapGetters } from 'vuex'
  24. export default {
  25. name:"tabbar",
  26. props : ['select'],
  27. data() {
  28. return {
  29. list : [
  30. {
  31. "selectedIconPath": "https://tennis-oss.xzaiyp.top/2024-10-22/5cc4afa9-e951-4503-95c8-c0332a8f5db9.png",
  32. "iconPath": "https://tennis-oss.xzaiyp.top/2024-10-22/9caa43b2-8389-4945-8b71-9b49bca2d634.png",
  33. "pagePath": "/pages/index/index",
  34. "title": "打卡"
  35. },
  36. {
  37. "selectedIconPath": "https://tennis-oss.xzaiyp.top/2024-10-22/62bc1e85-24b3-4f72-a31d-4caad77590e9.png",
  38. "iconPath": "https://tennis-oss.xzaiyp.top/2024-10-22/6b9c937e-487c-4552-8140-dad098d7f16e.png",
  39. "pagePath": "/pages/index/center",
  40. "title": "我的"
  41. }
  42. ]
  43. };
  44. },
  45. methods : {
  46. toPath(item, index){
  47. if(index == this.select){
  48. return
  49. }
  50. uni.reLaunch({
  51. url: item.pagePath
  52. })
  53. },
  54. }
  55. }
  56. </script>
  57. <style scoped lang="scss">
  58. .tabbar-box{
  59. height: 120rpx;
  60. // padding-bottom: env(safe-area-inset-bottom);
  61. }
  62. .tabbar{
  63. position: fixed;
  64. width: 750rpx;
  65. background-color: #fff;
  66. display: flex;
  67. justify-content: center;
  68. align-items: center;
  69. flex-direction: row;
  70. height: 120rpx;
  71. // padding-bottom: env(safe-area-inset-bottom);
  72. // padding: 10rpx 0rpx;
  73. z-index: 9999;
  74. bottom: 0;
  75. left: 0;
  76. color: #BCBCBC;
  77. border-top: 1px solid #ccc;
  78. .item{
  79. flex: 1;
  80. display: flex;
  81. flex-direction: column;
  82. justify-content: center;
  83. align-items: center;
  84. .icon{
  85. width: 60rpx;
  86. height: 60rpx;
  87. .icon-image{
  88. width: 60rpx;
  89. height: 60rpx;
  90. }
  91. }
  92. .title{
  93. overflow: hidden;
  94. white-space: nowrap;
  95. text-overflow: ellipsis;
  96. -o-text-overflow: ellipsis;
  97. font-size: 23rpx;
  98. line-height: 35rpx;
  99. }
  100. }
  101. }
  102. .active{
  103. color: $main-color;
  104. }
  105. </style>