1. Dynamic acquisition of Menu Submenu and MenuItem, results set open-names has no effect, the data is fixed.
2. Code
<Menu theme="dark" :open-names="open" @on-select="toSelect" ref="leftMenu">
<Submenu :name="key+1" class="test" v-for="(item,key) in list[0].children" :key="key">
<template slot="title">
<img src="../../assets/images/fundIcon.png" class="fundIcon"/>
{{item.title}}
</template>
<MenuItem :name="items.id" :to="items.url" :key="index" v-for="
(items,index) in item.children">
{{items.title}
</MenuItem>
</Submenu>
</Menu>
export default {
name: "fund",
data(){
return{
list: [],
open: [],
}
},
mounted(){
this.open = ["1"];
this.$nextTick(()=> {
this.$refs.leftMenu.updateOpened();
});
},
3. active-name
has no problem and can be highlighted. I have seen the relevant problems, and there is no effect. The problem is a little urgent. I would appreciate it if I have time to help take a look.