diff --git a/src/components/Checkbox/index.vue b/src/components/Checkbox/index.vue index 8a945233..37c14964 100644 --- a/src/components/Checkbox/index.vue +++ b/src/components/Checkbox/index.vue @@ -1,7 +1,13 @@ @@ -62,6 +67,10 @@ const props = defineProps({ type: Boolean, default: false, }, + readonly: { + type: Boolean, + default: false, + }, }); const emit = defineEmits(['update:modelValue', 'change']); diff --git a/src/components/Select/index.vue b/src/components/Select/index.vue index 2a3ad146..938a7e1b 100644 --- a/src/components/Select/index.vue +++ b/src/components/Select/index.vue @@ -171,6 +171,9 @@ onClickOutside(elementRef, (event) => { }); function openDropdown(event) { + if (props.readonly || props.disabled) { + return; + } open.value = true; sortOptionsBySelected(); nextTick(() => { @@ -339,6 +342,7 @@ function deselectAll() { :class="[condensed ? 'pl-2' : 'pl-3']" >