fix: refs #7699 add icons and hint #1123

Merged
alexm merged 18 commits from 7699-refactroViewPassword into dev 2025-01-08 13:20:17 +00:00
1 changed files with 3 additions and 8 deletions
Showing only changes of commit 3953721424 - Show all commits

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 }"
carlossa marked this conversation as resolved
Review

Si ya tenemos defineModel porque nos hace falta la props de modelValue?

Si ya tenemos defineModel porque nos hace falta la props de modelValue?
Review

Bueno, seria al reves 😅

Bueno, seria al reves 😅
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"
Review

Si lo quitamos, afectaría algo?

Si lo quitamos, afectaría algo?