<template>
	<!--导航菜单组件 递归显示-->
	<el-submenu :index="parIndex | toString">
		<template slot="title">
			{{ title }}
		</template>
		<template v-for="(item, s_Index) in subData">
			<el-menu-item v-if="!item.childs" :index="item.entity.path" :key="[parIndex,s_Index] | lj">{{ item.entity.title }}</el-menu-item>
			<my-sub-menu v-if="item.childs" :subData="item.childs" :parIndex="[parIndex,s_Index] | lj" :title="item.entity.title" :key="[parIndex,s_Index+'1'] | lj"></my-sub-menu>
		</template>
	</el-submenu>
</template>

<script>
export default {
	name: 'mySubMenu',
	props: ['subData', 'parIndex', 'title'],
	data() {
		return {};
	},
	filters: {
	  toString:(value) =>{
	    return value+'';
	  },
	  lj:([v,n])=>{
		  return v+"-"+n;
	  }
	},
	methods: {}
};
</script>

<style></style>
