import { ref, onMounted } from 'vue';

export default {
    beforeMount(el) {
        const input = el.querySelector('input');
        const handleInput = () => {
            input.value = input.value * 100 + '%';
        };

        onMounted(() => {
            input.addEventListener('input', handleInput);
        });
    },
    beforeUnmount(el) {
        const input = el.querySelector('input');
        input.removeEventListener('input', handleInput);
    },
};