修改file文件上传判断

This commit is contained in:
liaozetao
2023-11-20 16:10:51 +08:00
parent 2a32c0dbb9
commit f50ba76de7
2 changed files with 6 additions and 3 deletions

View File

@@ -211,7 +211,8 @@ export default {
uploadIcon() {
let $this = this;
let file = $('#iconFile').val();
if (file) {
console.log(file);
if (file && file.length > 0) {
$('#iconUploadBtn').click(function () {
uploadFile('iconFile').then(res => {
if (res.path) {
@@ -225,7 +226,8 @@ export default {
uploadUrl() {
let $this = this;
let file = $('#urlFile').val();
if (file) {
console.log(file);
if (file && file.length > 0) {
$('#urlUploadBtn').click(function () {
uploadFile('urlFile').then(res => {
if (res.path) {

View File

@@ -176,7 +176,8 @@ export default {
uploadUrl() {
let $this = this;
let file = $('#urlFile').val();
if (file) {
console.log(file);
if (file && file.length > 0) {
$('#urlUploadBtn').click(function () {
uploadFile('urlFile').then(res => {
if (res.path) {