Files
baserow/web-frontend/modules/builder/components/page/settings/PageSettingsPathParamsFormElement.vue
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00

61 lines
1.5 KiB
Vue

<template>
<FormGroup small-label :label="$t('pageForm.pathParamsTitle')" required>
<div
v-for="pathParam in pathParams"
:key="pathParam.name"
class="page-settings-path-params"
>
<span class="page-settings-path-params__name">{{ pathParam.name }}</span>
<div class="page-settings-path-params__dropdown">
<Dropdown
:value="pathParam.type"
:disabled="disabled"
@input="$emit('update', pathParam.name, $event)"
>
<DropdownItem
v-for="pathParamType in pathParamTypes"
:key="pathParamType.getType()"
:name="pathParamType.name"
:value="pathParamType.getType()"
></DropdownItem>
</Dropdown>
</div>
</div>
<template #helper>
<template v-if="Object.keys(pathParams).length > 0">
{{ $t('pageForm.pathParamsSubtitle') }}
</template>
<template v-else>
{{ $t('pageForm.pathParamsSubtitleTutorial') }}
</template>
</template>
</FormGroup>
</template>
<script>
import form from '@baserow/modules/core/mixins/form'
export default {
name: 'PageSettingsPathParamsFormElement',
mixins: [form],
props: {
pathParams: {
type: Array,
required: false,
default: () => [],
},
disabled: {
type: Boolean,
required: false,
default: false,
},
},
emits: ['update'],
computed: {
pathParamTypes() {
return this.$registry.getOrderedList('pathParamType')
},
},
}
</script>