feat:功能名称 的四个位置,代码生产(数据优先/界面优先),移动端(功能页内的功能名称为代码生产带出),数据配置-数据表管理(生成代码)都配置为只支持大写
This commit is contained in:
@ -673,10 +673,10 @@
|
||||
if (!isCustomForm) {
|
||||
await validate();
|
||||
|
||||
if (!/^[a-zA-Z][a-zA-Z0-9]*$/.test(outputConfig!.className!)) {
|
||||
if (!/^[A-Z][a-zA-Z0-9]*$/.test(outputConfig!.className!)) {
|
||||
notification.error({
|
||||
message: t('提示'),
|
||||
description: t('功能名称只能是数字和字母组成,必须以英文字母开头'),
|
||||
description: t('功能名称只能是数字和字母组成,必须以英文字母大写开头'),
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -502,10 +502,10 @@
|
||||
return false;
|
||||
}
|
||||
console.log(outputConfig, 'outputConfig');
|
||||
if (!/^[a-zA-Z][a-zA-Z0-9]*$/.test(outputConfig.className!)) {
|
||||
if (!/^[A-Z][a-zA-Z0-9]*$/.test(outputConfig.className!)) {
|
||||
notification.error({
|
||||
message: t('提示'),
|
||||
description: t('功能名称只能是数字和字母组成,必须以英文字母开头'),
|
||||
description: t('功能名称只能是数字和字母组成,必须以英文字母大写开头'),
|
||||
}); //提示消息
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -255,8 +255,8 @@
|
||||
validator: (_, value) => {
|
||||
if (value === '') {
|
||||
return Promise.reject('请输入功能名称');
|
||||
} else if (!/^[a-zA-Z][a-zA-Z0-9]*$/.test(value)) {
|
||||
return Promise.reject(t('功能名称只能是数字和字母组成,必须以英文字母开头'));
|
||||
} else if (!/^[A-Z][a-zA-Z0-9]*$/.test(value)) {
|
||||
return Promise.reject(t('功能名称只能是数字和字母组成,必须以英文字母大写开头'));
|
||||
} else {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user