设备管理-配置编辑 除了输出地址、输入地址外,其他的变为输入框,限制输入最大字符数为4,且每位必须是16进制数

This commit is contained in:
fan 2020-01-07 09:36:19 +08:00
parent ea528dacef
commit c09021067a

View File

@ -127,10 +127,12 @@ export default {
} }
}); });
let flag = false; let flag = false;
for (var i = 0; i < value.length; i++) { if (value && value.length) {
const ascallCode = value.charCodeAt(i); for (var i = 0; i < value.length; i++) {
if (ascallCode > 70 || ascallCode < 48 || (ascallCode > 57 && ascallCode < 65)) { const ascallCode = value.charCodeAt(i);
flag = true; if (ascallCode > 70 || ascallCode < 48 || (ascallCode > 57 && ascallCode < 65)) {
flag = true;
}
} }
} }
if (!value) { if (!value) {