fix(#IYI1T): 个人中心删除头像功能失效
#Comment 升级 sweetalert2 组件导致 #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IYI1T
This commit is contained in:
parent
30f50dd9bd
commit
13d69df127
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue