Add label list edit panel

This commit is contained in:
2022-03-11 17:00:05 +08:00
parent 1b401dda57
commit 7e9a652249
9 changed files with 72 additions and 33 deletions
+6
View File
@@ -12,6 +12,7 @@ interface IAttrInputProps {
value?: number | string;
isNumber?: boolean;
maxLength?: number;
minLength?: number;
max?: number;
min?: number;
step?: number;
@@ -40,6 +41,11 @@ class AttrInput extends Component<IAttrInputProps> {
return <Localization i18nKey="Input.Error.Length" options={{ num: maxLength.toString() }} />
}
const minLength = this.props.minLength ?? 1;
if (value.length < minLength) {
return <Localization i18nKey="Input.Error.Length.Less" options={{ num: minLength.toString() }} />
}
if (this.props.isNumber) {
const praseNumber = (value as any) / 1;