taskCard.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view>
  3. <!--导航栏-->
  4. <view @tap="closeFrame">
  5. <cu-custom bgColor="bg-gradual-sisBlack" :isBack="true">
  6. <block slot="backText"><view style="height: 80rpx;line-height: 80rpx;color: silver;">返回</view></block>
  7. <block slot="content"><view style="color: silver;">任务详情</view></block>
  8. </cu-custom>
  9. </view>
  10. <!-- 导航栏 -->
  11. <scroll-view scroll-x class=" nav navigationBar">
  12. <view class="flex text-center">
  13. <view class="cu-item flex-sub" :class="index == TabCur ? 'text-orange cur' : ''" v-for="(item, index) in nameList" :key="index" @tap="tabSelect" :data-id="index">
  14. {{ item }}
  15. </view>
  16. </view>
  17. </scroll-view>
  18. <!-- 任务卡片 -->
  19. <view v-if="TabCur == 0">
  20. <view class="cu-card dynamic">
  21. <view class="cu-item shadow">
  22. <view class="cu-item">
  23. <view class="content flex-sub"><view class="text-gray text-sm flex justify-end">2019年12月3日</view></view>
  24. </view>
  25. <view class="text-content">未完成</view>
  26. </view>
  27. </view>
  28. <view class="cu-card dynamic">
  29. <view class="cu-item shadow">
  30. <view class="cu-item">
  31. <view class="content flex-sub"><view class="text-gray text-sm flex justify-end">2019年12月3日</view></view>
  32. </view>
  33. <view class="text-content">未完成</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view v-if="TabCur == 1">
  38. <view class="cu-card dynamic">
  39. <view class="cu-item shadow">
  40. <view class="cu-item">
  41. <view class="content flex-sub"><view class="text-gray text-sm flex justify-end">2019年12月3日</view></view>
  42. </view>
  43. <view class="text-content">已完成</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view v-if="TabCur == 2">
  48. <view class="cu-card dynamic">
  49. <view class="cu-item shadow">
  50. <view class="cu-item">
  51. <view class="content flex-sub"><view class="text-gray text-sm flex justify-end">2019年12月3日</view></view>
  52. </view>
  53. <view class="text-content">分配我的</view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. nameList: ['未完成', '已完成', '分配我的'],
  64. TabCur: 0,
  65. scrollLeft: 0
  66. };
  67. },
  68. methods: {
  69. closeFrame: function() {
  70. this.count = this.count + 1;
  71. if (this.isFrameShow) {
  72. this.isFrameShow = false;
  73. this.sanJiao = 'sanJiaoDown';
  74. }
  75. },
  76. tabSelect(e) {
  77. this.TabCur = e.currentTarget.dataset.id;
  78. this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
  79. }
  80. }
  81. };
  82. </script>
  83. <style>
  84. body {
  85. font-family: '方正兰亭细黑_GBK';
  86. font-size: 20px;
  87. color: silver;
  88. background: #fff;
  89. }
  90. @font-face {
  91. font-family: '方正兰亭细黑_GBK';
  92. src: url(../../../static/fzltxh.TTF);
  93. }
  94. page {
  95. background-color: #1f1f1f;
  96. font-family: '方正兰亭细黑_GBK';
  97. overflow-x: hidden;
  98. }
  99. .top {
  100. width: 100%;
  101. height: 130upx;
  102. padding-top: 5upx;
  103. background-color: #1f1f1f;
  104. position: fixed;
  105. top: 0px;
  106. left: 0px;
  107. z-index: 100;
  108. }
  109. .navigationBar{
  110. margin-left: 5%;
  111. width: 90%;
  112. background-color: #242424;
  113. color: white;
  114. }
  115. .navigationBar{
  116. color: #B7B6B7;
  117. }
  118. </style>