refine isConfirmDisabled

This commit is contained in:
Cindy Chang
2024-08-26 13:59:02 +08:00
parent f938eae2fc
commit 7243100d9c

View File

@@ -195,7 +195,7 @@ export default defineComponent({
const currentViewingUser = computed(() => acctMgmtStore.currentViewingUser); const currentViewingUser = computed(() => acctMgmtStore.currentViewingUser);
const isPwdEyeOn = ref(false); const isPwdEyeOn = ref(false);
const isConfirmDisabled = ref(false); const isConfirmDisabled = ref(true);
const isPwdLengthValid = ref(true); const isPwdLengthValid = ref(true);
const isResetPwdSectionShow = ref(false); const isResetPwdSectionShow = ref(false);
@@ -340,9 +340,15 @@ export default defineComponent({
if(newAccount.length > 0 && newName.length > 0) { if(newAccount.length > 0 && newName.length > 0) {
isConfirmDisabled.value = false; isConfirmDisabled.value = false;
} }
if(whichCurrentModal.value !== MODAL_CREATE_NEW) {
if(isResetPwdSectionShow.value && newPwd.length < PWD_VALID_LENGTH) { if(isResetPwdSectionShow.value && newPwd.length < PWD_VALID_LENGTH) {
isConfirmDisabled.value = true; isConfirmDisabled.value = true;
} }
}else {
if(newPwd.length < PWD_VALID_LENGTH) {
isConfirmDisabled.value = true;
}
}
} }
); );