18 lines
385 B
Vue
18 lines
385 B
Vue
<script setup name="TestDialog">
|
|
const handleDelete = function () {
|
|
$dialog.confirm({
|
|
content: '确认删除?',
|
|
confirm() {
|
|
$dialog.success('删除成功', { positiveText: '我知道了' })
|
|
},
|
|
cancel() {
|
|
$dialog.warning('已取消', { closable: true })
|
|
},
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<n-button @click="handleDelete">删除</n-button>
|
|
</template>
|