|
@@ -25,7 +25,7 @@ Simple step bar.
|
|
|
:::demo Set `active` attribute with `Number` type, which indicates the index of steps and starts from 0. You can set `space` attribute when the width of the step needs to be fixed which accepts `Boolean` type. The unit of the `space` attribute is `px`. If not set, it is responsive. Setting the `finish-status` attribute can change the state of the steps that have been completed.
|
|
|
|
|
|
```html
|
|
|
-<el-steps :space="100" :active="active" finish-status="success">
|
|
|
+<el-steps :active="active" finish-status="success">
|
|
|
<el-step title="Step 1"></el-step>
|
|
|
<el-step title="Step 2"></el-step>
|
|
|
<el-step title="Step 3"></el-step>
|
|
@@ -58,7 +58,7 @@ Shows the status of the step for each step.
|
|
|
:::demo Use `title` attribute to set the name of the step, or override the attribute by using a named `slot`. We have listed all the slot names for you at the end of this page.
|
|
|
|
|
|
```html
|
|
|
-<el-steps :space="100" :active="1" finish-status="success">
|
|
|
+<el-steps :space="200" :active="1" finish-status="success">
|
|
|
<el-step title="Done"></el-step>
|
|
|
<el-step title="Processing"></el-step>
|
|
|
<el-step title="Step 3"></el-step>
|
|
@@ -66,13 +66,28 @@ Shows the status of the step for each step.
|
|
|
```
|
|
|
:::
|
|
|
|
|
|
+### Center
|
|
|
+
|
|
|
+Title and desription can be centered.
|
|
|
+
|
|
|
+:::demo
|
|
|
+```html
|
|
|
+<el-steps :active="2" align-center>
|
|
|
+ <el-step title="Step 1" description="Some description"></el-step>
|
|
|
+ <el-step title="Step 2" description="Some description"></el-step>
|
|
|
+ <el-step title="Step 3" description="Some description"></el-step>
|
|
|
+ <el-step title="Step 4" description="Some description"></el-step>
|
|
|
+</el-steps>
|
|
|
+```
|
|
|
+:::
|
|
|
+
|
|
|
### Step bar with description
|
|
|
|
|
|
There is description for each step.
|
|
|
|
|
|
:::demo
|
|
|
```html
|
|
|
-<el-steps :space="200" :active="1">
|
|
|
+<el-steps :active="1">
|
|
|
<el-step title="Step 1" description="Some description"></el-step>
|
|
|
<el-step title="Step 2" description="Some description"></el-step>
|
|
|
<el-step title="Step 3" description="Some description"></el-step>
|
|
@@ -87,10 +102,10 @@ A variety of custom icons can be used in the step bar.
|
|
|
:::demo The icon is set by the `icon` property. The types of icons can be found in the document for the Icon component. In addition, you can customize the icon through a named `slot`.
|
|
|
|
|
|
```html
|
|
|
-<el-steps :space="100" :active="1">
|
|
|
- <el-step title="Step 1" icon="edit"></el-step>
|
|
|
- <el-step title="Step 2" icon="upload"></el-step>
|
|
|
- <el-step title="Step 3" icon="picture"></el-step>
|
|
|
+<el-steps :active="1">
|
|
|
+ <el-step title="Step 1" icon="el-icon-edit"></el-step>
|
|
|
+ <el-step title="Step 2" icon="el-icon-upload"></el-step>
|
|
|
+ <el-step title="Step 3" icon="el-icon-picture"></el-step>
|
|
|
</el-steps>
|
|
|
```
|
|
|
:::
|
|
@@ -102,10 +117,32 @@ Vertical step bars.
|
|
|
:::demo You only need to set the `direction` attribute to` vertical` in the `el-steps` element.
|
|
|
|
|
|
```html
|
|
|
-<el-steps :space="100" direction="vertical" :active="1">
|
|
|
- <el-step title="Step 1"></el-step>
|
|
|
- <el-step title="Step 2"></el-step>
|
|
|
- <el-step title="Step 3"></el-step>
|
|
|
+<div style="height: 300px;">
|
|
|
+ <el-steps direction="vertical" :active="1">
|
|
|
+ <el-step title="Step 1"></el-step>
|
|
|
+ <el-step title="Step 2"></el-step>
|
|
|
+ <el-step title="Step 3"></el-step>
|
|
|
+ </el-steps>
|
|
|
+</div>
|
|
|
+```
|
|
|
+:::
|
|
|
+
|
|
|
+### Simple step bar
|
|
|
+Simple step bars, where `align-center`, `description`, `direction` and `space` will be ignored.
|
|
|
+
|
|
|
+:::demo
|
|
|
+```html
|
|
|
+
|
|
|
+<el-steps :space="200" active="1" simple>
|
|
|
+ <el-step title="Step 1" icon="el-icon-edit"></el-step>
|
|
|
+ <el-step title="Step 2" icon="el-icon-upload"></el-step>
|
|
|
+ <el-step title="Step 3" icon="el-icon-picture"></el-step>
|
|
|
+</el-steps>
|
|
|
+
|
|
|
+<el-steps :active="1" finish-status="success" simple style="margin-top: 20px">
|
|
|
+ <el-step title="Step 1" ></el-step>
|
|
|
+ <el-step title="Step 2" ></el-step>
|
|
|
+ <el-step title="Step 3" ></el-step>
|
|
|
</el-steps>
|
|
|
```
|
|
|
:::
|
|
@@ -114,21 +151,21 @@ Vertical step bars.
|
|
|
|
|
|
| Attribute | Description | Type | Accepted Values | Default |
|
|
|
|---------- |-------- |---------- |------------- |-------- |
|
|
|
-| space | the spacing of each step, will be responsive if omitted. Support percentage. | Number,String | — | — |
|
|
|
+| space | the spacing of each step, will be responsive if omitted. Supports percentage. | number / string | — | — |
|
|
|
| direction | display direction | string | vertical/horizontal | horizontal |
|
|
|
| active | current activation step | number | — | 0 |
|
|
|
-| process-status | status of current step | string | wait/process/finish/error/success | process |
|
|
|
-| finish-status | status of end step | string | wait/process/finish/error/success | finish |
|
|
|
-| align-center | whether step description is centered | boolean | — | false |
|
|
|
-| center | center whole `Steps` component | boolean | - | false |
|
|
|
+| process-status | status of current step | string | wait / process / finish / error / success | process |
|
|
|
+| finish-status | status of end step | string | wait / process / finish / error / success | finish |
|
|
|
+| align-center | center title and description | boolean | — | false |
|
|
|
+| simple | whether to apply simple theme | boolean | - | false |
|
|
|
|
|
|
### Step Attributes
|
|
|
| Attribute | Description | Type | Accepted Values | Default |
|
|
|
|---------- |-------- |---------- |------------- |-------- |
|
|
|
| title | step title | string | — | — |
|
|
|
| description | step description | string | — | — |
|
|
|
-| icon | step icon | icons provided by Element Icon. Can be overwritten by a named slot if you want to use custom icons | string | — |
|
|
|
-| status | current status. It will be automatically set by Steps if not configured. | wait/process/finish/error/success | - |
|
|
|
+| icon | step icon | step icon's class name. Icons can be passed via named slot as well | string | — |
|
|
|
+| status | current status. It will be automatically set by Steps if not configured. | wait / process / finish / error / success | - |
|
|
|
|
|
|
### Step Slot
|
|
|
| Name | Description |
|