Advertisement
Guest User

Untitled

a guest
Nov 26th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <template>
  2. <form @submit.prevent="validation()">
  3. <username v-model="username" v-bind="isValidUsername"/>
  4. <password v-model="password" v-bind="isValidPassword"/>
  5. </form>
  6. </template>
  7. <script>
  8. import Username from 'Username.vue'
  9. import Password from 'Password.vue'
  10.  
  11. export default {
  12. components: {
  13. Username,
  14. Password
  15. },
  16. data () {
  17. return {
  18. username: '',
  19. isValidUsername: true,
  20. password: '',
  21. isValidPassword: true
  22. }
  23. },
  24. methods: {
  25. validation () {
  26. this.isValidUsename = !!this.username
  27. this.isValidPassword = !!this.password
  28. }
  29. }
  30. }
  31. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement