feat: 修改校验

This commit is contained in:
zhengkunwang223
2022-12-26 16:15:50 +08:00
committed by zhengkunwang223
parent f7f7fff84d
commit be974ad0a8
3 changed files with 2 additions and 12 deletions
-10
View File
@@ -12,13 +12,3 @@ func getTxAndContext() (tx *gorm.DB, ctx context.Context) {
ctx = context.WithValue(context.Background(), constant.DB, tx)
return
}
func getTxByContext(ctx context.Context) (*gorm.DB, context.Context) {
tx, ok := ctx.Value(constant.DB).(*gorm.DB)
if ok {
return tx, ctx
}
tx = global.DB.Begin()
ctx = context.WithValue(context.Background(), constant.DB, tx)
return tx, ctx
}
+1 -1
View File
@@ -108,7 +108,7 @@ export default {
imageName: '支持英文、中文、数字、:.-_,长度1-30',
complexityPassword: '请输入 8 位以上、必须含有字母、数字、特殊符号的密码',
commonPassword: '请输入 6 位以上长度密码',
linuxName: '支持英文、数字、._长度1-30',
linuxName: '支持英文、数字、._-长度1-30',
email: '请输入正确的邮箱',
number: '请输入正确的数字',
ip: '请输入正确的 IP 地址',
@@ -46,7 +46,7 @@ const installData = ref<InstallRrops>({
let open = ref(false);
let form = ref<{ [key: string]: any }>({});
let rules = ref<FormRules>({
NAME: [Rules.simpleName],
NAME: [Rules.linuxName],
});
let loading = false;
const paramForm = ref<FormInstance>();