index.vue 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. <Am-FontAwesome :class="PageCur=='addressbook'?'fas fa-address-book':'far fa-address-book'" class="cuIcon-calendar" ></Am-FontAwesome>
  13. <text>通讯录</text>
  14. </view>
  15. </view>
  16. <view class="action" @click="NavChange" data-cur="message">
  17. <view :class="PageCur=='message'?'text-blue':'text-gray'">
  18. <text class="lg" :class="PageCur=='message'?'cuIcon-messagefill':'cuIcon-message'">
  19. <text class='cu-tag badge'>0</text>
  20. </text>
  21. <text>消息</text>
  22. </view>
  23. </view>
  24. <!-- <view class="action" @click="NavChange" data-cur="workbench">
  25. <view :class="PageCur=='workbench'?'text-green':'text-gray'">
  26. <text class="lg" :class="PageCur=='workbench'?'cuIcon-choicenessfill':'cuIcon-choiceness'"></text>
  27. <text>工作区</text>
  28. </view>
  29. </view> -->
  30. <view class="action text-gray add-action" @click="NavChange" data-cur="workbench">
  31. <button class="cu-btn shadow" :class="PageCur=='workbench'?'cuIcon-homefill bg-blue':'cuIcon-home bg-grey'"></button>
  32. 工作台
  33. </view>
  34. <view class="action" @click="NavChange" data-cur="apps">
  35. <view :class="PageCur=='apps'?'text-blue':'text-gray'">
  36. <text class="lg" :class="PageCur=='apps'?'cuIcon-circlefill':'cuIcon-circle'"></text>
  37. <text>应用</text>
  38. </view>
  39. </view>
  40. <view class="action" @click="NavChange" data-cur="my">
  41. <view :class="PageCur=='my'?'text-blue':'text-gray'">
  42. <text class="lg" :class="PageCur=='my'?'cuIcon-profilefill':'cuIcon-profile'"></text>
  43. <text>我的</text>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import addressbook from '@/pages/addressbook/addressbook.vue'
  51. import person from '@/pages/user/person/person.vue'
  52. import message from '@/pages/message/message.vue'
  53. import workbench from '@/pages/workbench/workbench.vue'
  54. import apps from '@/pages/apps/apps.vue'
  55. export default {
  56. onShow(option) {
  57. this.$auth.checkLogin()
  58. },
  59. components:{
  60. person,
  61. message,
  62. workbench,
  63. apps,
  64. addressbook
  65. },
  66. data() {
  67. return {
  68. PageCur: 'workbench'
  69. }
  70. },
  71. methods: {
  72. NavChange: function(e) {
  73. this.PageCur = e.currentTarget.dataset.cur
  74. }
  75. }
  76. }
  77. </script>
  78. <style>
  79. .cu-tag.badge {
  80. right: 4px;
  81. }
  82. </style>