Skip to content

Commit

Permalink
feat(VsSelect): add open, close interface (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
smithoo authored and yeriiiii committed Dec 19, 2024
1 parent ee96ccd commit 44caa79
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/vlossom/src/components/vs-select/VsSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export default defineComponent({
modelValue: { type: null, default: null },
},
emits: ['update:modelValue', 'update:changed', 'update:valid', 'change', 'focus', 'blur'],
// expose: ['clear', 'validate', 'focus', 'blur'],
// expose: ['clear', 'validate', 'focus', 'blur', 'open', 'close'],
setup(props, context) {
const {
colorScheme,
Expand Down Expand Up @@ -510,6 +510,14 @@ export default defineComponent({
toggleOptions();
}
function open() {
isOpen.value = true;
}
function close() {
isOpen.value = false;
}
return {
computedId,
classObj,
Expand Down Expand Up @@ -559,6 +567,8 @@ export default defineComponent({
onInput,
onComboboxKeydown,
onClickTrigger,
open,
close,
};
},
});
Expand Down

0 comments on commit 44caa79

Please sign in to comment.