[fix][VM]:完善工具函数 显示询问框,提示框

master
Romesum 5 years ago
parent b6ceb5cfef
commit 0f9f03d411

@ -1,27 +1,25 @@
// 询问框 // 询问框
export async function showDialog(content) { export async function showDialog(content,that){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$confirm(content, '提示', { that.$confirm(content, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
resolve() resolve()
}).catch(() => { }).catch(() => {});
reject()
});
}) })
} }
// 显示操作成功 // 显示操作成功
export function showSuccess(content) { export function showSuccess(content,that) {
this.$message({ that.$message({
type: 'success', type: 'success',
message: content message: content
}); });
} }
// 显示操作失败 // 显示操作失败
export function showFail(content) { export function showFail(content,that) {
this.$message({ that.$message({
type: 'info', type: 'info',
message: content message: content
}); });

Loading…
Cancel
Save