mirror of
https://github.com/doocs/md.git
synced 2024-11-28 13:36:32 +08:00
feat: update uploadImgDialog
component
This commit is contained in:
parent
ed6d7f7bee
commit
86e9effb18
@ -249,19 +249,18 @@ export default {
|
|||||||
let checkRes = true, errMessage = '';
|
let checkRes = true, errMessage = '';
|
||||||
|
|
||||||
switch (localStorage.getItem('imgHost')) {
|
switch (localStorage.getItem('imgHost')) {
|
||||||
case "github":
|
case 'github':
|
||||||
checkRes = this.formGitHub.repo && this.formGitHub.accessToken;
|
checkRes = this.formGitHub.repo && this.formGitHub.accessToken;
|
||||||
errMessage = !checkRes ? '请先配置 GitHub 图床参数' : '';
|
errMessage = checkRes ? '' : '请先配置 GitHub 图床参数';
|
||||||
break;
|
break;
|
||||||
case 'aliOSS':
|
case 'aliOSS':
|
||||||
checkRes = this.formAliOSS.accessKeyId && this.formAliOSS.accessKeySecret && this.formAliOSS.bucket && this.formAliOSS.region;
|
checkRes = this.formAliOSS.accessKeyId && this.formAliOSS.accessKeySecret && this.formAliOSS.bucket && this.formAliOSS.region;
|
||||||
errMessage = !checkRes ? '请先配置阿里云 OSS 参数' : '';
|
errMessage = checkRes ? '' : '请先配置阿里云 OSS 参数';
|
||||||
break;
|
break;
|
||||||
case 'txCOS':
|
case 'txCOS':
|
||||||
checkRes = this.formTxCOS.secretId && this.formTxCOS.secretKey && this.formTxCOS.bucket && this.formTxCOS.region;
|
checkRes = this.formTxCOS.secretId && this.formTxCOS.secretKey && this.formTxCOS.bucket && this.formTxCOS.region;
|
||||||
errMessage = !checkRes ? '请先配置腾讯云 COS 参数' : '';
|
errMessage = checkRes ? '' : '请先配置腾讯云 COS 参数';
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
errMessage && this.$message.error(errMessage);
|
errMessage && this.$message.error(errMessage);
|
||||||
return checkRes;
|
return checkRes;
|
||||||
|
Loading…
Reference in New Issue
Block a user