|
@@ -7,10 +7,12 @@
|
|
|
ref="confirm"
|
|
|
trigger="click"
|
|
|
:append-to="body"
|
|
|
- @onHide="clickedOnce = false"
|
|
|
@hide="delayedHide()"
|
|
|
>
|
|
|
- <div @click.shift.stop="confirm()" @click.exact="clickedOnce = true">
|
|
|
+ <div
|
|
|
+ @click.shift.stop="shiftClick($event)"
|
|
|
+ @click.exact="click($event)"
|
|
|
+ >
|
|
|
<slot ref="trigger" />
|
|
|
</div>
|
|
|
<template #content>
|
|
@@ -45,8 +47,7 @@ export default {
|
|
|
event.type !== "click" ||
|
|
|
event.altKey ||
|
|
|
event.ctrlKey ||
|
|
|
- event.metaKey ||
|
|
|
- event.shiftKey
|
|
|
+ event.metaKey
|
|
|
)
|
|
|
return;
|
|
|
|
|
@@ -54,6 +55,13 @@ export default {
|
|
|
this.$emit("confirm");
|
|
|
this.$refs.confirm.tippy.hide();
|
|
|
},
|
|
|
+ click(event) {
|
|
|
+ if (!this.clickedOnce) this.clickedOnce = true;
|
|
|
+ else this.confirm(event);
|
|
|
+ },
|
|
|
+ shiftClick(event) {
|
|
|
+ this.confirm(event);
|
|
|
+ },
|
|
|
delayedHide() {
|
|
|
setTimeout(() => {
|
|
|
this.clickedOnce = false;
|