Steps
Demos
Current step
Options
 1 
Step 1
填写信息
 2 
Step 2
验证身份
 3 
Step 3
注册成功
<template>
<article>
  <section>
    <h4>Current step</h4>
    <veui-number-input
      v-model="current"
      :min="1"
      :max="steps.length"
      :step="1"
    />
  </section>
  <section>
    <h4>Options</h4>
    <veui-checkbox v-model="full">
      Full
    </veui-checkbox>
    <veui-checkbox v-model="small">
      Small
    </veui-checkbox>
    <veui-checkbox v-model="vertical">
      Verticle
    </veui-checkbox>
  </section>
  <section>
    <veui-steps
      :ui="ui"
      :steps="steps"
      :current="current - 1"
    />
  </section>
</article>
</template>
<script>
import { Steps, NumberInput, Checkbox } from 'veui'
export default {
  components: {
    'veui-steps': Steps,
    'veui-number-input': NumberInput,
    'veui-checkbox': Checkbox
  },
  data () {
    return {
      current: 1,
      full: false,
      small: false,
      vertical: false,
      steps: [
        { label: 'Step 1', desc: '填写信息' },
        { label: 'Step 2', desc: '验证身份' },
        { label: 'Step 3', desc: '注册成功' }
      ]
    }
  },
  computed: {
    ui () {
      return [
        ...(this.full ? ['full'] : []),
        ...(this.vertical ? ['vertical'] : []),
        ...(this.small ? ['small'] : [])
      ].join(' ')
    }
  }
}
</script>API
Props
| Name | Type | Default | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ui | string | - | Style variants. 
  | ||||||||||||
steps | Array | - | The datasource of steps with item type being  
  | ||||||||||||
current | number | - | The index of current step. | 
Slots
| Name | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
default | The content of each step. Displays the step index/completed icon, label and description by default. 
 Additionally, custom properties in current step, apart from the listed ones, will also be passes into the scope object via   | |||||||||||||||
index | The step index. Displays an index value starts from 1 and a success icon for finished steps by default. Resides inside the default slot and share the same scope properties. | |||||||||||||||
label | The step label. Displays the label prop by default. Resides inside the default slot and share the same scope properties. | |||||||||||||||
desc | The step description. Displays the desc prop by default. Resides inside the default slot and share the same scope properties. | 
Icons
| Name | Description | 
|---|---|
success | The finished steps. |