5ae005cdece776109584788d828059cc77cb4886.svn-base 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <a-card :bordered="false" style="width: 130%;text-align: center;margin-left:-10%">
  3. <a-steps class="steps" :current="currentTab">
  4. <a-step title="手机验证"/>
  5. <a-step title="更改密码"/>
  6. <a-step title="完成"/>
  7. </a-steps>
  8. <div class="content">
  9. <step2 v-if="currentTab === 0" @nextStep="nextStep"/>
  10. <step3 v-if="currentTab === 1" @nextStep="nextStep" @prevStep="prevStep" :userList="userList"/>
  11. <step4 v-if="currentTab === 2" @prevStep="prevStep" @finish="finish" :userList="userList"/>
  12. </div>
  13. </a-card>
  14. </template>
  15. <script>
  16. import Step2 from './Step2'
  17. import Step3 from './Step3'
  18. import Step4 from './Step4'
  19. export default {
  20. name: "Alteration",
  21. components: {
  22. Step2,
  23. Step3,
  24. Step4
  25. },
  26. data() {
  27. return {
  28. description: '将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成。',
  29. currentTab: 0,
  30. userList: {},
  31. // form
  32. form: null,
  33. }
  34. },
  35. methods: {
  36. // handler
  37. nextStep(data) {
  38. this.userList = data;
  39. if (this.currentTab < 4) {
  40. this.currentTab += 1
  41. }
  42. },
  43. prevStep(data) {
  44. this.userList = data;
  45. if (this.currentTab > 0) {
  46. this.currentTab -= 1
  47. }
  48. },
  49. finish() {
  50. this.currentTab = 0
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="less" scoped>
  56. .steps {
  57. max-width: 750px;
  58. margin: 16px auto;
  59. }
  60. /deep/ .password-retrieval-form{
  61. max-width: 500px;
  62. margin: 40px auto 0;
  63. .ant-form-explain{
  64. text-align: left;
  65. }
  66. }
  67. </style>