mirror of
https://github.com/zhigang1992/react-jsonschema-form.git
synced 2026-05-20 04:11:32 +08:00
63 lines
1.4 KiB
JavaScript
63 lines
1.4 KiB
JavaScript
module.exports = {
|
|
schema: {
|
|
title: "A list of tasks",
|
|
type: "object",
|
|
required: ["title"],
|
|
properties: {
|
|
title: {
|
|
type: "string",
|
|
title: "Task list title"
|
|
},
|
|
tasks: {
|
|
type: "array",
|
|
items: {
|
|
type: "object",
|
|
title: "Task",
|
|
required: ["title"],
|
|
properties: {
|
|
title: {
|
|
type: "string",
|
|
title: "Title",
|
|
description: "A sample title"
|
|
},
|
|
details: {
|
|
type: "string",
|
|
title: "Task details",
|
|
description: "Enter the task details"
|
|
},
|
|
done: {
|
|
type: "boolean",
|
|
title: "Done?",
|
|
default: false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
uiSchema: {
|
|
tasks: {
|
|
items: {
|
|
details: {
|
|
widget: "textarea"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
formData: {
|
|
title: "My current tasks",
|
|
tasks: [
|
|
{
|
|
title: "My first task",
|
|
details: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
done: true
|
|
},
|
|
{
|
|
title: "My second task",
|
|
details: "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur",
|
|
done: false
|
|
}
|
|
]
|
|
}
|
|
};
|