mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 13:09:07 +08:00
remark classname调整下、验证问题修复
This commit is contained in:
parent
9e3641571c
commit
cd84553cef
@ -66,16 +66,12 @@ class Remark extends React.Component<RemarkProps> {
|
||||
const finalIcon = (tooltip && tooltip.icon) || icon;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cx(
|
||||
`Remark`,
|
||||
(tooltip && tooltip.className) || className || `Remark--warning`
|
||||
)}
|
||||
>
|
||||
<div className={cx(`Remark`, className || `Remark--warning`)}>
|
||||
<TooltipWrapper
|
||||
classPrefix={ns}
|
||||
classnames={cx}
|
||||
tooltip={filterContents(tooltip || content, data)}
|
||||
tooltipClassName={tooltip && tooltip.className}
|
||||
placement={(tooltip && tooltip.placement) || placement}
|
||||
rootClose={(tooltip && tooltip.rootClose) || rootClose}
|
||||
trigger={(tooltip && tooltip.trigger) || trigger}
|
||||
|
@ -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!');
|
||||
|
Loading…
Reference in New Issue
Block a user