2020-07-27 18:22:34 +02:00
|
|
|
<template>
|
|
|
|
<b-input-group>
|
|
|
|
<b-input
|
2020-08-03 19:32:53 +02:00
|
|
|
:id="id" :placeholder="placeholder"
|
|
|
|
:state="state" :aria-describedby="feedbackId"
|
2020-08-04 16:06:44 +02:00
|
|
|
v-model="value[0]" @update="$emit('input', value)"
|
2020-07-27 18:22:34 +02:00
|
|
|
/>
|
|
|
|
|
|
|
|
<b-input-group-append>
|
2020-08-03 19:32:53 +02:00
|
|
|
<b-input-group-text>{{ separator }}</b-input-group-text>
|
2020-07-27 18:22:34 +02:00
|
|
|
</b-input-group-append>
|
|
|
|
|
|
|
|
<b-input-group-append>
|
2020-08-04 16:06:44 +02:00
|
|
|
<b-select
|
|
|
|
v-model="value[1]" :options="options" @change="$emit('input', value)"
|
|
|
|
/>
|
2020-07-27 18:22:34 +02:00
|
|
|
</b-input-group-append>
|
|
|
|
</b-input-group>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2020-08-03 19:32:53 +02:00
|
|
|
name: 'AdressInputSelect',
|
2020-07-27 18:22:34 +02:00
|
|
|
props: {
|
2020-08-04 16:06:44 +02:00
|
|
|
// `value` is actually passed thru the `v-model` directive
|
|
|
|
value: { type: Array, required: true },
|
2020-08-03 19:32:53 +02:00
|
|
|
options: { type: Array, required: true },
|
|
|
|
separator: { type: String, default: '@' },
|
|
|
|
placeholder: { type: String, default: null },
|
2020-07-27 18:22:34 +02:00
|
|
|
id: { type: String, default: null },
|
|
|
|
state: { type: null, default: null },
|
2020-08-04 16:06:44 +02:00
|
|
|
feedbackId: { type: String, default: null }
|
2020-07-27 18:22:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2020-08-07 19:04:22 +02:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.input-group-append ~ .input-group-append {
|
|
|
|
min-width: 40%;
|
|
|
|
}
|
|
|
|
select {
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
}
|
|
|
|
</style>
|