From 3694ad80c78042099d1249eb1a67f4f53cb80056 Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Tue, 24 Apr 2018 22:52:16 +0800 Subject: [PATCH] fix: menu click bug --- components/menu/index.jsx | 3 +++ site/routes.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/menu/index.jsx b/components/menu/index.jsx index 3082862f2..4b316619d 100644 --- a/components/menu/index.jsx +++ b/components/menu/index.jsx @@ -231,6 +231,9 @@ export default { menuProps.on.click = this.handleClick menuProps.props.openTransitionName = menuOpenAnimation } else { + menuProps.on.click = (e) => { + this.$emit('click', e) + } menuProps.props.openAnimation = menuOpenAnimation } diff --git a/site/routes.js b/site/routes.js index 01ce5bd01..6aa0a45f2 100644 --- a/site/routes.js +++ b/site/routes.js @@ -4,7 +4,7 @@ import Iframe from './components/iframe.vue' const AsyncTestComp = () => { const d = window.location.hash.replace('#', '') return { - component: import(`../components/layout/demo/${d}`), + component: import(`../components/menu/demo/${d}`), } }