forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetters.ts
More file actions
34 lines (31 loc) · 738 Bytes
/
setters.ts
File metadata and controls
34 lines (31 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { getSetter, registerSetter, getSettersMap, RegisteredSetter } from '@alilc/lowcode-editor-core';
import { CustomView } from '@alilc/lowcode-types';
export default class Setters {
/**
* 获取指定 setter
* @param type
* @returns
*/
getSetter(type: string) {
return getSetter(type);
}
/**
* 获取已注册的所有 settersMap
* @returns
*/
getSettersMap() {
return getSettersMap();
}
/**
* 注册一个 setter
* @param typeOrMaps
* @param setter
* @returns
*/
registerSetter(
typeOrMaps: string | { [key: string]: CustomView | RegisteredSetter },
setter?: CustomView | RegisteredSetter | undefined,
) {
return registerSetter(typeOrMaps, setter);
}
}