Skip to content

Commit

Permalink
feat(editor): data-source-service支持扩展
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Dec 20, 2023
1 parent e385ed5 commit bd8bbc6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/editor/src/services/dataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<K extends StateKey, T extends State[K]>(name: K, value: T) {
this.state[name] = value;
}
Expand Down

0 comments on commit bd8bbc6

Please sign in to comment.