Skip to content

305 - Capitalize #2886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
filimonich opened this issue Jan 8, 2025 · 0 comments
Closed

305 - Capitalize #2886

filimonich opened this issue Jan 8, 2025 · 0 comments

Comments

@filimonich
Copy link

filimonich commented Jan 8, 2025

<script setup>
import { ref, watch } from 'vue';

const value = ref('');

watch(value, (newValue) => {
  if (newValue) {
    value.value = newValue.charAt(0).toUpperCase() + newValue.slice(1);
  }
});
</script>

<template>
  <input type="text" v-model="value" />
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant