fix: prevent default context menu behavior in VnTable component
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
5c482cf738
commit
66ab8b20ee
|
@ -18,7 +18,7 @@ const arrayData = defineModel({
|
|||
function handler(event) {
|
||||
const clickedElement = event.target.closest('td');
|
||||
if (!clickedElement) return;
|
||||
|
||||
event.preventDefault();
|
||||
target.value = event.target;
|
||||
qmenuRef.value.show();
|
||||
colField.value = clickedElement.getAttribute('data-col-field');
|
||||
|
|
|
@ -222,10 +222,7 @@ onBeforeMount(() => {
|
|||
|
||||
onMounted(async () => {
|
||||
if ($props.isEditable) document.addEventListener('click', clickHandler);
|
||||
document.addEventListener('contextmenu', (event) => {
|
||||
event.preventDefault();
|
||||
contextMenuRef.value.handler(event);
|
||||
});
|
||||
document.addEventListener('contextmenu', contextMenuRef.value.handler);
|
||||
mode.value =
|
||||
quasar.platform.is.mobile && !$props.disableOption?.card
|
||||
? CARD_MODE
|
||||
|
|
Loading…
Reference in New Issue