[new feature] Step: add inactive-icon slot

This commit is contained in:
陈嘉涵
2019-05-02 10:28:30 +08:00
parent 4d4ad7960b
commit e9e6e238db
6 changed files with 65 additions and 3 deletions

View File

@@ -43,8 +43,9 @@ export default sfc({
);
}
if (inactiveIcon) {
return <Icon class={bem('icon')} name={inactiveIcon} />;
const inactiveIconSlot = slots('inactive-icon');
if (inactiveIcon || inactiveIconSlot) {
return inactiveIconSlot || <Icon class={bem('icon')} name={inactiveIcon} />;
}
return <i class={bem('circle')} />;