0
0
Fork 0

fix: refs #7699 fix component

This commit is contained in:
Carlos Satorres 2025-01-07 11:18:16 +01:00
parent a89fad0ae2
commit 3953721424
1 changed files with 3 additions and 8 deletions

View File

@ -2,11 +2,8 @@
import VnInput from 'src/components/common/VnInput.vue';
import { ref } from 'vue';
const model = defineModel({ type: [Number, String] });
const $props = defineProps({
modelValue: {
type: [String, Number],
default: null,
},
toggleVisibility: {
type: Boolean,
default: false,
@ -14,18 +11,16 @@ const $props = defineProps({
});
const showPassword = ref(false);
const model = defineModel({ type: [Number, String] });
</script>
<template>
<VnInput
v-bind="{ ...$attrs }"
v-model.number="model"
v-model="model"
:type="
$props.toggleVisibility ? (showPassword ? 'text' : 'password') : $attrs.type
"
hint=""
>
<template #append>
<template #append v-if="toggleVisibility">
<QIcon
:name="showPassword ? 'visibility_off' : 'visibility'"
class="cursor-pointer"