diff --git a/element-vue/src/utils/dialog.js b/element-vue/src/utils/dialog.js index b8de8ee..a6cecf9 100644 --- a/element-vue/src/utils/dialog.js +++ b/element-vue/src/utils/dialog.js @@ -10,6 +10,19 @@ export async function showDialog(content,that){ }).catch(() => {}); }) } + +//询问框带reject +export async function showDialogWithReject(content,that){ + return new Promise((resolve, reject) => { + that.$confirm(content, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + resolve() + }).catch(() => {reject()}); + }) +} // 显示操作成功 export function showSuccess(content,that) { that.$message({