Created
May 21, 2018 14:03
-
-
Save erowsika/d6f13f5e1e9aa19cfe4c93839636534c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="is-child"> | |
| <form-wizard | |
| :currentStep="currentView" | |
| @formwizard-step-change="onFormWizardStepChange"> | |
| </form-wizard> | |
| </div> | |
| </template> | |
| <script> | |
| import step1 from './step1' | |
| import step2 from './step2' | |
| import FormWizard from '../../components/formWizard/FormWizard.vue' | |
| export default { | |
| components: { | |
| 'form-wizard': FormWizard, | |
| step1, | |
| step2 | |
| }, | |
| data () { | |
| return { | |
| currentView: step1 | |
| } | |
| }, | |
| methods: { | |
| onFormWizardStepChange (value) { | |
| if (value === 1) this.currentView = step1 | |
| switch (value) { | |
| case 1: { | |
| this.currentView = step1 | |
| break | |
| } | |
| case 2: { | |
| this.currentView = step2 | |
| break | |
| } | |
| default: | |
| this.currentView = step1 | |
| break | |
| } | |
| } | |
| } | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment