WIP Изменен baseOptions

This commit is contained in:
Daria Golova
2022-12-29 12:24:46 +03:00
parent 9fc796c9d7
commit c664f11bfb
3 changed files with 19 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
.flex.flex-col.gap-y-2
.label.font-semibold.text-xxs.opacity-40(v-if="label") {{ label }}
.base-select.flex.justify-between.items-center.py-9px.px-4.gap-4.cursor-pointer.relative(
ref="select",
@click="open = !open",
:class="{'open': open, 'border-none': borderNone}",
)
@@ -16,7 +17,8 @@
)
.items-container.mt-1(
@click="closeOptions",
v-click-outside="leaveSelect"
v-click-outside="leaveSelect",
:class="textClass"
)
.item.py-2.px-4.cursor-pointer(
v-for="item in items",
@@ -43,6 +45,7 @@ export default {
placeholderOpacity: Boolean,
center: Boolean,
label: String,
textStyle: String,
},
emits: ["update:modelValue"],
data() {
@@ -59,6 +62,15 @@ export default {
this.$emit("update:modelValue", value);
},
},
textClass() {
return this.textStyle
? {
[this.textStyle]: true,
}
: {
"text-base": true,
};
},
},
methods: {
clickItem(id, label) {