I want when I press the button to log in with a wrong password, the UI will show multiple alert popups instead of one because the user doesn't know if they still entered the wrong password.
So I use counter and string literal like this
<!-- mt = margin-top, so each alert won't lie on each other --> <v-alert v-for="i in counter" :key="i" class=`mt-${i}` > Wrong Password </v-alert>
This doesn't work. Any other ideas?
P粉5069638422024-02-22 10:10:13
You can bind classes -> :class="'mt-${i}
'" tildas ` should only be around ${i} and around the whole name 'mt-yourcode' Use apostrophe