const apple = ref('');
cosnt validate = (inputRef) => {
// inputRef - не значение, а ref
}
<template>
<input type="text" @input="() => validate(apple)" />
</template>
<script setup>
import { ref } from 'vue';
const apple = ref('');
const validate = (inputRef) => {
// Теперь inputRef — это ref, обращайтесь к значению через inputRef.value
console.log(inputRef.value);
};
</script>
<template>
<input type="text" v-model="apple" @input="() => validate(apple)" />
</template>