Allow multiple forms per plugin
This commit is contained in:
parent
0fad5304f8
commit
ff0fe49976
1 changed files with 58 additions and 55 deletions
|
|
@ -29,7 +29,7 @@
|
|||
</tabContent>
|
||||
|
||||
<tabContent v-for="plugin in plugins" :key="plugin.id" :id="plugin.id" :requireConnection="plugin.requiresConnection" :currentTab="currentTab">
|
||||
<JsonForm :schema="plugin.schema"/>
|
||||
<JsonForm v-for="form in plugin.forms" :key="form.route" :route="form.route" :schema="form.schema"/>
|
||||
</tabContent>
|
||||
|
||||
</div>
|
||||
|
|
@ -79,6 +79,9 @@ export default {
|
|||
id: 'test-plugin',
|
||||
icon: 'code',
|
||||
requireConnection: false,
|
||||
forms: [
|
||||
{
|
||||
route: "/test/foo",
|
||||
schema: [
|
||||
{
|
||||
fieldType: "htmlBlock",
|
||||
|
|
@ -96,8 +99,7 @@ export default {
|
|||
fieldType: "textInput",
|
||||
placeholder: "Name",
|
||||
label: "Name",
|
||||
name: "name",
|
||||
value: "Squidward"
|
||||
name: "name"
|
||||
},
|
||||
{
|
||||
fieldType: "numberInput",
|
||||
|
|
@ -124,19 +126,20 @@ export default {
|
|||
fieldType: "radioList",
|
||||
name: "coolness",
|
||||
label: "Coolness",
|
||||
options: ["None", "Some", "Very"],
|
||||
value: "Some"
|
||||
options: ["None", "Some", "Very"]
|
||||
},
|
||||
{
|
||||
fieldType: "checkList",
|
||||
name: "ingredients",
|
||||
label: "Ingredients",
|
||||
options: ["Pork", "Pie"],
|
||||
value: ["Pork"]
|
||||
options: ["Pork", "Pie"]
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue