提交 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,10 +113,13 @@ const handleEdit = (node: any) => { ...@@ -113,10 +113,13 @@ const handleEdit = (node: any) => {
} }
// 删除章节 // 删除章节
const handleDel = (node: any) => { const handleDel = (node: any) => {
const params = { id: node.key, course_id: id } ElMessageBox.confirm('确定要删除吗?', '提示').then(() => {
delCharacter(params).then(() => { const params = { id: node.key, course_id: id }
ElMessage.success('删除成功')
handleFresh() delCharacter(params).then(() => {
ElMessage.success('删除成功')
handleFresh()
})
}) })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论