mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
fix(courselibrary): 优化删除确认弹窗及调试信息
- 统一使用 $messageBox 替代 ElMessageBox - 修改确认按钮文字为"确认" - 删除无用的调试信息展示 - 优化删除提示文案格式
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import dragCollapse from "./dragCollapse.vue";
|
||||
import { ElButton, ElCheckbox, ElDialog, ElMessageBox } from "element-plus";
|
||||
import { ElButton, ElCheckbox, ElDialog } from "element-plus";
|
||||
import { $message, $messageBox } from "@/utils/useMessage";
|
||||
import dragTable from "./dragTable.vue";
|
||||
import { ref, watch } from "vue";
|
||||
@@ -189,8 +189,8 @@ const deleteRow = (data) => {
|
||||
courseMetadata.selectionIndex = data.selectionIndex;
|
||||
|
||||
$messageBox
|
||||
.confirm(`确定删除${data.record.name}吗?`, "删除确认", {
|
||||
confirmButtonText: "确定",
|
||||
.confirm(`确定删除【${data.record.name}】吗?`, "删除确认", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
@@ -349,7 +349,6 @@ const handleNext = () => {
|
||||
</el-dialog>
|
||||
|
||||
<div class="p10 pst-s bg-w bottom0">
|
||||
{{ courseList }}
|
||||
<el-button>取消</el-button>
|
||||
<el-button type="primary">存草稿</el-button>
|
||||
<el-button @click="handleNext" type="primary">下一步</el-button>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup>
|
||||
import { ref, watch } from "vue";
|
||||
import draggable from "vuedraggable";
|
||||
import { ElInput, ElMessageBox } from "element-plus";
|
||||
import { $message } from "@/utils/useMessage";
|
||||
import { ElInput } from "element-plus";
|
||||
import { $message, $messageBox } from "@/utils/useMessage";
|
||||
|
||||
const props = defineProps({
|
||||
courseList: {
|
||||
@@ -73,16 +73,18 @@ const saveTitle = (element) => {
|
||||
};
|
||||
|
||||
const deleteCourse = (index) => {
|
||||
ElMessageBox.confirm("确定删除所选章节吗", "删除确认", {
|
||||
title: "删除确认",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
}).then(() => {
|
||||
$message.success("删除成功");
|
||||
dragList.value.splice(index, 1);
|
||||
emit("update:courseList", dragList.value);
|
||||
});
|
||||
$messageBox
|
||||
.confirm("确定删除所选章节吗", "删除确认", {
|
||||
title: "删除确认",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(() => {
|
||||
$message.success("删除成功");
|
||||
dragList.value.splice(index, 1);
|
||||
emit("update:courseList", dragList.value);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user