#8448 - devToTest #1254
|
@ -19,8 +19,6 @@ const changePassDialog = ref();
|
|||
const passwords = ref({ newPassword: null, repeatPassword: null });
|
||||
const requirements = ref([]);
|
||||
const isLoading = ref(false);
|
||||
const showPwd = ref(true);
|
||||
const showRpPwd = ref(true);
|
||||
|
||||
const validate = async () => {
|
||||
const { newPassword, repeatPassword, oldPassword } = passwords.value;
|
||||
|
@ -79,39 +77,32 @@ defineExpose({ show: () => changePassDialog.value.show() });
|
|||
type="password"
|
||||
:required="true"
|
||||
autofocus
|
||||
:clearable="true"
|
||||
:show-pwd="showPwd"
|
||||
@update:show-pwd="showPwd = $event"
|
||||
:toggle-visibility="true"
|
||||
/>
|
||||
<VnInput
|
||||
:required="true"
|
||||
autofocus
|
||||
:label="t('New password')"
|
||||
v-model="passwords.newPassword"
|
||||
:label="$t('New password')"
|
||||
:show-pwd="showPwd"
|
||||
@update:show-pwd="showPwd = $event"
|
||||
>
|
||||
<!-- <template #append>
|
||||
<QIcon
|
||||
:name="showPwd ? 'visibility_off' : 'visibility'"
|
||||
class="cursor-pointer"
|
||||
@click="showPwd = !showPwd"
|
||||
/>
|
||||
</template> -->
|
||||
</VnInput>
|
||||
type="password"
|
||||
:required="true"
|
||||
:toggle-visibility="true"
|
||||
:info="
|
||||
t('passwordRequirements', {
|
||||
length: requirements.length,
|
||||
nAlpha: requirements.nAlpha,
|
||||
nUpper: requirements.nUpper,
|
||||
nDigits: requirements.nDigits,
|
||||
nPunct: requirements.nPunct,
|
||||
})
|
||||
"
|
||||
autofocus
|
||||
/>
|
||||
|
||||
<VnInput
|
||||
:label="t('Repeat password')"
|
||||
v-model="passwords.repeatPassword"
|
||||
type="password"
|
||||
:toggle-visibility="true"
|
||||
/>
|
||||
<!-- <template #append>
|
||||
<QIcon
|
||||
:name="showRpPwd ? 'visibility_off' : 'visibility'"
|
||||
class="cursor-pointer"
|
||||
@click="showRpPwd = !showRpPwd"
|
||||
/>
|
||||
</template> -->
|
||||
</QCardSection>
|
||||
</QForm>
|
||||
<QCardActions>
|
||||
|
|
|
@ -43,14 +43,13 @@ const $props = defineProps({
|
|||
default: null,
|
||||
},
|
||||
toggleVisibility: {
|
||||
// Nueva propiedad
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const vnInputRef = ref(null);
|
||||
const showPassword = ref(false); // Estado para la visibilidad de contraseña
|
||||
const showPassword = ref(false);
|
||||
const value = computed({
|
||||
get() {
|
||||
return $props.modelValue;
|
||||
|
@ -144,14 +143,12 @@ const handleInsertMode = (e) => {
|
|||
<slot name="prepend" />
|
||||
</template>
|
||||
<template #append>
|
||||
<!-- Icono para mostrar/ocultar contraseña -->
|
||||
<QIcon
|
||||
v-if="toggleVisibility"
|
||||
:name="showPassword ? 'visibility_off' : 'visibility'"
|
||||
class="cursor-pointer"
|
||||
@click="showPassword = !showPassword"
|
||||
/>
|
||||
<!-- Ícono para borrar el valor -->
|
||||
<QIcon
|
||||
name="close"
|
||||
size="xs"
|
||||
|
|
Loading…
Reference in New Issue