Explorar el Código

修改MenuItem菜单组件每级节点都快触发点击事件;

画安 hace 1 mes
padre
commit
e4098739e0
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      src/components/ui/MenuItem.vue

+ 2 - 3
src/components/ui/MenuItem.vue

@@ -73,9 +73,8 @@ export default {
     handleClick() {
       if (this.hasChildren) {
         this.isOpen = !this.isOpen;
-      } else {
-        this.$emit('node-click', this.node);
-      }
+      } 
+      this.$emit('node-click', this.node);
     },
     passEventUp(nodeData) {
       this.$emit('node-click', nodeData);