Skip to content

Commit

Permalink
fix(drawer): 修复drawer在路由切换后不会自动关闭问题
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Aug 6, 2020
1 parent 59c343f commit 9ba5169
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/drawer/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@
}
);
watch(
() => root.$route,
() => {
if (unref(visibleRef)) {
visibleRef.value = false;
}
}
);
// 取消事件
async function onClose(e) {
const { closeFunc } = unref(getProps);
Expand Down

0 comments on commit 9ba5169

Please sign in to comment.