From 8a62bf90f59d18a268832c87e61c0994ee1f2c6e Mon Sep 17 00:00:00 2001
From: Lhcfl <Lhcfl@outlook.com>
Date: Sun, 14 Apr 2024 03:42:30 +0800
Subject: [PATCH] fix: MkMenu.vue

---
 packages/client/src/components/MkMenu.vue | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/packages/client/src/components/MkMenu.vue b/packages/client/src/components/MkMenu.vue
index e92305d8f3..1391024264 100644
--- a/packages/client/src/components/MkMenu.vue
+++ b/packages/client/src/components/MkMenu.vue
@@ -202,12 +202,12 @@
 
 <script lang="ts" setup>
 import {
+	type Ref,
 	defineAsyncComponent,
 	onBeforeUnmount,
 	onMounted,
 	ref,
 	watch,
-	shallowRef,
 } from "vue";
 import { FocusTrap } from "focus-trap-vue";
 import FormSwitch from "@/components/form/switch.vue";
@@ -242,7 +242,12 @@ const emit = defineEmits<{
 
 const itemsEl = ref<HTMLDivElement>();
 
-const items2 = shallowRef<InnerMenuItem[]>([]);
+/**
+ * Strictly speaking, this type conversion is wrong
+ * because `ref` will deeply unpack the `ref` in `MenuSwitch`.  
+ * But it performs correctly, so who cares?
+ */
+const items2 = ref([]) as Ref<InnerMenuItem[]>;
 
 const child = ref<InstanceType<typeof XChild>>();