mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 17:48:13 +00:00
feat: 🎸 按照中后台搭建协议规范文档补充 JSFunction 的定义和数据源定义中一些字段
This commit is contained in:
parent
9e325250df
commit
8b1d0c76f3
@ -1,16 +1,32 @@
|
||||
import { CompositeValue } from './value-type';
|
||||
import { CompositeValue, JSExpression, JSFunction, JSONObject } from './value-type';
|
||||
|
||||
/**
|
||||
* 数据源对象
|
||||
* @see https://yuque.antfin-inc.com/mo/spec/spec-low-code-building-schema#XMeF5
|
||||
*/
|
||||
export interface DataSourceConfig {
|
||||
id: string;
|
||||
isInit: boolean;
|
||||
isInit: boolean | JSExpression;
|
||||
type: string;
|
||||
requestHandler?: JSFunction;
|
||||
dataHandler?: JSFunction;
|
||||
options: {
|
||||
uri: string;
|
||||
uri: string | JSExpression;
|
||||
params?: JSONObject | JSExpression;
|
||||
method?: string | JSExpression;
|
||||
isCors?: boolean | JSExpression;
|
||||
timeout?: number | JSExpression;
|
||||
headers?: JSONObject | JSExpression;
|
||||
[option: string]: CompositeValue;
|
||||
};
|
||||
[otherKey: string]: CompositeValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据源对象
|
||||
* @see https://yuque.antfin-inc.com/mo/spec/spec-low-code-building-schema#XMeF5
|
||||
*/
|
||||
export interface DataSource {
|
||||
items: DataSourceConfig[];
|
||||
list: DataSourceConfig[];
|
||||
dataHandler?: JSFunction;
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ export interface JSONObject {
|
||||
}
|
||||
|
||||
// 复合类型
|
||||
export type CompositeValue = JSONValue | JSExpression | JSSlot | CompositeArray | CompositeObject;
|
||||
export type CompositeValue = JSONValue | JSExpression | JSFunction | JSSlot | CompositeArray | CompositeObject;
|
||||
export type CompositeArray = CompositeValue[];
|
||||
export interface CompositeObject {
|
||||
[key: string]: CompositeValue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user