邓洁 : 修改页面细节
This commit is contained in:
41
src/components/PopoverDelete.vue
Normal file
41
src/components/PopoverDelete.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<el-popconfirm
|
||||
confirm-button-text="确认"
|
||||
cancel-button-text="取消"
|
||||
icon="WarningFilled"
|
||||
icon-color="#E6A23C"
|
||||
:title="title"
|
||||
@confirm="handleDelete"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="text" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const emit = defineEmits()
|
||||
const title = ref(`确认删除名称为 "${props.name}" 的${props.type}吗!`)
|
||||
const visible = ref(false)
|
||||
const handleCancel = () => {
|
||||
visible.value = false
|
||||
}
|
||||
const handleDelete = () => {
|
||||
emit("delete")
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user