From cab8c9ad15c262462bb9a01a5a491d310390bf02 Mon Sep 17 00:00:00 2001
From: xingyuv <xingyu4j@vip.qq.com>
Date: Tue, 7 Mar 2023 10:29:27 +0800
Subject: [PATCH] fix: search warn

---
 src/components/Search/src/Search.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/Search/src/Search.vue b/src/components/Search/src/Search.vue
index a8ae601b..80f2b37c 100644
--- a/src/components/Search/src/Search.vue
+++ b/src/components/Search/src/Search.vue
@@ -9,8 +9,6 @@ import { FormSchema } from '@/types/form'
 
 const { t } = useI18n()
 
-const slots = useSlots()
-
 const props = defineProps({
   // 生成Form的布局结构数组
   schema: {
@@ -125,7 +123,9 @@ const setVisible = () => {
         </ElButton>
       </div>
     </template>
-    <template v-for="(slot, name) in slots" #[name]><slot :name="name"></slot></template>
+    <template #[name] v-for="name in Object.keys($slots)" :key="name"
+      ><slot :name="name"></slot
+    ></template>
   </Form>
 
   <template v-if="layout === 'bottom'">