pull/8088/head
shayulajiao 2025-03-20 16:29:22 +08:00
parent aa211fd789
commit af766b618f
1 changed files with 16 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import EyeInvisibleOutlined from '@ant-design/icons-vue/EyeInvisibleOutlined';
import type { InputProps } from './inputProps'; import type { InputProps } from './inputProps';
import inputProps from './inputProps'; import inputProps from './inputProps';
import type { PropType } from 'vue'; import type { PropType } from 'vue';
import { computed, defineComponent, shallowRef, watchEffect } from 'vue'; import { computed, defineComponent, onMounted, shallowRef, watchEffect } from 'vue';
import useConfigInject from '../config-provider/hooks/useConfigInject'; import useConfigInject from '../config-provider/hooks/useConfigInject';
import omit from '../_util/omit'; import omit from '../_util/omit';
@ -53,6 +53,21 @@ export default defineComponent({
const blur = () => { const blur = () => {
inputRef.value?.blur(); inputRef.value?.blur();
}; };
onMounted(() => {
if (navigator.userAgent.includes('Edg')) {
if (!document.getElementById('edge-hide-password-style')) {
const style = document.createElement('style');
style.id = 'edge-hide-password-style';
style.innerHTML = `
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
display: none;
}
`;
document.head.appendChild(style);
}
}
});
expose({ expose({
focus, focus,
blur, blur,