WIP Сделана выборка по полисам
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template lang="pug">
|
||||
.container.flex.flex-col.gap-y-2
|
||||
.label.font-semibold.text-smm(v-if="radioButtonsLabel") {{ radioButtonsLabel }}
|
||||
.group.flex.gap-x-4.text-base(:class="{'flex-col gap-y-1': direction === 'col'}")
|
||||
.group.flex.text-base(:class="radioGroupClasses")
|
||||
.option(v-for="item in items")
|
||||
input.mr-2(
|
||||
type="radio",
|
||||
@@ -23,10 +23,9 @@ export default {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
direction: {
|
||||
type: String,
|
||||
default: "row",
|
||||
},
|
||||
directionColumn: Boolean,
|
||||
columnGap: String,
|
||||
rowGap: String,
|
||||
},
|
||||
computed: {
|
||||
value: {
|
||||
@@ -37,6 +36,26 @@ export default {
|
||||
this.$emit("update:modelValue", value);
|
||||
},
|
||||
},
|
||||
radioGroupClasses() {
|
||||
if (this.directionColumn) {
|
||||
return this.columnGap
|
||||
? {
|
||||
"flex-col": true,
|
||||
[this.columnGap]: true,
|
||||
}
|
||||
: {
|
||||
"flex-col": true,
|
||||
"gap-y-1": true,
|
||||
};
|
||||
}
|
||||
if (this.rowGap)
|
||||
return {
|
||||
[this.rowGap]: true,
|
||||
};
|
||||
return {
|
||||
"gap-x-4": true,
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user