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,62 +79,65 @@ export default {
|
||||||
id: 'test-plugin',
|
id: 'test-plugin',
|
||||||
icon: 'code',
|
icon: 'code',
|
||||||
requireConnection: false,
|
requireConnection: false,
|
||||||
schema: [
|
forms: [
|
||||||
{
|
{
|
||||||
fieldType: "htmlBlock",
|
route: "/test/foo",
|
||||||
name: "heading",
|
schema: [
|
||||||
content: "<b>This is a cool plugin!</b>"
|
{
|
||||||
},
|
fieldType: "htmlBlock",
|
||||||
{
|
name: "heading",
|
||||||
fieldType: "selectList",
|
content: "<b>This is a cool plugin!</b>"
|
||||||
name: "title",
|
},
|
||||||
multi: false,
|
{
|
||||||
label: "Title",
|
fieldType: "selectList",
|
||||||
options: ["", "Mr", "Ms", "Mx", "Dr", "Madam", "Lord"]
|
name: "title",
|
||||||
},
|
multi: false,
|
||||||
{
|
label: "Title",
|
||||||
fieldType: "textInput",
|
options: ["", "Mr", "Ms", "Mx", "Dr", "Madam", "Lord"]
|
||||||
placeholder: "Name",
|
},
|
||||||
label: "Name",
|
{
|
||||||
name: "name",
|
fieldType: "textInput",
|
||||||
value: "Squidward"
|
placeholder: "Name",
|
||||||
},
|
label: "Name",
|
||||||
{
|
name: "name"
|
||||||
fieldType: "numberInput",
|
},
|
||||||
placeholder: "Age",
|
{
|
||||||
name: "age",
|
fieldType: "numberInput",
|
||||||
label: "Age",
|
placeholder: "Age",
|
||||||
minValue: 0
|
name: "age",
|
||||||
},
|
label: "Age",
|
||||||
[
|
minValue: 0
|
||||||
{
|
},
|
||||||
fieldType: "numberInput",
|
[
|
||||||
placeholder: "Number",
|
{
|
||||||
name: "leftnum",
|
fieldType: "numberInput",
|
||||||
label: "Left"
|
placeholder: "Number",
|
||||||
},
|
name: "leftnum",
|
||||||
{
|
label: "Left"
|
||||||
fieldType: "numberInput",
|
},
|
||||||
placeholder: "Number",
|
{
|
||||||
name: "rightnum",
|
fieldType: "numberInput",
|
||||||
label: "Right"
|
placeholder: "Number",
|
||||||
}
|
name: "rightnum",
|
||||||
],
|
label: "Right"
|
||||||
{
|
}
|
||||||
fieldType: "radioList",
|
],
|
||||||
name: "coolness",
|
{
|
||||||
label: "Coolness",
|
fieldType: "radioList",
|
||||||
options: ["None", "Some", "Very"],
|
name: "coolness",
|
||||||
value: "Some"
|
label: "Coolness",
|
||||||
},
|
options: ["None", "Some", "Very"]
|
||||||
{
|
},
|
||||||
fieldType: "checkList",
|
{
|
||||||
name: "ingredients",
|
fieldType: "checkList",
|
||||||
label: "Ingredients",
|
name: "ingredients",
|
||||||
options: ["Pork", "Pie"],
|
label: "Ingredients",
|
||||||
value: ["Pork"]
|
options: ["Pork", "Pie"]
|
||||||
},
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue