@dataloop-ai/components 0.19.97 → 0.19.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -199,12 +199,15 @@ export default defineComponent({
|
|
|
199
199
|
return classes
|
|
200
200
|
})
|
|
201
201
|
|
|
202
|
+
const buttonTimeout = ref<any>(null)
|
|
203
|
+
|
|
202
204
|
return {
|
|
203
205
|
uuid: `dl-button-${v4()}`,
|
|
204
206
|
buttonLabelRef,
|
|
205
207
|
isOverflowing: hasEllipsis,
|
|
206
208
|
buttonClass,
|
|
207
|
-
mouseOver
|
|
209
|
+
mouseOver,
|
|
210
|
+
buttonTimeout
|
|
208
211
|
}
|
|
209
212
|
},
|
|
210
213
|
computed: {
|
|
@@ -419,7 +422,10 @@ export default defineComponent({
|
|
|
419
422
|
}
|
|
420
423
|
}
|
|
421
424
|
|
|
422
|
-
this
|
|
425
|
+
clearTimeout(this.buttonTimeout)
|
|
426
|
+
this.buttonTimeout = setTimeout(() => {
|
|
427
|
+
this.$emit('click', e)
|
|
428
|
+
}, 50)
|
|
423
429
|
}
|
|
424
430
|
},
|
|
425
431
|
onDblClick(e: Event) {
|
|
@@ -430,6 +436,7 @@ export default defineComponent({
|
|
|
430
436
|
}
|
|
431
437
|
}
|
|
432
438
|
|
|
439
|
+
clearTimeout(this.buttonTimeout)
|
|
433
440
|
this.$emit('dblclick', e)
|
|
434
441
|
}
|
|
435
442
|
},
|
|
@@ -1799,12 +1799,17 @@ export default defineComponent({
|
|
|
1799
1799
|
emit('th-click', evt, computedRows.value, name)
|
|
1800
1800
|
}
|
|
1801
1801
|
|
|
1802
|
+
const trClickTimeout = ref<any>(null)
|
|
1803
|
+
|
|
1802
1804
|
const onTrClick = (
|
|
1803
1805
|
evt: MouseEvent,
|
|
1804
1806
|
row: DlTableRow,
|
|
1805
1807
|
pageIndex: number
|
|
1806
1808
|
) => {
|
|
1807
|
-
|
|
1809
|
+
clearTimeout(trClickTimeout.value)
|
|
1810
|
+
trClickTimeout.value = setTimeout(() => {
|
|
1811
|
+
emit('row-click', evt, row, pageIndex)
|
|
1812
|
+
}, 50)
|
|
1808
1813
|
}
|
|
1809
1814
|
|
|
1810
1815
|
const onTrDblClick = (
|
|
@@ -1812,6 +1817,7 @@ export default defineComponent({
|
|
|
1812
1817
|
row: DlTableRow,
|
|
1813
1818
|
pageIndex: number
|
|
1814
1819
|
) => {
|
|
1820
|
+
clearTimeout(trClickTimeout.value)
|
|
1815
1821
|
emit('row-dblclick', evt, row, pageIndex)
|
|
1816
1822
|
}
|
|
1817
1823
|
|