Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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>
Add Comment
Please, Sign In to add comment