修改IP、子网掩码的校验逻辑
This commit is contained in:
parent
225fbd4faf
commit
2930add85f
|
@ -0,0 +1,59 @@
|
||||||
|
export default class ValidationUtil {
|
||||||
|
static isIpAddress(str: string): boolean {
|
||||||
|
return (
|
||||||
|
str == "localhost" ||
|
||||||
|
/^([1-9]|[1-9][0-9]|1\d\d|2[0-2][0-3])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])\.([1-9]|[1-9][0-9]|1\d\d|2[0-4]\d|25[0-4])$/.test(
|
||||||
|
str
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static isHost(str: string): boolean {
|
||||||
|
return (
|
||||||
|
str == "localhost" ||
|
||||||
|
/^([1-9]|[1-9][0-9]|1\d\d|2[0-2][0-3])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])\.([1-9]|[1-9][0-9]|1\d\d|2[0-4]\d|25[0-4])$/.test(
|
||||||
|
str
|
||||||
|
) ||
|
||||||
|
/^([1-9]|[1-9][0-9]|1\d\d|2[0-2][0-3])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])\.([1-9]|[1-9][0-9]|1\d\d|2[0-4]\d|25[0-4])\:([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5])$/.test(
|
||||||
|
str
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static isMacAddress(str: string): boolean {
|
||||||
|
return /([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}/.test(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
static isMaskAddress(str: string): boolean {
|
||||||
|
return /^(254|252|248|240|224|192|128|0)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)$/.test(
|
||||||
|
str
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static isHexStr(str: string): boolean {
|
||||||
|
if (str != null && str != undefined && typeof str == "string") {
|
||||||
|
str = str.trim();
|
||||||
|
if (str.length == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
for (const item of str.split(" ")) {
|
||||||
|
if (item.length > 4) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!/^0[xX][A-Fa-f0-9]{1,2}/.test(item)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static isResolution(str: string): boolean {
|
||||||
|
return /([0-9]{1,5})[x|X]([0-9]{1,5}@[0-9]{1,3}$)/.test(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
static isEnglishOrNum(str: string): boolean {
|
||||||
|
return /^[0-9a-zA-Z_\-]+$/.test(str);
|
||||||
|
}
|
||||||
|
}
|
|
@ -88,7 +88,8 @@
|
||||||
(val) =>
|
(val) =>
|
||||||
(val && val.length > 0) || $t('Please type something'),
|
(val && val.length > 0) || $t('Please type something'),
|
||||||
(val) =>
|
(val) =>
|
||||||
isIpAddress(val) || $t('Please input vaild ip address'),
|
isMaskAddress(val) ||
|
||||||
|
$t('Please input vaild netmask address'),
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
|
@ -162,12 +163,12 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, ref, Ref, reactive } from "vue";
|
import { defineComponent, ref } from "vue";
|
||||||
import { useStore } from "src/store";
|
import { useStore } from "src/store";
|
||||||
import { useQuasar, copyToClipboard, uid } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import GlobalData from "src/common/GlobalData";
|
|
||||||
import { AdvancedIpAddressEntity } from "src/entities/AdvancedIpAddressEntity";
|
import { AdvancedIpAddressEntity } from "src/entities/AdvancedIpAddressEntity";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentSystenSettingAdvancedNetworkDialog",
|
name: "ComponentSystenSettingAdvancedNetworkDialog",
|
||||||
|
@ -267,12 +268,10 @@ export default defineComponent({
|
||||||
} catch {}
|
} catch {}
|
||||||
},
|
},
|
||||||
isIpAddress(str: string) {
|
isIpAddress(str: string) {
|
||||||
return (
|
return ValidationUtil.isIpAddress(str);
|
||||||
str == "localhost" ||
|
},
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
isMaskAddress(str: string) {
|
||||||
str
|
return ValidationUtil.isMaskAddress(str);
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
checkFilterListIp(str: string) {
|
checkFilterListIp(str: string) {
|
||||||
if (Array.isArray(ip_filter_list)) {
|
if (Array.isArray(ip_filter_list)) {
|
||||||
|
|
|
@ -139,6 +139,7 @@ import { useQuasar, copyToClipboard } from "quasar";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
import { ExternalControlTableEntity } from "src/entities/ExternalControlTableEntity";
|
import { ExternalControlTableEntity } from "src/entities/ExternalControlTableEntity";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentCenterControlButtonDialog",
|
name: "ComponentCenterControlButtonDialog",
|
||||||
|
@ -246,22 +247,7 @@ export default defineComponent({
|
||||||
show_dialog.value = false;
|
show_dialog.value = false;
|
||||||
},
|
},
|
||||||
isHexStr(val: string) {
|
isHexStr(val: string) {
|
||||||
if (val != null && val != undefined && typeof val == "string") {
|
return ValidationUtil.isHexStr(val);
|
||||||
val = val.trim();
|
|
||||||
if (val.length == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
for (const item of val.split(" ")) {
|
|
||||||
if (item.length > 4) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!/^0[xX][A-Fa-f0-9]{1,2}/.test(item)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -406,6 +406,7 @@ import {
|
||||||
SerialPortConfigEntity,
|
SerialPortConfigEntity,
|
||||||
} from "src/entities/SerialPortConfigEntity";
|
} from "src/entities/SerialPortConfigEntity";
|
||||||
import { Protocol } from "src/entities/WSProtocol";
|
import { Protocol } from "src/entities/WSProtocol";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentCenterControlDialog",
|
name: "ComponentCenterControlDialog",
|
||||||
|
@ -733,12 +734,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isIpAddress(str: string) {
|
isIpAddress(str: string) {
|
||||||
return (
|
return ValidationUtil.isIpAddress(str);
|
||||||
str == "localhost" ||
|
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
|
||||||
str
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -152,6 +152,7 @@ import { api } from "boot/axios";
|
||||||
import { HttpProtocol } from "src/entities/HttpProtocol";
|
import { HttpProtocol } from "src/entities/HttpProtocol";
|
||||||
import JointActionEquipmentTableEntity from "src/entities/JointActionEquipmentTableEntity";
|
import JointActionEquipmentTableEntity from "src/entities/JointActionEquipmentTableEntity";
|
||||||
import EventBus, { EventNamesDefine } from "src/common/EventBus";
|
import EventBus, { EventNamesDefine } from "src/common/EventBus";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentEditJointActionEquipmentDialog",
|
name: "ComponentEditJointActionEquipmentDialog",
|
||||||
|
@ -330,15 +331,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isHost(str: string) {
|
isHost(str: string) {
|
||||||
return (
|
return ValidationUtil.isHost(str);
|
||||||
str == "localhost" ||
|
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
|
||||||
str
|
|
||||||
) ||
|
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\:([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5])$/.test(
|
|
||||||
str
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -190,8 +190,8 @@
|
||||||
(val && val.length > 0) ||
|
(val && val.length > 0) ||
|
||||||
$t('Please type something'),
|
$t('Please type something'),
|
||||||
(val) =>
|
(val) =>
|
||||||
isIpAddress(val) ||
|
isMaskAddress(val) ||
|
||||||
$t('Please input vaild ip address'),
|
$t('Please input vaild netmask address'),
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
|
@ -1454,7 +1454,7 @@ import TimingTaskDialog from "src/components/TimingTaskDialog.vue";
|
||||||
|
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import GlobalData from "src/common/GlobalData";
|
import GlobalData from "src/common/GlobalData";
|
||||||
import { HttpProtocol } from "src/entities/HttpProtocol";
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
import { date } from "quasar";
|
import { date } from "quasar";
|
||||||
import { Protocol } from "src/entities/WSProtocol";
|
import { Protocol } from "src/entities/WSProtocol";
|
||||||
import TimingTaskEntity, {
|
import TimingTaskEntity, {
|
||||||
|
@ -2512,20 +2512,17 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isIpAddress(str: string) {
|
isIpAddress(str: string) {
|
||||||
return (
|
return ValidationUtil.isIpAddress(str);
|
||||||
str == "localhost" ||
|
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
|
||||||
str
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
isMacAddress(str: string) {
|
isMacAddress(str: string) {
|
||||||
return /([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}/.test(str);
|
return ValidationUtil.isMacAddress(str);
|
||||||
|
},
|
||||||
|
isMaskAddress(str: string) {
|
||||||
|
return ValidationUtil.isMaskAddress(str);
|
||||||
},
|
},
|
||||||
checkResolution(str: string) {
|
checkResolution(str: string) {
|
||||||
const reg = /([0-9]{1,5})[x|X]([0-9]{1,5}@[0-9]{1,3}$)/;
|
|
||||||
return (
|
return (
|
||||||
reg.test(str) ||
|
ValidationUtil.isResolution(str) ||
|
||||||
$t.t("the resolution format is incorrect,") +
|
$t.t("the resolution format is incorrect,") +
|
||||||
$t.t("for example: ") +
|
$t.t("for example: ") +
|
||||||
"1920x1080@60"
|
"1920x1080@60"
|
||||||
|
|
|
@ -294,6 +294,7 @@ import AdvancedIpAddressDialog from "src/components/AdvancedIpAddressDialog.vue"
|
||||||
import { AdvancedIpAddressEntity } from "src/entities/AdvancedIpAddressEntity";
|
import { AdvancedIpAddressEntity } from "src/entities/AdvancedIpAddressEntity";
|
||||||
import { api } from "src/boot/axios";
|
import { api } from "src/boot/axios";
|
||||||
import { HttpProtocol } from "src/entities/HttpProtocol";
|
import { HttpProtocol } from "src/entities/HttpProtocol";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentSystenSettingAdvancedNetworkDialog",
|
name: "ComponentSystenSettingAdvancedNetworkDialog",
|
||||||
|
@ -353,15 +354,6 @@ export default defineComponent({
|
||||||
|
|
||||||
const advance_ip_rows: Ref<AdvancedIpAddressEntity[]> = ref([]);
|
const advance_ip_rows: Ref<AdvancedIpAddressEntity[]> = ref([]);
|
||||||
|
|
||||||
const isIpAddress = (str: string) => {
|
|
||||||
return (
|
|
||||||
str == "localhost" ||
|
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
|
||||||
str
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
let _resolove: any = null;
|
let _resolove: any = null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -629,7 +621,7 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
isEnglishOrNum(str: string) {
|
isEnglishOrNum(str: string) {
|
||||||
return /^[0-9a-zA-Z_\-]+$/.test(str);
|
return ValidationUtil.isEnglishOrNum(str);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default {
|
||||||
Accept: "Accept",
|
Accept: "Accept",
|
||||||
"move speed": "Move Speed",
|
"move speed": "Move Speed",
|
||||||
"y offset": "Y Offset",
|
"y offset": "Y Offset",
|
||||||
"the number must be greater than 0":"the number must be greater than 0",
|
"the number must be greater than 0": "the number must be greater than 0",
|
||||||
"pos x": "X Position",
|
"pos x": "X Position",
|
||||||
"pos y": "Y Position",
|
"pos y": "Y Position",
|
||||||
width: "Width",
|
width: "Width",
|
||||||
|
@ -434,14 +434,14 @@ export default {
|
||||||
"verify key length is 6": "Verify Key Length Is 6",
|
"verify key length is 6": "Verify Key Length Is 6",
|
||||||
server: "Server",
|
server: "Server",
|
||||||
"set cloud server setting": "Set Cloud Server Setting",
|
"set cloud server setting": "Set Cloud Server Setting",
|
||||||
"set magic wall":"Set Magic wall",
|
"set magic wall": "Set Magic wall",
|
||||||
"update magic wall":"Update Magic Wall",
|
"update magic wall": "Update Magic Wall",
|
||||||
"magic wall":"Magic Wall",
|
"magic wall": "Magic Wall",
|
||||||
"angle":"Angle",
|
angle: "Angle",
|
||||||
"topology diagram":"Topology Diagram",
|
"topology diagram": "Topology Diagram",
|
||||||
"physical central location":"Central Location",
|
"physical central location": "Central Location",
|
||||||
"monitors list":"Monitors List",
|
"monitors list": "Monitors List",
|
||||||
"resize":"Resize",
|
resize: "Resize",
|
||||||
"export magic":"Export",
|
"export magic": "Export",
|
||||||
"raster graph":"Raster Graph"
|
"raster graph": "Raster Graph",
|
||||||
};
|
};
|
||||||
|
|
|
@ -123,6 +123,7 @@ export default {
|
||||||
"local disk": "本地磁盘",
|
"local disk": "本地磁盘",
|
||||||
usb: "U盘",
|
usb: "U盘",
|
||||||
"Please input vaild ip address": "请输入合法的IP地址",
|
"Please input vaild ip address": "请输入合法的IP地址",
|
||||||
|
"Please input vaild netmask address": "请输入合法的掩码地址",
|
||||||
"Please input vaild mac address": "请输入合法的MAC地址",
|
"Please input vaild mac address": "请输入合法的MAC地址",
|
||||||
"server ip address": "服务器地址",
|
"server ip address": "服务器地址",
|
||||||
"please input server ip address": "请输入服务器地址",
|
"please input server ip address": "请输入服务器地址",
|
||||||
|
@ -701,14 +702,14 @@ export default {
|
||||||
"verify key length is 6": "校验码长度必须为6",
|
"verify key length is 6": "校验码长度必须为6",
|
||||||
server: "服务",
|
server: "服务",
|
||||||
"set cloud server setting": "设置云服务器",
|
"set cloud server setting": "设置云服务器",
|
||||||
"set magic wall":"设置魔墙",
|
"set magic wall": "设置魔墙",
|
||||||
"update magic wall":"更新魔墙",
|
"update magic wall": "更新魔墙",
|
||||||
"magic wall":"魔墙",
|
"magic wall": "魔墙",
|
||||||
"angle":"角度",
|
angle: "角度",
|
||||||
"topology diagram":"拓扑图",
|
"topology diagram": "拓扑图",
|
||||||
"physical central location":"物理中心位置",
|
"physical central location": "物理中心位置",
|
||||||
"monitors list":"显示器",
|
"monitors list": "显示器",
|
||||||
"resize":"缩放",
|
resize: "缩放",
|
||||||
"export magic":"导出",
|
"export magic": "导出",
|
||||||
"raster graph":"栅格图"
|
"raster graph": "栅格图",
|
||||||
};
|
};
|
||||||
|
|
|
@ -68,11 +68,7 @@
|
||||||
(val && val.length > 0) ||
|
(val && val.length > 0) ||
|
||||||
$t('Please type something'),
|
$t('Please type something'),
|
||||||
(val) =>
|
(val) =>
|
||||||
val == 'localhost' ||
|
isHost(val) || $t('Please input vaild ip address'),
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
|
||||||
val
|
|
||||||
) ||
|
|
||||||
$t('Please input vaild ip address'),
|
|
||||||
]"
|
]"
|
||||||
@keydown="
|
@keydown="
|
||||||
(evt) => {
|
(evt) => {
|
||||||
|
@ -363,6 +359,7 @@ import Initializer from "src/common/Initializer";
|
||||||
import { api } from "src/boot/axios";
|
import { api } from "src/boot/axios";
|
||||||
import { HttpProtocol } from "src/entities/HttpProtocol";
|
import { HttpProtocol } from "src/entities/HttpProtocol";
|
||||||
import { Plugins as CapacitorPlugins } from "@capacitor/core";
|
import { Plugins as CapacitorPlugins } from "@capacitor/core";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
class _Data {
|
class _Data {
|
||||||
user_name: string | null = null;
|
user_name: string | null = null;
|
||||||
|
@ -699,6 +696,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isHost(str: string) {
|
||||||
|
return ValidationUtil.isHost(str);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,11 +37,7 @@
|
||||||
(val && val.length > 0) ||
|
(val && val.length > 0) ||
|
||||||
$t('Please type something'),
|
$t('Please type something'),
|
||||||
(val) =>
|
(val) =>
|
||||||
val == 'localhost' ||
|
isHost(val) || $t('Please input vaild ip address'),
|
||||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
|
||||||
val
|
|
||||||
) ||
|
|
||||||
$t('Please input vaild ip address'),
|
|
||||||
]"
|
]"
|
||||||
@keydown="
|
@keydown="
|
||||||
(evt) => {
|
(evt) => {
|
||||||
|
@ -90,8 +86,8 @@
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend >
|
<template v-slot:prepend>
|
||||||
<q-icon name="account_circle" class="background" />
|
<q-icon name="account_circle" class="background" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="data.user_name" v-slot:append>
|
<template v-if="data.user_name" v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
@ -129,7 +125,7 @@
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend >
|
<template v-slot:prepend>
|
||||||
<q-icon name="key" class="background" />
|
<q-icon name="key" class="background" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="data.password" v-slot:append>
|
<template v-if="data.password" v-slot:append>
|
||||||
|
@ -191,7 +187,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.background{
|
.background {
|
||||||
color: #3f69fd;
|
color: #3f69fd;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -211,6 +207,7 @@ import { Md5 } from "ts-md5";
|
||||||
import Initializer from "src/common/Initializer";
|
import Initializer from "src/common/Initializer";
|
||||||
import { api } from "src/boot/axios";
|
import { api } from "src/boot/axios";
|
||||||
import { HttpProtocol } from "src/entities/HttpProtocol";
|
import { HttpProtocol } from "src/entities/HttpProtocol";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
class _Data {
|
class _Data {
|
||||||
user_name: string | null = null;
|
user_name: string | null = null;
|
||||||
|
@ -476,6 +473,9 @@ export default defineComponent({
|
||||||
data.password = null;
|
data.password = null;
|
||||||
remember_password.value = false;
|
remember_password.value = false;
|
||||||
},
|
},
|
||||||
|
isHost(str: string) {
|
||||||
|
return ValidationUtil.isHost(str);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue