Merge pull request #733 from RickCole21/master

remark classname调整下、验证问题修复
This commit is contained in:
liaoxuezhi 2020-07-03 17:36:04 +08:00 committed by GitHub
commit fc1a24f38d
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ class Remark extends React.Component<RemarkProps> {
classPrefix={ns}
classnames={cx}
tooltip={filterContents(tooltip || content, data)}
tooltipClassName={tooltip && tooltip.tooltipClassName}
placement={(tooltip && tooltip.placement) || placement}
rootClose={(tooltip && tooltip.rootClose) || rootClose}
trigger={(tooltip && tooltip.trigger) || trigger}

View File

@ -259,7 +259,7 @@ export function validate(
rules &&
Object.keys(rules).forEach(ruleName => {
if (!rules[ruleName]) {
if (!isExisty(rules[ruleName]) || isEmpty(rules[ruleName])) {
return;
} else if (typeof validations[ruleName] !== 'function') {
throw new Error('Validation `' + ruleName + '` not exists!');