screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h2>Vue Js Uncapitalize first letter of string</h2> <p>Original string: {{ originalString }}</p> <p>Uncapitalized string: {{ uncapitalizedString }}</p> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { originalString: 'Fontawesomeicons', }; }, computed: { uncapitalizedString() { if (this.originalString.length > 0) { return this.originalString.charAt(0).toLowerCase() + this.originalString.slice(1); } else { return ''; } } } }); </script> <style scoped> #app { display: flex; flex-direction: column; align-items: center; margin-top: 50px; } h2 { font-size: 24px; margin-bottom: 20px; } </style> </body> </html>