my.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="container">
  3. <!-- 每一个选项 -->
  4. <view class="box" v-for="item in list" :key="item.id" @click="handleClick(item)">
  5. <view class="icon">
  6. <img :src="item.icon">
  7. </view>
  8. <view class="title">
  9. {{item.title}}
  10. </view>
  11. <view class="right">
  12. <img src="../../static/right.png">
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. list: [{
  22. id: 1,
  23. icon: "../../static/my1.png",
  24. title: "规则设置",
  25. url: "/pages/ruleSet/ruleSet"
  26. },
  27. {
  28. id: 2,
  29. icon: "../../static/my2.png",
  30. title: "权限设置",
  31. url: "/pages/powerSet/powerSet"
  32. },
  33. {
  34. id: 3,
  35. icon: "../../static/my3.png",
  36. title: "打卡记录",
  37. url: "/pages/cardRecord/cardRecord"
  38. },
  39. {
  40. id: 4,
  41. icon: "../../static/my4.png",
  42. title: "考勤组",
  43. url: "/pages/group/group"
  44. },
  45. ]
  46. };
  47. },
  48. methods: {
  49. handleClick(item) {
  50. // console.log(item.url);
  51. uni.navigateTo({
  52. url: item.url
  53. })
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .container {
  60. padding-top: 30rpx;
  61. .box {
  62. display: flex;
  63. width: 750rpx;
  64. height: 110rpx;
  65. line-height: 110rpx;
  66. background-color: #fff;
  67. .icon {
  68. flex: 1;
  69. text-align: center;
  70. img {
  71. margin-top: 36rpx;
  72. width: 42rpx;
  73. height: 38rpx;
  74. }
  75. }
  76. .title {
  77. flex: 5;
  78. font-size: 30rpx;
  79. font-weight: 400;
  80. }
  81. .right {
  82. flex: 1;
  83. text-align: center;
  84. img {
  85. width: 24rpx;
  86. height: 32rpx;
  87. }
  88. }
  89. }
  90. }
  91. </style>