提交 df991c9f authored 作者: matian's avatar matian

删除添加弹框

上级 5154ef9f
<script lang="ts" setup> <script lang="ts" setup>
import { Plus } from '@element-plus/icons-vue' import { Plus } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { import {
getCharacter, getCharacter,
...@@ -113,11 +113,14 @@ const handleEdit = (node: any) => { ...@@ -113,11 +113,14 @@ const handleEdit = (node: any) => {
} }
// 删除章节 // 删除章节
const handleDel = (node: any) => { const handleDel = (node: any) => {
ElMessageBox.confirm('确定要删除吗?', '提示').then(() => {
const params = { id: node.key, course_id: id } const params = { id: node.key, course_id: id }
delCharacter(params).then(() => { delCharacter(params).then(() => {
ElMessage.success('删除成功') ElMessage.success('删除成功')
handleFresh() handleFresh()
}) })
})
} }
// 添加 // 添加
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论