From 4c57e55f254053f65df7e49217727906df84305e Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 2 Jan 2025 13:23:02 +0100 Subject: [PATCH] fix: refs #7699 fix vnInputPassword --- src/components/common/VnChangePassword.vue | 13 +++----- src/components/common/VnInput.vue | 12 +------- src/components/common/VnInputPassword.vue | 36 ++++++++++++++++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 src/components/common/VnInputPassword.vue diff --git a/src/components/common/VnChangePassword.vue b/src/components/common/VnChangePassword.vue index c17c0ffbd..acc895f0e 100644 --- a/src/components/common/VnChangePassword.vue +++ b/src/components/common/VnChangePassword.vue @@ -2,9 +2,9 @@ import { ref } from 'vue'; import { useI18n } from 'vue-i18n'; import VnRow from '../ui/VnRow.vue'; -import VnInput from './VnInput.vue'; import FetchData from '../FetchData.vue'; import useNotify from 'src/composables/useNotify'; +import VnInputPassword from './VnInputPassword.vue'; const props = defineProps({ submitFn: { type: Function, default: () => {} }, @@ -70,19 +70,17 @@ defineExpose({ show: () => changePassDialog.value.show() }); - - diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index f2fdb8ef1..e165b9e3f 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -42,10 +42,6 @@ const $props = defineProps({ type: Number, default: null, }, - toggleVisibility: { - type: Boolean, - default: false, - }, }); const vnInputRef = ref(null); @@ -129,7 +125,7 @@ const handleInsertMode = (e) => { ref="vnInputRef" v-model="value" v-bind="{ ...$attrs, ...styleAttrs }" - :type="toggleVisibility ? (showPassword ? 'text' : 'password') : $attrs.type" + :type="$attrs.type" :class="{ required: isRequired }" @keyup.enter="emit('keyup.enter')" @keydown="handleKeydown" @@ -143,12 +139,6 @@ const handleInsertMode = (e) => {