<el-menu :router='true' :default-active = currentMenu>
	<public-left :navMenu = 'navMenu'></public-left>
</el-menu>
data部分:
data () {
	return {
		currentMenu: 'servePersonView'
	}
},
script部分:
methods: {
	getUrl () {
		let currentUrl = window.location.href;
		this.currentMenu = currentUrl.split('#')[1].split('/')[2];
	}
},
created () {
	this.getUrl();
}
Logo

前往低代码交流专区

更多推荐