fix(#IYI1T): 个人中心删除头像功能失效

#Comment
升级 sweetalert2 组件导致

#Issue
close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IYI1T
This commit is contained in:
Argo Zhang 2019-06-28 14:50:49 +08:00
parent 30f50dd9bd
commit 13d69df127
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 10 additions and 6 deletions

View File

@ -28,17 +28,21 @@
}).on('filebeforedelete', function (e, key) {
if (key === "default.jpg") return true;
return new Promise(function (resolve, reject) {
swal({
var swalDeleteOptions = {
title: "您确定要删除吗?",
html: '您确定要删除选中的所有数据吗',
type: "warning",
showCancelButton: true,
cancelButtonClass: 'btn-secondary',
confirmButtonColor: '#dc3545',
cancelButtonColor: '#6c757d',
confirmButtonText: "我要删除",
confirmButtonClass: "btn-danger ml-2",
cancelButtonText: "取消"
}, function (del) {
resolve(!del);
if (del) $file.fileinput('default');
};
swal(swalDeleteOptions).then(function (result) {
if (result.value) {
resolve(false);
$file.fileinput('default');
}
});
});
}).on('filedeleted', function (event, key, jqXHR, data) {