This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 55 <button @click =" tabs.unshift('new start')" >Add one at start</button >
66 <router-link to =" /test" >Go to a different route</router-link >
77 <form-wizard @on-complete =" onComplete"
8- shape =" circle"
8+ @on-change =" handleChange"
9+ :start-index.sync =" activeIndex"
10+ shape =" tab"
911 color =" #e74c3c" >
10- <tab-content title =" Personal details"
11- route =" /first"
12- icon =" ti-user" >
13- </tab-content >
14- <tab-content title =" Additional Info"
15- route =" /second"
16- icon =" ti-settings" >
17- </tab-content >
18- <tab-content title =" Last step"
19- route =" /third"
20- icon =" ti-check" >
21- </tab-content >
22- <transition name =" fade" mode =" out-in" >
23- <router-view ></router-view >
24- </transition >
25-
12+ <tab-content v-for =" tab in tabs" :title =" tab" :key =" tab" >{{tab}}</tab-content >
13+ <transition name =" fade" mode =" out-in" >
14+ <router-view ></router-view >
15+ </transition >
2616 </form-wizard >
2717 </div >
2818</template >
3626 loadingWizard: false ,
3727 error: null ,
3828 count: 0 ,
39- tabs: [' test' , ' test2' , ' test3' ]
29+ tabs: [' test' , ' test2' , ' test3' ],
30+ activeIndex: 0
4031 }
4132 },
4233 methods: {
4637 setLoading (value ) {
4738 this .loadingWizard = value
4839 },
40+ handleChange (prevIndex , nextIndex ){
41+ console .log (` Changing from ${ prevIndex} to ${ nextIndex} ` )
42+ },
4943 setError (error ) {
5044 this .error = error
5145 },
Original file line number Diff line number Diff line change 3434</template >
3535<script >
3636 export default {
37+ name: ' wizard-step' ,
3738 props: {
3839 tab: {
3940 type: Object ,
You can’t perform that action at this time.
0 commit comments