Implemented tab count limit validation

This commit is contained in:
2023-11-30 08:50:31 +01:00
parent 5ac6fb65fb
commit e91ee99f99
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ const props = defineProps(
{
stylizedName: {type: String, required: true},
data: {type: Array<TabData>},
tabCountLimit: {type: Number, required: false}
tabCountLimit: {type: Number, required: false, validator: (value) => typeof value == "number" && value > 0}
}
)
const emit = defineEmits(['update:modelValue'])

View File

@@ -22,7 +22,7 @@ function updateVersion(newVersion: string) {
<div id="layout" class="flex flex-row w-full h-full">
<div class="flex flex-col 2xl:flex-row w-full xl:w-7/12 grow overflow-hide pr-2">
<div class="flex flex-col w-full 2xl:w-1/2 h-2/3 2xl:h-full flex-none items-center">
<xmlTabbedInputComponent stylized-name="XML" :tab-count-limit="3" v-model="xml"></xmlTabbedInputComponent>
<xmlTabbedInputComponent stylized-name="XML" :tab-count-limit="1" v-model="xml"></xmlTabbedInputComponent>
<xmlInputFieldComponent stylized-name="XSLT" :data="query" v-model="query"></xmlInputFieldComponent>
</div>
<xmlOutputFieldComponent tool="xslt" :xml="xml" :query="query" @update="updateVersion"></xmlOutputFieldComponent>