phoneValidation.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div>
  3. <template v-if="isMobile">
  4. <validationPhone-stepSelect v-if="step === 'first'" @stepEvent="setStep"/>
  5. </template>
  6. <template v-else>
  7. <accountCenter-header/>
  8. <phone-validation/>
  9. </template>
  10. </div>
  11. </template>
  12. <script>
  13. import AccountCenterHeader from '~components/default/AccountCenterHeader.vue'
  14. import PhoneValidation from '~components/validation/PhoneValidation.vue'
  15. import ValidationPhoneStepSelect from '~components/mobile/validation/ValidationPhoneStepSelect'
  16. export default {
  17. layout (context) {
  18. return context.store.state.option.isMobile ? 'mobile' : 'default'
  19. },
  20. transition: {
  21. name: 'fade',
  22. mode: 'out-in'
  23. },
  24. data () {
  25. return {
  26. step: 'first'
  27. }
  28. },
  29. components: {
  30. AccountCenterHeader,
  31. PhoneValidation,
  32. ValidationPhoneStepSelect
  33. },
  34. computed: {
  35. isMobile () {
  36. return this.$store.state.option.isMobile
  37. }
  38. },
  39. methods: {
  40. setStep (type) {
  41. this.step = type
  42. }
  43. }
  44. }
  45. </script>