修复上传按钮
This commit is contained in:
@@ -212,34 +212,28 @@ export default {
|
||||
uploadIcon() {
|
||||
let $this = this;
|
||||
let file = $('#iconFile').val();
|
||||
console.log(file);
|
||||
if (file && file.length > 0) {
|
||||
showLoading();
|
||||
$('#iconUploadBtn').click(function () {
|
||||
uploadFile('iconFile').then(res => {
|
||||
if (res.path) {
|
||||
$this.resource.icon = res.path;
|
||||
$('#iconUploadInfo').html('上传成功');
|
||||
}
|
||||
}).finally(() => {
|
||||
hideLoading();
|
||||
});
|
||||
uploadFile('iconFile').then(res => {
|
||||
if (res.path) {
|
||||
$this.resource.icon = res.path;
|
||||
$('#iconUploadInfo').html('上传成功');
|
||||
}
|
||||
}).finally(() => {
|
||||
hideLoading();
|
||||
});
|
||||
}
|
||||
},
|
||||
uploadUrl() {
|
||||
let $this = this;
|
||||
let file = $('#urlFile').val();
|
||||
console.log(file);
|
||||
if (file && file.length > 0) {
|
||||
showLoading();
|
||||
$('#urlUploadBtn').click(function () {
|
||||
uploadFile('urlFile').then(res => {
|
||||
if (res.path) {
|
||||
$this.resource.url = res.path;
|
||||
$('#urlUploadInfo').html('上传成功');
|
||||
}
|
||||
});
|
||||
uploadFile('urlFile').then(res => {
|
||||
if (res.path) {
|
||||
$this.resource.url = res.path;
|
||||
$('#urlUploadInfo').html('上传成功');
|
||||
}
|
||||
}).finally(() => {
|
||||
hideLoading();
|
||||
});
|
||||
|
Reference in New Issue
Block a user