screen_rotation
Copied to Clipboard
<html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h3>Vue Js Check ifString is Empty</h3> <p v-if="myString.trim().length === 0">The string is empty.</p> <p v-else>The string is not empty.</p> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { myString: ' ', // Set the initial value of the string to an empty string }; }, }) </script> <style> #app { font-family: Arial, sans-serif; font-size: 16px; color: #333; background-color: #f7f7f7; padding: 20px; } p { margin-bottom: 10px; } </style> </body> </html>