pull/8088/merge
鲨鱼辣椒 2025-03-20 08:49:02 +00:00 committed by GitHub
commit 07038473a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 inputProps from './inputProps';
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 omit from '../_util/omit';
@ -53,6 +53,21 @@ export default defineComponent({
const 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({
focus,
blur,