notification.vue 746 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view>
  3. <!-- 菜单 -->
  4. <u-subsection
  5. :list="['我的通知', '通告管理']"
  6. mode="button"
  7. :fontSize="16"
  8. :current="tabIndex"
  9. @change="tabSelect"
  10. ></u-subsection>
  11. <my-notify-list v-show="tabIndex === 0"></my-notify-list>
  12. <oa-notify-list v-show="tabIndex === 1"></oa-notify-list>
  13. </view>
  14. </template>
  15. <script>
  16. import myNotifyList from "./myNotifyList.vue"
  17. import oaNotifyList from "./oaNotifyList.vue"
  18. export default {
  19. components: {
  20. myNotifyList,
  21. oaNotifyList
  22. },
  23. onLoad(tab) {
  24. if(tab&&tab.tabIndex){
  25. this.tabIndex = parseInt(tab.tabIndex)
  26. }
  27. },
  28. data() {
  29. return {
  30. tabIndex: 0
  31. }
  32. },
  33. methods:{
  34. tabSelect(index) {
  35. this.tabIndex = index;
  36. }
  37. }
  38. }
  39. </script>