index.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <addressbook v-if="PageCur=='addressbook'"></addressbook>
  4. <!-- <message v-if="PageCur=='message'"></message> -->
  5. <workbench v-if="PageCur=='workbench'"></workbench>
  6. <!-- <apps v-if="PageCur=='apps'"></apps> -->
  7. <person v-if="PageCur=='my'"></person>
  8. <view class="cu-bar tabbar bg-white shadow foot">
  9. <view class="action" @click="NavChange" data-cur="addressbook">
  10. <view :class="PageCur=='addressbook'?'text-blue':'text-gray'">
  11. <text class="lg" :class="PageCur=='addressbook'?'cuIcon-addressbook':'cuIcon-addressbook'"></text>
  12. <text>通讯录</text>
  13. </view>
  14. </view>
  15. <!-- <view class="action" @click="NavChange" data-cur="message">
  16. <view :class="PageCur=='message'?'text-blue':'text-gray'">
  17. <text class="lg" :class="PageCur=='message'?'cuIcon-messagefill':'cuIcon-message'">
  18. <text class='cu-tag badge'>0</text>
  19. </text>
  20. <text>消息</text>
  21. </view>
  22. </view> -->
  23. <view class="action text-gray add-action" @click="NavChange" data-cur="workbench">
  24. <button class="cu-btn shadow" :class="PageCur=='workbench'?'cuIcon-homefill bg-blue':'cuIcon-home bg-grey'"></button>
  25. 工作台
  26. </view>
  27. <!--
  28. <view class="action" @click="NavChange" data-cur="apps">
  29. <view :class="PageCur=='apps'?'text-blue':'text-gray'">
  30. <text class="lg" :class="PageCur=='apps'?'cuIcon-circlefill':'cuIcon-circle'"></text>
  31. <text>应用</text>
  32. </view>
  33. </view> -->
  34. <view class="action" @click="NavChange" data-cur="my">
  35. <view :class="PageCur=='my'?'text-blue':'text-gray'">
  36. <text class="lg" :class="PageCur=='my'?'cuIcon-profilefill':'cuIcon-profile'"></text>
  37. <text>我的</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import addressbook from '@/pages/addressbook/addressbook.vue'
  45. import person from '@/pages/user/person/person.vue'
  46. import message from '@/pages/message/message.vue'
  47. import workbench from '@/pages/workbench/workbench.vue'
  48. import apps from '@/pages/apps/apps.vue'
  49. export default {
  50. components:{
  51. person,
  52. message,
  53. workbench,
  54. apps,
  55. addressbook
  56. },
  57. data() {
  58. return {
  59. PageCur: 'workbench'
  60. }
  61. },
  62. methods: {
  63. NavChange: function(e) {
  64. this.PageCur = e.currentTarget.dataset.cur
  65. }
  66. }
  67. }
  68. </script>
  69. <style>
  70. .cu-tag.badge {
  71. right: 4px;
  72. }
  73. </style>