2
0

特殊符号引发编译器报错

This commit is contained in:
lai
2025-02-21 14:52:25 +08:00
parent b4f48789df
commit 12472f5a2e
3 changed files with 5 additions and 5 deletions

View File

@@ -732,7 +732,7 @@ const local: any = {
username:'Device usernameoptional', username:'Device usernameoptional',
password:'Device passwordoptional', password:'Device passwordoptional',
snFormatError:'A-Z or 13-bit characters from 0-9', snFormatError:'A-Z or 13-bit characters from 0-9',
nameFormatError:'Cannot start with space, +、-、@, = characters,cannot end with space, the length is between 1-128', nameFormatError:"Cannot start with space, +、-、{test}, = characters,cannot end with space, the length is between 1-128",
forgetConfirm:'Are you sure you want to forget your device?', forgetConfirm:'Are you sure you want to forget your device?',
restartConfirm:'Are you sure you want to restart your device?', restartConfirm:'Are you sure you want to restart your device?',
led:'LED', led:'LED',

View File

@@ -732,7 +732,7 @@ const local:any = {
username:'设备用户名', username:'设备用户名',
password:'密码', password:'密码',
snFormatError:'A-Z 或 0-9 的 13 位字符', snFormatError:'A-Z 或 0-9 的 13 位字符',
nameFormatError:'不能以空格、+、-、@、=字符开头,不能以空格结尾,长度在 1-128 之间', nameFormatError:'不能以空格、+、-、{test}、=字符开头,不能以空格结尾,长度在 1-128 之间',
forgetConfirm:'确认要忘记设备吗?', forgetConfirm:'确认要忘记设备吗?',
restartConfirm:'确认要重启设备吗?', restartConfirm:'确认要重启设备吗?',
led:'LED', led:'LED',

View File

@@ -555,14 +555,14 @@ const addDeviceRules = {
message: t('page.apdevice.snFormatError'), message: t('page.apdevice.snFormatError'),
trigger: 'blur' trigger: 'blur'
} }
] as Rule[], ] ,
name: [ name: [
{ {
pattern: /^[^ \+\-\@\=]$|^[^ \+\-\@\=].{0,126}[^ ]$/, pattern: /^[^ \+\-\@\=]$|^[^ \+\-\@\=].{0,126}[^ ]$/,
message: t('page.apdevice.nameFormatError'), message: t('page.apdevice.nameFormatError', { test: '@' }),
trigger: 'blur' trigger: 'blur'
} }
] as Rule[] ]
}; };
// 添加设备的表单数据 // 添加设备的表单数据