<template>
	<view>
		<!-- 菜单 -->
		<u-subsection
			:list="['我的通知', '通告管理']"
			mode="button"
			:fontSize="16"
			:current="tabIndex"
			@change="tabSelect"
		></u-subsection>
		<my-notify-list  v-show="tabIndex === 0"></my-notify-list>
		<oa-notify-list  v-show="tabIndex === 1"></oa-notify-list>

	</view>
</template>

<script>
	import myNotifyList from "./myNotifyList.vue"
	import oaNotifyList from "./oaNotifyList.vue"
	export default {
		components: {
			myNotifyList,
			oaNotifyList
		},
		onLoad(tab) {		
			if(tab&&tab.tabIndex){
				this.tabIndex = parseInt(tab.tabIndex)
			}
		},
		data() {
			return {
				tabIndex: 0
			}
		},
		methods:{
			tabSelect(index) {
				this.tabIndex = index;
			}
		}
	}
</script>
