From cccd0531ae0014c82a2049e88c759e0b9de0965e Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 19 十一月 2024 16:37:23 +0800
Subject: [PATCH] 角色必填

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

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

--
Gitblit v1.9.3