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