mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 22:45:10 +00:00
38 lines
874 B
TypeScript
38 lines
874 B
TypeScript
|
import Mock from 'mockjs';
|
||
|
|
||
|
export async function getOptions(req: any, res: any) {
|
||
|
res.json({
|
||
|
data: {
|
||
|
name: 'grid1',
|
||
|
'x-component': 'GridBlock',
|
||
|
blocks: [
|
||
|
{
|
||
|
name: 'form1',
|
||
|
resource: {
|
||
|
resourceName: 'users',
|
||
|
resourceKey: 1,
|
||
|
},
|
||
|
fields: [
|
||
|
{
|
||
|
interface: 'string',
|
||
|
type: 'string',
|
||
|
title: `单行文本`,
|
||
|
name: 'username',
|
||
|
required: true,
|
||
|
component: {
|
||
|
type: 'string',
|
||
|
default: 'abcdefg',
|
||
|
'x-decorator': 'FormItem',
|
||
|
'x-component': 'Input',
|
||
|
'x-component-props': {
|
||
|
placeholder: 'please enter',
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
});
|
||
|
}
|