feat: disable popup dialog when clicking command on execution history page

This commit is contained in:
duorameng
2026-05-21 15:04:09 +08:00
parent f132ebe287
commit efb1625675
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -6,15 +6,18 @@ const props = withDefaults(
defineProps<{
text: string
title?: string
disableDialog?: boolean
}>(),
{
title: '详情'
title: '详情',
disableDialog: false
}
)
const showDialog = ref(false)
function handleClick() {
if (props.disableDialog) return
if (props.text && props.text !== '-') {
showDialog.value = true
}
@@ -22,8 +25,11 @@ function handleClick() {
</script>
<template>
<span v-bind="$attrs" class="truncate block cursor-pointer hover:text-primary transition-colors" :title="text || '-'"
@click.stop="handleClick">
<span v-bind="$attrs"
class="truncate block transition-colors"
:class="[!disableDialog ? 'cursor-pointer hover:text-primary' : '']"
:title="text || '-'"
@click="e => { if (!disableDialog) { e.stopPropagation(); handleClick(); } }">
{{ text || '-' }}
</span>