上传文件增加遮罩层
This commit is contained in:
@@ -153,6 +153,7 @@
|
||||
import { getResourcePage, delResource, saveResource, effective } from "@/api/resource/resource";
|
||||
import { getResourceRuleList } from '@/api/resource/resourceRule';
|
||||
import { uploadFile } from '@/api/common/upload';
|
||||
import { hideLoading, showLoading } from "@/utils/maintainer";
|
||||
|
||||
export default {
|
||||
name: "ResourceView",
|
||||
@@ -213,12 +214,15 @@ export default {
|
||||
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();
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -228,6 +232,7 @@ export default {
|
||||
let file = $('#urlFile').val();
|
||||
console.log(file);
|
||||
if (file && file.length > 0) {
|
||||
showLoading();
|
||||
$('#urlUploadBtn').click(function () {
|
||||
uploadFile('urlFile').then(res => {
|
||||
if (res.path) {
|
||||
@@ -235,6 +240,8 @@ export default {
|
||||
$('#urlUploadInfo').html('上传成功');
|
||||
}
|
||||
});
|
||||
}).finally(() => {
|
||||
hideLoading();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@@ -119,6 +119,7 @@
|
||||
import { getResourcePage, delResource, saveResource, effective } from "@/api/resource/resource";
|
||||
import { getResourceRuleList } from '@/api/resource/resourceRule';
|
||||
import { uploadFile } from '@/api/common/upload';
|
||||
import { hideLoading, showLoading } from "@/utils/maintainer";
|
||||
|
||||
export default {
|
||||
name: "SplashView",
|
||||
@@ -178,6 +179,7 @@ export default {
|
||||
let file = $('#urlFile').val();
|
||||
console.log(file);
|
||||
if (file && file.length > 0) {
|
||||
showLoading();
|
||||
$('#urlUploadBtn').click(function () {
|
||||
uploadFile('urlFile').then(res => {
|
||||
if (res.path) {
|
||||
@@ -185,6 +187,8 @@ export default {
|
||||
$('#urlUploadInfo').html('上传成功');
|
||||
}
|
||||
});
|
||||
}).finally(() => {
|
||||
hideLoading();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user