diff --git a/src/assets/images/icons.svg b/src/assets/images/icons.svg
index 32f33a6..244d7d8 100644
--- a/src/assets/images/icons.svg
+++ b/src/assets/images/icons.svg
@@ -251,4 +251,14 @@
d="M14.3272 17.4867H5.66513C5.33609 17.4867 5.07048 17.7574 5.07048 18.0928C5.07048 18.4281 5.33609 18.6989 5.66513 18.6989H14.3232C14.6522 18.6989 14.9179 18.4281 14.9179 18.0928C14.9179 17.7574 14.6522 17.4867 14.3232 17.4867H14.3272Z"
/>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/assets/style/default.css b/src/assets/style/default.css
index 97506b0..f9006af 100644
--- a/src/assets/style/default.css
+++ b/src/assets/style/default.css
@@ -454,6 +454,7 @@ label {
flex-wrap: wrap;
width: 100%;
padding: 2px;
+ position: relative;
}
label>span {
diff --git a/src/components/global/FormInput.vue b/src/components/global/FormInput.vue
index f941714..905a7b2 100644
--- a/src/components/global/FormInput.vue
+++ b/src/components/global/FormInput.vue
@@ -11,7 +11,7 @@
+
+
+
@@ -82,9 +94,18 @@
'keydown',
'keyup'
])
- const localValue = ref()
+ const isPasswordVisible = ref(false)
const InvalidMessageText = reactive>({})
+ const inputType = computed(() => {
+ if (props.type !== 'password') {
+ return props.type
+ } else {
+ if (isPasswordVisible.value) return 'text'
+ else return 'password'
+ }
+ })
+
const InvalidMessages = computed(() => {
let text = ''
Object.keys(InvalidMessageText).forEach((k: string, i: number) => {
@@ -138,7 +159,9 @@
emit('update:modelValue', (e.target as HTMLInputElement).value)
emit('keyup', e)
}
-
+ const PasswordVisibleToggle = () => {
+ if (props.type === 'password') isPasswordVisible.value = !isPasswordVisible.value
+ }
watch(
() => props.invalidText,
() => {
@@ -151,3 +174,16 @@
}
)
+