From bd8bbc6154c22c59d8c10cb56a2390498cbe41e3 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Wed, 20 Dec 2023 14:59:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(editor):=20data-source-service=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=89=A9=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor/src/services/dataSource.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/editor/src/services/dataSource.ts b/packages/editor/src/services/dataSource.ts index 7d3a9b56f..045bc63b4 100644 --- a/packages/editor/src/services/dataSource.ts +++ b/packages/editor/src/services/dataSource.ts @@ -33,6 +33,23 @@ class DataSource extends BaseService { methods: {}, }); + constructor() { + super([ + { name: 'getFormConfig', isAsync: false }, + { name: 'setFormConfig', isAsync: false }, + { name: 'getFormValue', isAsync: false }, + { name: 'setFormValue', isAsync: false }, + { name: 'getFormEvent', isAsync: false }, + { name: 'setFormEvent', isAsync: false }, + { name: 'getFormMethod', isAsync: false }, + { name: 'setFormMethod', isAsync: false }, + { name: 'add', isAsync: false }, + { name: 'update', isAsync: false }, + { name: 'remove', isAsync: false }, + { name: 'createId', isAsync: false }, + ]); + } + public set(name: K, value: T) { this.state[name] = value; }