diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 4c2aef065..96028862a 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -26,7 +26,7 @@ const value = computed({ emit('update:modelValue', value); }, }); -const focus = ref(false); +const hover = ref(false); const styleAttrs = computed(() => { return $props.isOutlined ? { @@ -45,6 +45,10 @@ const handleValue = (val = null) => { value.value = val; }; +const focus = () => { + vnInputRef.value.focus(); +}; + defineExpose({ focus, }); @@ -52,8 +56,8 @@ defineExpose({