Commit 9753f1df authored by 祁正's avatar 祁正

通知单管理-封装全局删除对话框

parent f31cd69d
...@@ -22,23 +22,30 @@ ...@@ -22,23 +22,30 @@
<el-dialog <el-dialog
class="my_dialog__header_deep" class="my_dialog__header_deep"
v-model="dialogVisible" v-model="dialogVisible"
title="提示"
align-center align-center
:before-close="cancel" :before-close="cancel"
style="width: 400px;height: 195px;margin-top: 300px" :fullscreen="true" style="width: 420px;height: 195px;margin-top: 300px" :fullscreen="true"
> >
<template #header> <template #header>
<div>提示</div> <div style="display: flex;">
<!-- <div>{{Prompt}}</div>--> <div>{{cn.reminder}}</div>
<div>{{en.reminder}}</div>
</div>
</template> </template>
<div style="display: flex;align-items: center;"> <div style="display: flex;flex-direction: column">
<el-icon style="color: orange;font-size: 18px;margin:5px"><WarningFilled /></el-icon> <div style="display: flex;" >
<div style="font-size: 14px">{{ content }}</div> <el-icon style="color: orange;font-size: 18px;margin-right: 12px"><WarningFilled /></el-icon>
<div class="contentText" style="font-size: 14px">{{ content }}</div>
</div>
<div style="display: flex;" >
<div class="contentText" style="font-size: 14px">{{ englishContent }}</div>
</div>
</div> </div>
<template #footer> <template #footer>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-button class="btn-B" @click="cancel">取消</el-button> <el-button class="btn-B" @click="cancel">{{cn.cancel}}{{en.cancel}}</el-button>
<el-button class="btn-A" @click="confirm">确认</el-button> <el-button class="btn-A" @click="confirm">{{cn.confirm}}{{en.confirm}}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
...@@ -47,7 +54,8 @@ ...@@ -47,7 +54,8 @@
<script setup> <script setup>
import { ref, defineProps, defineEmits, watch } from 'vue'; import { ref, defineProps, defineEmits, watch } from 'vue';
import { WarningFilled } from '@element-plus/icons-vue'; import { WarningFilled } from '@element-plus/icons-vue';
import en from '@/locales/Delectdialog/en.json';
import cn from '@/locales/Delectdialog/cn.json';
const props = defineProps({ const props = defineProps({
visible: { visible: {
type: Boolean, type: Boolean,
...@@ -56,7 +64,11 @@ const props = defineProps({ ...@@ -56,7 +64,11 @@ const props = defineProps({
content: { content: {
type: String, type: String,
default: '确定删除该项目吗?' default: '确定删除该项目吗?'
} },
englishContent: {
type: String,
default: 'Are you sure to delete this project?'
},
}); });
const emits = defineEmits(['confirm', 'cancel']); const emits = defineEmits(['confirm', 'cancel']);
...@@ -91,8 +103,11 @@ const cancel = () => { ...@@ -91,8 +103,11 @@ const cancel = () => {
} }
.el-dialog__footer{ .el-dialog__footer{
padding: 0; padding: 0;
margin: 20px; margin: 14px;
} }
} }
.contentText{
font-size: 14px;
color: #5B6373;
}
</style> </style>
{
"reminder": "提示",
"cancel": "取消",
"confirm": "确定"
}
{
"reminder": "prompt",
"cancel": "cancel",
"confirm": "confirm"
}
...@@ -398,6 +398,7 @@ ...@@ -398,6 +398,7 @@
<DeleteDialog <DeleteDialog
:visible="undoDialogVisible" :visible="undoDialogVisible"
:content="Prompt" :content="Prompt"
:english-content="'Are you sure to delete this notice?'"
@confirm="handleDelete" @confirm="handleDelete"
@cancel="hideDeleteDialog" @cancel="hideDeleteDialog"
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment