perf: 优化pfx密码密码输入框,让浏览器不自动填写密码

This commit is contained in:
xiaojunnuo
2024-10-22 11:22:59 +08:00
parent 3db216f515
commit ffeede38af
3 changed files with 32 additions and 2 deletions
@@ -0,0 +1,28 @@
<template>
<a-input class="cd-input-password" :class="{ show: showRef }">
<template #suffix>
<fs-icon class="pointer" :icon="computedIcon" @click="showRef = !showRef" />
</template>
</a-input>
</template>
<script lang="ts" setup>
import { computed, ref } from "vue";
const showRef = ref(false);
const computedIcon = computed(() => {
return showRef.value ? "ion:eye-outline" : "ion:eye-off-outline";
});
</script>
<style lang="less">
.cd-input-password {
text-security: disc;
-webkit-text-security: disc;
.fs-iconify {
font-size: 16px;
}
&.show {
text-security: none;
-webkit-text-security: none;
}
}
</style>