Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field组件 #410

Open
1 task done
KelWenGek opened this issue Mar 23, 2021 · 1 comment
Open
1 task done

Field组件 #410

KelWenGek opened this issue Mar 23, 2021 · 1 comment
Labels

Comments

@KelWenGek
Copy link

请按照以下模板填写,不按照标准模板填写的 issue 将降低处理优先级。

这是一个

  • [] 错误报告
  • 功能需求

SaltUI 版本

4.10.6

浏览器、操作系统等环境信息

复现步骤

showErrInTip为false之后,错误信息是会在toast里展示,但是原来展示tip的地方也会被替换成errMsg.
看了下renderTip方法里的message取值是优先errMsg变量.
能否改成根据hasError来决定message是取errMsg变量还是tip变量
renderTip() {
const t = this;
const {
readOnly, disabled, tip, errMsg, showErrInTip, layout,
} = t.props;
if (!readOnly && !disabled && (tip || (errMsg && showErrInTip))) {
const message = errMsg || tip;
const hasError = errMsg && showErrInTip;
return (
<div className={classnames(prefixClass('field-box FBH field-tip-box'), {
[prefixClass('field-tip-box-error')]: hasError,
})}
>
{layout === 'h' ? t.renderLabel({ className: prefixClass('field-tip-placeholder') }) : null}
<div className={prefixClass('FBH FBAC LH1_5 field-tip')}>{message}

);
}
return null;
}

  • 你可以在这里提交你的 CodePen 链接 以及描述复现的步骤
@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant