mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-16 11:54:27 +00:00
39 lines
866 B
TypeScript
39 lines
866 B
TypeScript
import { InterpretDataSource } from '@ali/lowcode-types';
|
|
|
|
// 这里仅仅是数据源部分的 schema:
|
|
// @see: https://yuque.antfin-inc.com/mo/spec/spec-low-code-building-schema#XMeF5
|
|
export const DATA_SOURCE_SCHEMA: InterpretDataSource = {
|
|
list: [
|
|
{
|
|
id: 'user',
|
|
isInit: true,
|
|
type: 'fetch',
|
|
isSync: true,
|
|
options: {
|
|
uri: 'https://mocks.alibaba-inc.com/user.json',
|
|
},
|
|
},
|
|
{
|
|
id: 'orders',
|
|
isInit: true,
|
|
type: 'fetch',
|
|
isSync: true,
|
|
shouldFetch: {
|
|
type: 'JSFunction',
|
|
value: `
|
|
function (){
|
|
return false;
|
|
}
|
|
`,
|
|
},
|
|
options: {
|
|
uri: 'https://mocks.alibaba-inc.com/orders.json',
|
|
params: {
|
|
type: 'JSExpression',
|
|
value: '{ userId: this.state.user.id }',
|
|
},
|
|
},
|
|
},
|
|
],
|
|
};
|