点击看效果
vue_elementUI
GIF动图演示 已压缩至459KB,点击查看
处于三级菜单页面刷新浏览器仍然保持高亮状态。
HTML
<script> //引入封装好的 import menus from './treeMenu/treeMenu'; import menuu from './treeMenu/threeMenu'; export default { data () { return { menu: [], defaultProps: { children: 'children', label: 'text' }, dialogVisible: false, activeIndex: 0, childIndex: 0, }, components:{ menus, menuu }, mounted () { this.activeIndex = this.checkRoute(this.$route.name); }, methods: { }, } </script>
CSS
不写了不写直接上demo,已安装依赖包直接 npm run dev运行
点击下载