fix: 横向导航栏模式下 children 无法自动隐藏

This commit is contained in:
就眠儀式
2022-02-24 17:56:05 +08:00
parent 9726687879
commit 18990ef594
6 changed files with 71 additions and 54 deletions

View File

@@ -5,8 +5,8 @@ export default {
</script>
<script setup lang="ts">
import { provide, ref, watch } from "vue"
import { onClickOutside } from "@vueuse/core"
import { provide, ref, watch } from "vue";
import { onClickOutside } from "@vueuse/core";
export interface LayDropdownProps {
trigger?: string;
@@ -19,8 +19,8 @@ const props = withDefaults(defineProps<LayDropdownProps>(), {
});
onClickOutside(dropdownRef, (event) => {
openState.value = false;
})
openState.value = false;
});
const openState = ref(false);