Element-ui has its own navigation so that he can only click once.

< el-submenu > < / el-submenu > in the navigation bar, how do I get him to click without showing his children,

Apr.26,2022

judge a requirement that collapse


is difficult to understand. You can try the menu opening event open dynamically set the menu disabled property


you can try the open event to dynamically control the disabled property


<el-submenu index="1" :disabled="disabled">  
    <template slot="title">
      <i class="el-icon-location"></i>
      <span></span>
    </template>
    <el-menu-item-group>...</el-menu-item-group>
    ...
</el-submenu>       
// js
data() {
    return {
      disabled: false    // disabled
  }
},
methods: {
  handleOpen(key, keyPath) {
    console.log(key, keyPath);
    this.disabled = true   // disabled
  },
  handleClose(key, keyPath) {
    console.log(key, keyPath);
  }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b360d2-e531.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b360d2-e531.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?