From bfd6b4201c3d42744d9b75373c2da68f2b2608de Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期一, 04 十一月 2024 16:26:28 +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