fix(ui): prevent dangerous button from defaulting to popoveritem
This commit is contained in:
parent
32a1112a39
commit
7405d4009e
|
@ -15,7 +15,7 @@ const props = defineProps<{
|
||||||
title?: string
|
title?: string
|
||||||
action?: () => void,
|
action?: () => void,
|
||||||
confirmColor?:'success' | 'danger',
|
confirmColor?:'success' | 'danger',
|
||||||
popoverItem?: true
|
popoverItem?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
@ -32,7 +32,7 @@ const confirm = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<component :is="'popoverItem' in props ? PopoverItem : Button"
|
<component :is="props.popoverItem ? PopoverItem : Button"
|
||||||
destructive
|
destructive
|
||||||
@click.prevent.stop="showModal = true"
|
@click.prevent.stop="showModal = true"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
|
Loading…
Reference in New Issue