Skip to content

Commit

Permalink
fix(drop-down-menu-item): not all clicks are captured
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Jan 20, 2023
1 parent 429930a commit e452d60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/drop-down-menu-item.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<li v-if="show" class="dsq-drop-down-menu-item hover:bg-gray-300 p-4 font-medium group z-10 cursor-pointer">
<div class="flex flex-row items-center" @click.prevent="onClick">
<li v-if="show" class="dsq-drop-down-menu-item hover:bg-gray-300 p-4 font-medium group z-10 cursor-pointer" @click.prevent="onClick">
<div class="flex flex-row items-center">
<div class="flex items-center text-gray-500 group-hover:text-gray-900">
<slot />
</div>
Expand Down Expand Up @@ -28,6 +28,7 @@ const props = defineProps({
})
function onClick() {
console.log('onclick')
if (props.href) {
router.push({ path: props.href })
}
Expand Down

0 comments on commit e452d60

Please sign in to comment.