From 70d33d14b1a5265473f3b5272891f16925825b72 Mon Sep 17 00:00:00 2001
From: gerson <1405270578@qq.com>
Date: 星期一, 28 十月 2024 21:45:47 +0800
Subject: [PATCH] 分组问题

---
 src/components/amis/AMISRenderer.vue |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/components/amis/AMISRenderer.vue b/src/components/amis/AMISRenderer.vue
index ff4199b..c49e02c 100644
--- a/src/components/amis/AMISRenderer.vue
+++ b/src/components/amis/AMISRenderer.vue
@@ -26,6 +26,10 @@
 		type: Object,
 		default: () => ({}),
 	},
+	context:{
+		type: Object,
+		default: () => ({}),
+	},
 	props: {
 		type: Object,
 		default: () => ({}),
@@ -67,9 +71,7 @@
 	});
 }
 
-const context = reactive({
-	siteName: 'AMIS DEMO',
-});
+
 const current = router.currentRoute.value;
 
 const location = {
@@ -86,9 +88,9 @@
 const updateProps = () => {
 	amisInstance.value?.updateProps({
 		data: {
-			...props.locals,
+			// ...props.locals,
 		},
-		context: context,
+		context: props.context,
 		...props.props,
 	});
 };
@@ -127,9 +129,9 @@
 		props.schema,
 		{
 			data: {
-				...props.locals,
+				// ...props.locals,
 			},
-			context: context,
+			context: props.context,
 			location: location,
 
 			// todo 涓嬪彂 location 瀵硅薄

--
Gitblit v1.9.3