<script>
    export default {
        data(){
            return {
                current:1
            }
        },
        methods:{
            change(add){
                if(add){
                    this.current++;
                }else{
                    this.current>1&&this.current--;
                }
            }
        }
    }
</script>
# Steps 步骤条

引导用户按照流程完成任务的分步导航条，可根据实际应用场景设定步骤，步骤不得少于 2 步。

### 基础用法

::: demo current为Number 当前步数从1开始
```html
<template>
    <div>
        <ut-steps :current='current' finished-status='success'>
            <ut-step title='第一步'>
            </ut-step>
            <ut-step title='第二步'>
            </ut-step>
            <ut-step title='第三步'>
            </ut-step>
            <ut-step title='第四步'>
            </ut-step>
        </ut-steps>
        <div style='margin-top:24px;text-align:right'>
            <ut-button @click.native='change(false)' type='warning' plain>上一步</ut-button>
            <ut-button @click.native='change(true)' type='primary'>下一步</ut-button>
        </div>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                current:1
            }
        },
        methods:{
            change(add){
                if(add){
                    this.current++;
                }else{
                    this.current>1&&this.current--;
                }
            }
        }
    }
</script>
```
:::

### 有描述的步骤条


::: demo 每个步骤有其对应的步骤状态描述。设置description属性
```html
<template>
    <ut-steps :current='2'>
        <ut-step title='第一步' description='这是一段很长很长很长的描述性文字'>
        </ut-step>
        <ut-step title='第二步' description='这是一段很长很长很长的描述性文字'>
        </ut-step>
        <ut-step title='第三步' description='这是一段很长很长很长的描述性文字'>
        </ut-step>
    </ut-steps>
</template>
```
:::


### 自定义icon


::: demo 设置slot自定义icon内容
```html
<template>
    <ut-steps :current='1'>
        <ut-step title='基本信息'>
            <template slot='icon'><i class='iconfont icon-user-add'></i></template>
        </ut-step>
        <ut-step title='上传头像'>
            <template slot='icon'><i class='iconfont icon-photo'></i></template>
        </ut-step>
        <ut-step title='填写Email'>
            <template slot='icon'><i class='iconfont icon-email'></i></template>
        </ut-step>
    </ut-steps>
</template>
```
:::


### 多状态


::: demo 每个步骤有其对应的步骤状态。finished-status 设置结束步骤的状态。 参数"success" process-status 设置当前步骤的状态 参数"warning","error"

```html
<template>
    <ut-steps :current='3' finished-status='success' process-status='warning'>
        <ut-step title='第一步'>
        </ut-step>
        <ut-step title='第二步'>
        </ut-step>
        <ut-step title='第三步'>
        </ut-step>
        <ut-step title='第四步'>
        </ut-step>
    </ut-steps>        
</template>
```
:::