Step add slot icon
This commit is contained in:
parent
c704113d0d
commit
b36ba86406
2 changed files with 6 additions and 3 deletions
|
@ -19,7 +19,9 @@
|
||||||
</Steps>
|
</Steps>
|
||||||
<Divider></Divider>
|
<Divider></Divider>
|
||||||
<Steps :current="1">
|
<Steps :current="1">
|
||||||
<Step title="注册" icon="ios-person"></Step>
|
<Step title="注册">
|
||||||
|
<Icon type="md-alarm" slot="icon" />
|
||||||
|
</Step>
|
||||||
<Step title="上传头像" icon="ios-camera"></Step>
|
<Step title="上传头像" icon="ios-camera"></Step>
|
||||||
<Step title="验证邮箱" icon="ios-mail"></Step>
|
<Step title="验证邮箱" icon="ios-mail"></Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
<div :class="[prefixCls + '-tail']"><i></i></div>
|
<div :class="[prefixCls + '-tail']"><i></i></div>
|
||||||
<div :class="[prefixCls + '-head']">
|
<div :class="[prefixCls + '-head']">
|
||||||
<div :class="[prefixCls + '-head-inner']">
|
<div :class="[prefixCls + '-head-inner']">
|
||||||
<span v-if="!icon && currentStatus !== 'finish' && currentStatus !== 'error'">{{ stepNumber }}</span>
|
<span v-if="!icon && !$slots.icon && currentStatus !== 'finish' && currentStatus !== 'error'">{{ stepNumber }}</span>
|
||||||
|
<span v-else-if="$slots.icon" class="ivu-steps-icon"><slot name="icon"></slot></span>
|
||||||
<span v-else :class="iconClasses"></span>
|
<span v-else :class="iconClasses"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
`${prefixCls}-item`,
|
`${prefixCls}-item`,
|
||||||
`${prefixCls}-status-${this.currentStatus}`,
|
`${prefixCls}-status-${this.currentStatus}`,
|
||||||
{
|
{
|
||||||
[`${prefixCls}-custom`]: !!this.icon,
|
[`${prefixCls}-custom`]: !!this.icon || !!this.$slots.icon,
|
||||||
[`${prefixCls}-next-error`]: this.nextError
|
[`${prefixCls}-next-error`]: this.nextError
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue