TDelete / 删除确认
Delete provides a safe delete action with multiple confirmation modes: modal, popover, or type-to-confirm. / 删除确认提供安全的删除操作,支持弹窗确认、气泡确认或输入文字二次确认。
Props / 属性
| Prop | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
displayType | 'button' | 'icon' | 'menu' | 'popover' | — | Display style |
label | string | — | Button text |
match | string | — | Type-to-confirm text |
loading | boolean | false | Loading state |
disabled | boolean | false | Disabled |
Events / 事件
| Event | Description |
|---|---|
@confirm | Delete confirmed |
@cancel | Delete cancelled |
Basic Usage / 基础用法
vue
<script setup lang="ts">
import { TDelete } from '@gulcc/tabler-vue'
function handleDelete() {
// perform delete
}
</script>
<template>
<TDelete label="Delete / 删除" display-type="button" @confirm="handleDelete" />
</template>