2
0
mirror of https://github.com/tenrok/vue-form-wizard.git synced 2026-06-07 23:42:23 +03:00

#29 Extract wizard step into separate component and expose via scoped slot

This commit is contained in:
cristijora
2017-07-31 21:02:31 +03:00
parent f718fe6862
commit 79be005226
7 changed files with 128 additions and 83 deletions
+9 -7
View File
@@ -10,6 +10,15 @@
@on-loading="setLoading"
@on-error="setError"
class="card" ref="wizard">
<template slot="step" scope="props">
<wizard-step :tab="props.tab"
@click.native="props.navigateToTab(props.index)"
:transition="props.transition"
:key="props.tab.title"
:index="props.index">
</wizard-step>
</template>
<tab-content title="Personal details" icon="ti-user">
My first tab
</tab-content>
@@ -20,13 +29,6 @@
<div v-if="error">
{{error}}
</div>
<template slot="footer" scope="props">
<div class="wizard-footer-right">
<wizard-button :style="props.fillButtonStyle">Cancel</wizard-button>
<wizard-button @click.native="props.nextTab()" class="wizard-footer-right" :style="props.fillButtonStyle">Next</wizard-button>
</div>
</template>
</form-wizard>
</div>
</template>