🐛(component): [tooltip]trigger contextMenu 时阻止默认行为

This commit is contained in:
sight 2022-09-10 13:18:57 +08:00
parent 18b35e0449
commit c6671864b9
2 changed files with 2 additions and 2 deletions

View File

@ -471,7 +471,6 @@ const handleScroll = useThrottleFn(() => {
}, 10); }, 10);
const handleClick = (e: MouseEvent) => { const handleClick = (e: MouseEvent) => {
e.stopPropagation();
if (props.disabled || (openState.value && !props.clickToClose)) { if (props.disabled || (openState.value && !props.clickToClose)) {
return; return;
} }

View File

@ -144,8 +144,9 @@ const handlerTriggerClick = function () {
} }
}; };
const handleTriggerContextMenu = function () { const handleTriggerContextMenu = function (e: MouseEvent) {
if (!triggerMethods.value.includes("contextMenu")) return; if (!triggerMethods.value.includes("contextMenu")) return;
e.preventDefault();
if (innerVisible.value) { if (innerVisible.value) {
doHidden(); doHidden();
} else { } else {