Guest User

Untitled

a guest
Jun 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. const formTouched = form => {
  2. return {
  3. data () {
  4. return {
  5. formTouched: {}
  6. }
  7. },
  8.  
  9. mounted () {
  10. const $this = this
  11.  
  12. this.formTouched = $this.toucher
  13. },
  14.  
  15. computed: {
  16. toucher () {
  17. const $this = this
  18.  
  19. return $this.$f.toucher($this.form)
  20. },
  21.  
  22. isformTouched () {
  23. const $this = this
  24.  
  25. return !Object.entries($this.formTouched).map(([ key, value ]) => ({ key, value })).every(({ value }) => !value)
  26. }
  27. }
  28. }
  29. }
  30.  
  31. export default formTouched
Add Comment
Please, Sign In to add comment