202501-Wms-Kate-Wuxi/dev_wms_client/src/utils/myMessageBox.js
liang 2a7eba72c5 1. 格式改动
2. 增加了一些报表界面
2025-03-20 08:52:10 +08:00

69 lines
1.5 KiB
JavaScript

import { ElMessageBox } from 'element-plus'
export const errorBox = (msg) => {
ElMessageBox.alert(msg, '错误', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'error',
closeOnPressEscape: true,
showClose: false,
customStyle: {
whiteSpace: 'pre-wrap'
},
callback: (action) => {
}
})
}
export const successBox = (msg) => {
ElMessageBox.alert(msg, '成功', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'success',
closeOnPressEscape: true,
showClose: false,
customStyle: {
whiteSpace: 'pre-wrap'
},
callback: (action) => {
}
})
}
export const infoBox = (msg) => {
ElMessageBox.alert(msg, '提示', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'info',
closeOnPressEscape: true,
showClose: false,
customStyle: {
whiteSpace: 'pre-wrap'
},
callback: (action) => {
}
})
}
export const warningBox = (msg) => {
ElMessageBox.alert(msg, '警告', {
autofocus: true,
confirmButtonText: '确认',
center: true,
type: 'warning',
closeOnPressEscape: true,
showClose: false,
customStyle: {
whiteSpace: 'pre-wrap'
},
callback: (action) => {
}
})
}