task_ima_tab.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view class="task-tab">
  3. <scroll-view class="scroll-Y row" scroll-x="true">
  4. <view class="row-justify-sb center">
  5. <view class="column-c tab-item p-lr30 p-t20" v-for="(item,index) in navList" :key="index"
  6. @click="setType(index)">
  7. <image class="wh-60 r-circle" :class="index===current?'double-border':''" :src="item.icon" mode="">
  8. </image>
  9. <view class="m-t16 sys-size-24 text-center sys-weight-600"
  10. :class="{'default-text':index===current}">
  11. {{item.name}}
  12. </view>
  13. </view>
  14. </view>
  15. </scroll-view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. current: 0,
  23. navList: [{
  24. name: '全部',
  25. icon: '/static/img/task/task-all.png'
  26. }, {
  27. name: '资产/征信',
  28. icon: '/static/img/task/task-repayment.png'
  29. }, {
  30. name: '跟进记录',
  31. icon: '/static/img/task/task-business.png'
  32. }, {
  33. name: '审核进度',
  34. icon: '/static/img/task/task-money.png'
  35. }, ]
  36. }
  37. },
  38. methods: {
  39. setType(current) {
  40. if (current !== this.current) {
  41. this.current = current
  42. }
  43. },
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .task-tab {
  49. width: calc(100% - 40rpx);
  50. margin: 0 20rpx;
  51. padding: 20rpx;
  52. border-radius: 30rpx;
  53. background: #fff;
  54. }
  55. .default-text {
  56. color: #10B261;
  57. }
  58. .tab-item::after {
  59. // content: '';
  60. // position: absolute;
  61. // width: 0;
  62. // height: 0;
  63. // border-left: 10px solid transparent;
  64. // border-right: 10px solid transparent;
  65. // border-top: 10px solid black;
  66. }
  67. .double-border {
  68. box-shadow: 0 0 0 6rpx #fff, 0 0 0 12rpx #10B261;
  69. }
  70. </style>