fix: fix some problem

This commit is contained in:
xiaoxian521
2021-04-09 10:19:04 +08:00
parent 1eed20ebce
commit e414d3cce9
9 changed files with 52 additions and 53 deletions

View File

@@ -19,6 +19,7 @@
<script lang='ts'>
import { addClass, removeClass } from "../../../utils/operate";
import { ref, watch, getCurrentInstance, onMounted, onBeforeMount } from "vue";
import { useEventListener } from "@vueuse/core";
export default {
name: "panel",
setup() {
@@ -40,7 +41,7 @@ export default {
);
const addEventClick = (): void => {
window.addEventListener("click", closeSidebar);
useEventListener("click", closeSidebar);
};
const closeSidebar = (evt: any): void => {