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>
|
||||||
|
|
||||||
<tabContent v-for="plugin in plugins" :key="plugin.id" :id="plugin.id" :requireConnection="plugin.requiresConnection" :currentTab="currentTab">
|
<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>
|
</tabContent>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -79,6 +79,9 @@ export default {
|
||||||
id: 'test-plugin',
|
id: 'test-plugin',
|
||||||
icon: 'code',
|
icon: 'code',
|
||||||
requireConnection: false,
|
requireConnection: false,
|
||||||
|
forms: [
|
||||||
|
{
|
||||||
|
route: "/test/foo",
|
||||||
schema: [
|
schema: [
|
||||||
{
|
{
|
||||||
fieldType: "htmlBlock",
|
fieldType: "htmlBlock",
|
||||||
|
|
@ -96,8 +99,7 @@ export default {
|
||||||
fieldType: "textInput",
|
fieldType: "textInput",
|
||||||
placeholder: "Name",
|
placeholder: "Name",
|
||||||
label: "Name",
|
label: "Name",
|
||||||
name: "name",
|
name: "name"
|
||||||
value: "Squidward"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldType: "numberInput",
|
fieldType: "numberInput",
|
||||||
|
|
@ -124,19 +126,20 @@ export default {
|
||||||
fieldType: "radioList",
|
fieldType: "radioList",
|
||||||
name: "coolness",
|
name: "coolness",
|
||||||
label: "Coolness",
|
label: "Coolness",
|
||||||
options: ["None", "Some", "Very"],
|
options: ["None", "Some", "Very"]
|
||||||
value: "Some"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldType: "checkList",
|
fieldType: "checkList",
|
||||||
name: "ingredients",
|
name: "ingredients",
|
||||||
label: "Ingredients",
|
label: "Ingredients",
|
||||||
options: ["Pork", "Pie"],
|
options: ["Pork", "Pie"]
|
||||||
value: ["Pork"]
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue