diff --git a/src/components/base/BaseSelect.vue b/src/components/base/BaseSelect.vue index 9b78e71..6b06f4d 100644 --- a/src/components/base/BaseSelect.vue +++ b/src/components/base/BaseSelect.vue @@ -14,7 +14,8 @@ dense, :behavior="behavior", emit-value, - map-options + map-options, + :clearable="clearable" ) template(v-slot:selected) span(v-if="!value?.icon") {{ textSelect }} @@ -76,13 +77,9 @@ export default { label: String, readonly: Boolean, width: String, + clearable: Boolean, }, emits: ["update:modelValue"], - data() { - return { - open: false, - }; - }, computed: { value: { get() { @@ -93,6 +90,7 @@ export default { }, }, textSelect() { + if (typeof this.modelValue === "string") return this.value; return this.value?.label ? this.value.label : this.placeholder; }, iconSelect() { @@ -102,6 +100,8 @@ export default { };