fix: custom backend version suffix

This commit is contained in:
jialin
2025-10-30 19:08:45 +08:00
parent b733b3615d
commit d7ef64746c
19 changed files with 98 additions and 89 deletions
+3 -19
View File
@@ -14,11 +14,9 @@ import { ListItem } from '../config/types';
// version must be endwith '-custom'
const pattern = /-custom$/;
const Box = styled.div`
display: grid;
grid-template-columns: 180px 1fr;
grid-template-columns: 200px 1fr;
gap: 16px;
`;
@@ -280,26 +278,12 @@ const VersionsForm: React.FC<AddModalProps> = ({
{
required: true,
message: getRuleMessage(`input`, 'backend.version')
},
currentData?.is_built_in
? {
pattern: pattern,
message: intl.formatMessage({
id: 'backend.version.rules.builtin'
})
}
: {}
}
]}
>
<SealInput.Input
trim
description={
currentData?.is_built_in
? intl.formatMessage({
id: 'backend.version.no.tips'
})
: ''
}
addAfter="-custom"
onChange={handleVersionChange}
label={intl.formatMessage({ id: 'backend.version' })}
required