mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 18:58:11 +00:00
34 lines
729 B
TypeScript
34 lines
729 B
TypeScript
import { RuntimeDataSource } from '@ali/lowcode-types';
|
|
|
|
// 这里仅仅是数据源部分的:
|
|
// @see: https://yuque.antfin-inc.com/mo/spec/spec-low-code-building-schema#XMeF5
|
|
export const dataSource: RuntimeDataSource = {
|
|
list: [
|
|
{
|
|
id: 'user',
|
|
isInit: true,
|
|
type: 'fetch',
|
|
isSync: true,
|
|
options() {
|
|
return {
|
|
uri: 'https://mocks.alibaba-inc.com/user.json',
|
|
};
|
|
},
|
|
},
|
|
{
|
|
id: 'orders',
|
|
isInit: true,
|
|
type: 'fetch',
|
|
isSync: true,
|
|
options() {
|
|
return {
|
|
uri: 'https://mocks.alibaba-inc.com/orders.json',
|
|
params: {
|
|
userId: this.state.user.id,
|
|
},
|
|
};
|
|
},
|
|
},
|
|
],
|
|
};
|