From d2a9b131168a1b78180c67433be6a21742e0230d Mon Sep 17 00:00:00 2001 From: wutong25 Date: Wed, 15 Nov 2023 17:19:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=8C=E9=A1=B5=E9=9D=A2=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E3=80=8DPage=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=BB=84=E4=BB=B6=E9=9D=99=E6=80=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-editor/src/plugin/Page.tsx | 8 +------- packages/amis-editor/src/tpl/common.tsx | 13 +++++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/amis-editor/src/plugin/Page.tsx b/packages/amis-editor/src/plugin/Page.tsx index 9e79300b7..58ef51106 100644 --- a/packages/amis-editor/src/plugin/Page.tsx +++ b/packages/amis-editor/src/plugin/Page.tsx @@ -228,13 +228,7 @@ export class PagePlugin extends BasePlugin { { title: '数据', body: [ - // page组件下掉组件静态数据配置项,可通过页面变量来定义页面中的变量 - // getSchemaTpl('combo-container', { - // type: 'input-kv', - // mode: 'normal', - // name: 'data', - // label: '组件静态数据' - // }), + getSchemaTpl('pageData'), getSchemaTpl('apiControl', { name: 'initApi', mode: 'row', diff --git a/packages/amis-editor/src/tpl/common.tsx b/packages/amis-editor/src/tpl/common.tsx index 79761ac6a..0f99363e7 100644 --- a/packages/amis-editor/src/tpl/common.tsx +++ b/packages/amis-editor/src/tpl/common.tsx @@ -768,6 +768,19 @@ setSchemaTpl('combo-container', (config: SchemaObject) => { return config; }); +/** + * Page组件静态数据 + */ +setSchemaTpl( + 'pageData', + getSchemaTpl('combo-container', { + type: 'input-kv', + mode: 'normal', + name: 'data', + label: '组件静态数据' + }) +); + /** * 所有组件的状态 */