feat(Field): add icon-prefix prop (#5666)

This commit is contained in:
chenjiahan
2020-02-28 15:46:54 +08:00
parent 05966e0469
commit 876b899fec
3 changed files with 8 additions and 2 deletions
+6 -2
View File
@@ -437,7 +437,9 @@ export default createComponent({
if (showLeftIcon) {
return (
<div class={bem('left-icon')} onClick={this.onClickLeftIcon}>
{this.slots('left-icon') || <Icon name={this.leftIcon} />}
{this.slots('left-icon') || (
<Icon name={this.leftIcon} classPrefix={this.iconPrefix} />
)}
</div>
);
}
@@ -450,7 +452,9 @@ export default createComponent({
if (showRightIcon) {
return (
<div class={bem('right-icon')} onClick={this.onClickRightIcon}>
{slots('right-icon') || <Icon name={this.rightIcon} />}
{slots('right-icon') || (
<Icon name={this.rightIcon} classPrefix={this.iconPrefix} />
)}
</div>
);
}